From 51baddc8f23bb978cffab2be67754e5ec23caf7d Mon Sep 17 00:00:00 2001 From: takunomi-build-bot Date: Fri, 9 May 2025 09:50:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Repository=20layout=20updated=20?= =?UTF-8?q?to=20latest=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit was automatically generated by [a script](https://gitfub.space/Jmaa/repo-manager) --- .gitea/workflows/python-container.yml | 4 ++++ .gitea/workflows/python-package.yml | 4 ++++ .gitea/workflows/python-test.yml | 4 ++++ .gitea/workflows/python-version-check.yml | 4 ++++ CONVENTIONS.md | 24 +++++++++++++++++++++++ README.md | 12 ++++-------- setup.py | 13 ++++-------- 7 files changed, 48 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/python-container.yml b/.gitea/workflows/python-container.yml index a45a87a..e90aef4 100644 --- a/.gitea/workflows/python-container.yml +++ b/.gitea/workflows/python-container.yml @@ -1,3 +1,7 @@ +# WARNING! +# THIS IS AN AUTOGENERATED FILE! +# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! + name: Build Python Container on: push: 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 6f1becf..a9c787b 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 541d93b..9108127 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 714e6dd..9bdf447 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -1,3 +1,14 @@ + + + + +# Conventions + +When contributing code to this project, you MUST follow the requirements +specified here. + +## Code Conventions + When contributing code to this project, you MUST follow these principles: - Code should be easy to read and understand. @@ -10,3 +21,16 @@ When contributing code to this project, you MUST follow these principles: - Properly handle errors and exceptions to ensure the software's robustness. - Use exceptions rather than error codes for handling errors. - Consider security implications of the code. Implement security best practices to protect against vulnerabilities and attacks. +- Documentation should document semantics, not syntax. +- Prefer importing modules, not individual items from modules. +- Do not use f-strings in logging statements. +- Loop variables and walrus-expression-variables should be deleted when + unneeded to keep scope clean, and to avoid accidental use. + +## Testing + +When contributing test to this project, you MUST follow these principles: + +- Do not use any testing libraries other than `pytest`. +- Mocking is the root of all evil. Writing your own stubs is much more + preferable. diff --git a/README.md b/README.md index 668e468..6c9434c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ - - - - - + + + # Personal Data Fetcher Systems @@ -73,13 +71,12 @@ Full list of requirements: - [fin-depo](https://gitfub.space/Jmaa/fin-depo) - [secret_loader](https://gitfub.space/Jmaa/secret_loader) - [requests-util](https://gitfub.space/Jmaa/requests_util) - +- [clients](https://gitfub.space/Jmaa/clients) ## Contributing 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. @@ -96,7 +93,6 @@ Test coverage can be run using the [`pytest-cov`](https://pypi.org/project/pytes pytest --cov=personal_data test ``` - ## License ``` diff --git a/setup.py b/setup.py index dd54e86..1c4c9f1 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 @@ -56,7 +54,6 @@ PACKAGE_DESCRIPTION_SHORT = """ This program collects several small data fetchers, for downloading personal data spread around the internet.""".strip() - def parse_version_file(text: str) -> str: match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text) if match is None: @@ -64,11 +61,9 @@ def parse_version_file(text: str) -> str: raise Exception(msg) return match.group(2) - with open(PACKAGE_NAME + '/_version.py') as f: version = parse_version_file(f.read()) - REQUIREMENTS_MAIN = [ 'beautifulsoup4', 'lxml', @@ -84,12 +79,12 @@ REQUIREMENTS_MAIN = [ 'fin-depo @ git+https://gitfub.space/Jmaa/fin-depo.git', 'secret_loader @ git+https://gitfub.space/Jmaa/secret_loader', 'requests-util @ git+https://gitfub.space/Jmaa/requests_util', + 'clients @ git+https://gitfub.space/Jmaa/clients', ] REQUIREMENTS_TEST = [ 'pytest', ] - setup( name=PACKAGE_NAME, version=version,