-
Notifications
You must be signed in to change notification settings - Fork 3
Devop/python package workflow #10
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
base: master
Are you sure you want to change the base?
Conversation
mvn23
left a comment
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.
Thanks for the PR. I agree that CI workflows are useful, but I left some comments related to the suggested implementation.
| python -m pip install flake8 pytest | ||
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
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.
Pre-commit uses ruff for linting and formatting. Wouldn't it make more sense to apply the same standards here?
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.
Sure, but the check were already passed so I had no immediate need to change something.
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.
Just because it passes does not make it fit to merge. We should keep the same standards in pre-commit and github CI workflows as there are cases where ruff and flake8 differ.
3.8 is end of life since 2024-10-07 and latest release is 3.13
|
I committed 1bca817. Please resolve the conversation where you are satisfied with. Why does the workflow not run? In my repo it did without any additional settings. |
| python_requires=">=3.9", | ||
| install_requires=[ | ||
| "aiohttp", | ||
| ], | ||
| classifiers=[ | ||
| "Development Status :: 3 - Alpha", | ||
| "Topic :: Software Development :: Libraries", | ||
| "License :: OSI Approved :: GNU General Public License v3 or later " "(GPLv3+)", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", |
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.
Let's do one thing at a time and keep the PR as small as possible. This is not needed to set up the CI workflow. Also, we may want to get rid of setup.py in favor of pyproject.toml soon anyway, then we can review all this.
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.
If we do auto-upgrade to 3.9, we have to state that the library requires 3.9. Isn't it?
Adds a git hub workflow to automatically run checks. It`s basically Github's template and a sample test to let pytest not fail. Maybe this some kinda useful.