Skip to content

Commit bbe49d4

Browse files
committed
.
1 parent 954bb1b commit bbe49d4

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

scripts/populate_tox/populate_tox.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from packaging.specifiers import SpecifierSet
1515
from packaging.version import Version
1616
from pathlib import Path
17+
from textwrap import dedent
1718
from typing import Optional, Union
1819

1920
# Adding the scripts directory to PATH. This is necessary in order to be able
@@ -594,16 +595,27 @@ def main(fail_on_changes: bool = False) -> None:
594595
new_file_hash = get_file_hash()
595596
if old_file_hash != new_file_hash:
596597
raise RuntimeError(
597-
"The yaml configuration files have changed. This means that either `tox.ini` "
598-
"or one of the constants in `split_tox_gh_actions.py` has changed "
599-
"but the changes have not been propagated to the GitHub actions config files. "
600-
"Please run `python scripts/split_tox_gh_actions/split_tox_gh_actions.py` "
601-
"locally and commit the changes of the yaml configuration files to continue. "
598+
dedent(
599+
"""
600+
Detected an unexpected change in `tox.ini` that is not reflected
601+
in `tox.jinja` and/or `populate_tox.py`.
602+
603+
Please make sure to not make manual changes to `tox.ini`. The file
604+
is generated from a template in `scripts/populate_tox/tox.jinja`
605+
by the `scripts/populate_tox/populate_tox.py` script. Any changes
606+
should be made to the template or the script directly and the
607+
resulting `tox.ini` file should be generated with:
608+
609+
pip install -r scripts/populate_tox/requirements.txt
610+
python scripts/populate_tox/populate_tox.py
611+
"""
612+
)
602613
)
603-
604-
print(
605-
"Done generating tox.ini. Make sure to also update the CI YAML files to reflect the new test targets."
606-
)
614+
print("Done checking tox.ini. Looking good!")
615+
else:
616+
print(
617+
"Done generating tox.ini. Make sure to also update the CI YAML files to reflect the new test targets."
618+
)
607619

608620

609621
if __name__ == "__main__":

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# The file (and all resulting CI YAMLs) then need to be regenerated via
1111
# "scripts/generate-test-files.sh".
1212
#
13-
# Last generated: 2025-02-18T12:44:30.669986+00:00
13+
# Last generated: 2025-02-18T12:57:32.874168+00:00
1414

1515
[tox]
1616
requires =

0 commit comments

Comments
 (0)