Tooling for building various things related to ansible
GPL-3.0 License
Tooling for building various things related to Ansible
Scripts that are here:
Related projects are antsibull-changelog and antsibull-docs, which are in their own repositories (antsibull-changelog repository, antsibull-docs repository). Currently antsibull-changelog is a dependency of antsibull-build. Therefore, the scripts contained in it will be available as well when installing antsibull-build.
You can find a list of changes in the Antsibull Build changelog.
antsibull-build is covered by the Ansible Code of Conduct.
This repository abides by the REUSE specification. See the copyright headers in each file for the exact license and copyright. Summarily:
GPL-3.0-or-later
).src/antsibull/_vendor/shutil.py
includes code derived from CPython, licensedPython-2.0.1
).From version 0.1.0 on, antsibull-build sticks to semantic versioning and aims at providing no backwards compatibility breaking changes to the command line API (antsibull-build) during a major release cycle. We might make exceptions from this in case of security fixes for vulnerabilities that are severe enough.
We explicitly exclude code compatibility. antsibull-build is not supposed to be used as a library. The only exception are potential dependencies with other antsibull projects (currently, none). If you want to use a certain part of antsibull-build as a library, please create an issue so we can discuss whether we add a stable interface for parts of the Python code. We do not promise that this will actually happen though.
Install and run nox
to run all tests. That's it for simple contributions!
nox
will create virtual environments in .nox
inside the checked out project
and install the requirements needed to run the tests there.
antsibull-build depends on the sister antsibull-core, antsibull-changelog,
antsibull-docs-parser, antsibull-docutils, and antsibull-fileutils projects.
By default, nox
will install development versions of these projects from
Github.
If you're hacking on antsibull-core, antsibull-changelog, antsibull-docs-parser,
antsibull-docutils and/or antsibull-fileutils alongside antsibull-build,
nox will automatically install the projects from ../antsibull-core
,
../antsibull-changelog
, ../antsibull-docs-parser
, ../antsibull-docutils
,
and ../antsibull-fileutils
when running tests if those paths exist.
You can change this behavior through the OTHER_ANTSIBULL_MODE
env var:
OTHER_ANTSIBULL_MODE=auto
— the default behavior described aboveOTHER_ANTSIBULL_MODE=local
— install the projects from ../antsibull-core
,../antsibull-changelog
, ../antsibull-docs-parser
, ../antsibull-docutils
,../antsibull-fileutils
.OTHER_ANTSIBULL_MODE=git
— install the projects from the Github main branchOTHER_ANTSIBULL_MODE=pypi
— install the latest version from PyPITo run specific tests:
nox -e test
to only run unit tests;nox -e lint
to run all linters;nox -e formatters
to run isort
and black
;nox -e codeqa
to run flake8
, pylint
, reuse lint
, and antsibull-changelog lint
;nox -e typing
to run mypy
.nox -e coverage_release
to build a test ansible release.nox -e check_package_files
to run the generate-package-files integration tests.nox -e coverage
to display combined coverage results after running nox -e test coverage_release check_package_files
;Run nox -l
to list all test sessions.
To create a more complete local development env:
git clone https://github.com/ansible-community/antsibull-changelog.git
git clone https://github.com/ansible-community/antsibull-core.git
git clone https://github.com/ansible-community/antsibull-docs-parser.git
git clone https://github.com/ansible-community/antsibull-docutils.git
git clone https://github.com/ansible-community/antsibull-build.git
cd antsibull-build
python3 -m venv venv
. ./venv/bin/activate
pip install -e '.[dev]' -e ../antsibull-changelog -e ../antsibull-core -e ../antsibull-docs-parser -e ../antsibull-docutils
[...]
nox
nox -e bump -- <version> <release_summary_message>
. This:
src/antsibull/__init__.py
.changelogs/fragments/<version>.yml
with a release_summary
section.antsibull-changelog release
and adds the changed files to git.Release <version>.
and runs git tag -a -m 'antsibull-build <version>' <version>
.hatch build --clean
to build an sdist and wheel in dist/
andgit push
to the appropriate remotes.nox -e publish
. This:
hatch publish
to publish the sdist and wheel generated during step 1 to PyPI;<version>.post0
;git commit -m 'Post-release version bump.'
;git push --follow-tags
to the appropriate remotes and create a GitHub release.