Skip to content

Conversation

@lordyavin
Copy link
Contributor

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.

Copy link
Owner

@mvn23 mvn23 left a 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.

Comment on lines +30 to +37
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
Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Owner

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
@lordyavin
Copy link
Contributor Author

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.

@lordyavin lordyavin requested a review from mvn23 October 9, 2024 21:07
Comment on lines +25 to +38
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",
Copy link
Owner

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.

Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants