|
14 | 14 | from packaging.specifiers import SpecifierSet |
15 | 15 | from packaging.version import Version |
16 | 16 | from pathlib import Path |
| 17 | +from textwrap import dedent |
17 | 18 | from typing import Optional, Union |
18 | 19 |
|
19 | 20 | # 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: |
594 | 595 | new_file_hash = get_file_hash() |
595 | 596 | if old_file_hash != new_file_hash: |
596 | 597 | 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 | + ) |
602 | 613 | ) |
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 | + ) |
607 | 619 |
|
608 | 620 |
|
609 | 621 | if __name__ == "__main__": |
|
0 commit comments