-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename antsibull project to antsibull-build #632
Merged
felixfontein
merged 9 commits into
ansible-community:main
from
felixfontein:antsibull-stub
Oct 16, 2024
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2d3fe0f
Rename antsibull project to antsibull-build
gotmax23 71737c2
Create antsibull-stub package config for backwards compatibility
gotmax23 c6c645c
antsibull-build: add link to README
gotmax23 123fbcf
Rename antsibull module to antsibull_build.
felixfontein 6bae609
Bump stub version to 0.67.0, since 0.66.0 already exists.
felixfontein 001e3a6
Bump antsibull-build dependency.
felixfontein 801c527
Remove unintended TMPDIR change.
felixfontein 0456bed
Avoid ambiguity.
felixfontein 06c1621
One last change :)
felixfontein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- | ||
Copyright (c) Ansible Project | ||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
SPDX-License-Identifier: GPL-3.0-or-later | ||
--> | ||
|
||
# antsibull PyPI stub package | ||
|
||
The `antsibull` project has been renamed to `antsibull-build`. | ||
This is an empty stub package for backwards compatibility. | ||
The new PyPI project is located at <https://pypi.org/project/antsibull-build>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Copyright (c) Ansible Project | ||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "antsibull" | ||
version = "0.67.0" | ||
description = "The antsibull project has been renamed to antsibull-build" | ||
license = "GPL-3.0-or-later AND Python-2.0.1" | ||
license-files = {globs=["LICENSES/*.txt"]} | ||
readme = "README.md" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Framework :: Ansible", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Typing :: Typed", | ||
] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"antsibull-build>=0.66.0" | ||
felixfontein marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
|
||
[[project.authors]] | ||
name = "Toshio Kuratomi" | ||
email = "[email protected]" | ||
|
||
[[project.authors]] | ||
name = "Felix Fontein" | ||
email = "[email protected]" | ||
|
||
[[project.maintainers]] | ||
name = "Felix Fontein" | ||
email = "[email protected]" | ||
|
||
[[project.maintainers]] | ||
name = "Maxwell G" | ||
email = "[email protected]" | ||
|
||
[project.urls] | ||
"New package" = "https://pypi.org/project/antsibull-build" | ||
|
||
[project.optional-dependencies] | ||
# User-facing extras | ||
clipboard = [ | ||
"antsibull-build[clipboard]" | ||
] | ||
all = [ | ||
"antsibull-build[all]", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
# This is an empty package | ||
bypass-selection = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
breaking_changes: | ||
- "The name of this project has been changed from ``antsibull`` to | ||
``antsibull-build`` to reflect that it provides the ``antsibull-build`` | ||
command and disambiguate this project from the other antsibull projects. | ||
For backwards compatibility purposes, the ``antsibull`` project on PyPI | ||
has been converted to an empty stub package that requires | ||
``antsibull-build``, but users should immediately switch to the new name. | ||
The Git repository has also been moved to | ||
https://github.com/ansible-community/antsibull-build | ||
(https://github.com/ansible-community/antsibull/issues/627, | ||
https://github.com/ansible-community/antsibull/pull/629)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ github_checks: | |
annotations: false | ||
|
||
fixes: | ||
- "antsibull/::" | ||
- "antsibull_build/::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ def test(session: nox.Session): | |
session.run( | ||
"pytest", | ||
"--cov-branch", | ||
"--cov=antsibull", | ||
"--cov=antsibull_build", | ||
"--cov-report", | ||
"term-missing", | ||
*more_args, | ||
|
@@ -102,9 +102,7 @@ def test(session: nox.Session): | |
|
||
@contextlib.contextmanager | ||
def coverage_run(session: nox.Session) -> Iterator[tuple[str, dict[str, str]]]: | ||
build_command = ( | ||
"coverage run -p --branch --source antsibull -m antsibull.cli.antsibull_build" | ||
) | ||
build_command = "coverage run -p --branch --source antsibull_build -m antsibull_build.cli.antsibull_build" | ||
tmp = Path(session.create_tmp()) | ||
covfile = tmp / ".coverage" | ||
cov_env = {"COVERAGE_FILE": f"{covfile}", **session.env} | ||
|
@@ -145,6 +143,9 @@ def coverage_release(session: nox.Session): | |
"git+https://github.com/ansible-collections/community.general", | ||
env={"ANSIBLE_COLLECTIONS_PATH": str(collections), **session.env}, | ||
) | ||
tmp_env = {} | ||
if os.environ.get("COVERAGE_RELEASE_FORCE_TMPDIR"): | ||
tmp_env["TMPDIR"] = os.environ["COVERAGE_RELEASE_FORCE_TMPDIR"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems redundant if |
||
with coverage_run(session) as (build_command, cov_env): | ||
session.run( | ||
"ansible-playbook", | ||
|
@@ -154,9 +155,11 @@ def coverage_release(session: nox.Session): | |
"-e", | ||
f"antsibull_build_command={build_command!r}", | ||
env={ | ||
"TMPDIR": "/tmp", | ||
felixfontein marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"ANSIBLE_COLLECTIONS_PATH": str(collections), | ||
"ANSIBLE_CALLBACK_RESULT_FORMAT": "yaml", | ||
**cov_env, | ||
**tmp_env, | ||
}, | ||
) | ||
|
||
|
@@ -193,8 +196,8 @@ def formatters(session: nox.Session): | |
@nox.session | ||
def codeqa(session: nox.Session): | ||
install(session, ".[codeqa]", *other_antsibull(), editable=True) | ||
session.run("flake8", "src/antsibull", *session.posargs) | ||
session.run("pylint", "--rcfile", ".pylintrc.automated", "src/antsibull") | ||
session.run("flake8", "src/antsibull_build", *session.posargs) | ||
session.run("pylint", "--rcfile", ".pylintrc.automated", "src/antsibull_build") | ||
session.run("reuse", "lint") | ||
session.run("antsibull-changelog", "lint") | ||
|
||
|
@@ -203,7 +206,7 @@ def codeqa(session: nox.Session): | |
def typing(session: nox.Session): | ||
others = other_antsibull() | ||
install(session, ".[typing]", *others) | ||
session.run("mypy", "src/antsibull") | ||
session.run("mypy", "src/antsibull_build") | ||
|
||
|
||
@nox.session | ||
|
@@ -252,7 +255,7 @@ def check_package_files( | |
"run", | ||
"-p", | ||
"--branch", | ||
"--source=antsibull", | ||
"--source=antsibull_build", | ||
"tests/verify_package_files.py", | ||
"check", | ||
f"--data-dir={build_data / major}", | ||
|
@@ -332,7 +335,11 @@ def bump(session: nox.Session): | |
with open(fragment_file, "w") as fp: | ||
fp.write(fragment) | ||
session.run( | ||
"git", "add", "src/antsibull/__init__.py", str(fragment_file), external=True | ||
"git", | ||
"add", | ||
"src/antsibull_build/__init__.py", | ||
str(fragment_file), | ||
external=True, | ||
) | ||
session.run("git", "commit", "-m", f"Prepare {version}.", external=True) | ||
session.run("antsibull-changelog", "release") | ||
|
@@ -345,7 +352,7 @@ def bump(session: nox.Session): | |
"changelogs/fragments/", | ||
# src/antsibull/__init__.py is not committed in the last step | ||
# when the release_summary fragment is created manually | ||
"src/antsibull/__init__.py", | ||
"src/antsibull_build/__init__.py", | ||
external=True, | ||
) | ||
install(session, ".") # Smoke test | ||
|
@@ -355,7 +362,7 @@ def bump(session: nox.Session): | |
"tag", | ||
"-a", | ||
"-m", | ||
f"antsibull {version}", | ||
f"antsibull-build {version}", | ||
"--edit", | ||
version, | ||
external=True, | ||
|
@@ -371,14 +378,14 @@ def publish(session: nox.Session): | |
install(session, "hatch") | ||
session.run("hatch", "publish", *session.posargs) | ||
session.run("hatch", "version", "post") | ||
session.run("git", "add", "src/antsibull/__init__.py", external=True) | ||
session.run("git", "add", "src/antsibull_build/__init__.py", external=True) | ||
session.run("git", "commit", "-m", "Post-release version bump.", external=True) | ||
|
||
|
||
@nox.session | ||
def install_env(session: nox.Session): | ||
""" | ||
Install antsibull and the other project in the the local environment. | ||
Install antsibull-build and the other project in the the local environment. | ||
Invoke with `nox -e install_env --no-venv` | ||
""" | ||
session.run( | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Google returns no results for
COVERAGE_RELEASE_FORCE_TMPDIR
. How does it change pycoverage's behavior?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't. This is interpreted by noxfile.py.