diff --git a/.gitea/workflows/python-package.yml b/.gitea/workflows/python-package.yml index 2ee342a..0e41ec0 100644 --- a/.gitea/workflows/python-package.yml +++ b/.gitea/workflows/python-package.yml @@ -1,3 +1,7 @@ +# WARNING! +# THIS IS AN AUTOGENERATED FILE! +# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! + name: Package Python on: push: diff --git a/.gitea/workflows/python-test.yml b/.gitea/workflows/python-test.yml index b51db74..3189d0b 100644 --- a/.gitea/workflows/python-test.yml +++ b/.gitea/workflows/python-test.yml @@ -1,3 +1,7 @@ +# WARNING! +# THIS IS AN AUTOGENERATED FILE! +# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! + name: Run Python tests (through Pytest) on: diff --git a/.gitea/workflows/python-version-check.yml b/.gitea/workflows/python-version-check.yml index 3c9b44d..c3b5a84 100644 --- a/.gitea/workflows/python-version-check.yml +++ b/.gitea/workflows/python-version-check.yml @@ -1,3 +1,7 @@ +# WARNING! +# THIS IS AN AUTOGENERATED FILE! +# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! + name: Verify Python project can be installed, loaded and have version checked on: diff --git a/CONVENTIONS.md b/CONVENTIONS.md index 7fc9a32..9bdf447 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -1,3 +1,7 @@ + + + + # Conventions When contributing code to this project, you MUST follow the requirements diff --git a/README.md b/README.md index f59eda2..e4a73f9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ - - - - - + + + # Standardize test format @@ -37,7 +35,6 @@ This project does not have any library requirements 😎 Feel free to submit pull requests. Please follow the [Code Conventions](CONVENTIONS.md) when doing so. - ### Testing Testing requires the [pytest](https://docs.pytest.org/en/stable/) library. @@ -54,7 +51,6 @@ Test coverage can be run using the [`pytest-cov`](https://pypi.org/project/pytes pytest --cov=standardize_test_format test ``` - ## License ``` diff --git a/setup.py b/setup.py index 50b5f99..c9bbfa2 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,6 @@ -# WARNING -# -# THIS IS AN AUTOGENERATED FILE. -# -# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN. +# WARNING! +# THIS IS AN AUTOGENERATED FILE! +# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! import re @@ -36,23 +34,20 @@ take formatting into account. PACKAGE_DESCRIPTION_SHORT = """ Tool for standardizing Java tests.""".strip() - def parse_version_file(text: str) -> str: - match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text) + text = re.sub('^#.*', '', text, flags=re.MULTILINE) + match = re.match(r'^\s*__version__\s*=\s*(["\'])([\d\.]+)\1$', text) if match is None: msg = 'Malformed _version.py file!' raise Exception(msg) return match.group(2) - with open(PACKAGE_NAME + '/_version.py') as f: version = parse_version_file(f.read()) - REQUIREMENTS_MAIN = [] REQUIREMENTS_TEST = [] - setup( name=PACKAGE_NAME, version=version,