-
Notifications
You must be signed in to change notification settings - Fork 215
Reintroduce CI #277
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
Open
theMarix
wants to merge
13
commits into
dschep:master
Choose a base branch
from
theMarix:ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Reintroduce CI #277
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…execution [`setup.py test` has been deprecated for a while now](https://setuptools.pypa.io/en/latest/deprecated/commands.html#test-build-package-and-run-a-unittest-suite) and `test_dependencies` actually seems to fail on modern Python and setuptools versions. Thus: - Install additional test dependencies from test-requirements.txt - Switch from setup.py test to pytest for running tests - Update README with new testing commands
The used sleekxmpp library is no longer maintained and does not work on any non-EOL version of Python. We might want to switch to using https://codeberg.org/poezio/slixmpp in the future.
We need to account for parallel execution of jobs.
It does not make sense to check formatting separately for each Platform
The dependencies don't install properly in this case
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
It seems the YAPF formatting check was broken for a while and non-conformant formattings snuck in. This reformats the codebase with YAPF.
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull reintroduced CI builds. The CI builds are now performed via a GitHub workflow that mimics the previous TravisCI setup. To get things working properly however, a couple further changes needed to be made:
setup.py testhas been dropped in favour of pytestFurther, as it was convenient, some further changes were made:
I did not drop the tests for the xmpp features as we might want to switch to using slixmpp in the future.
When dropping the
setup.py testmechanism I had to find a different way to specify the test requirements. I moved them intotest-requirements.txt. An alternative might be to switch the whole test set-up to Tox. This would allow having a CI test specification that could also easily be run locally and also make it trivial to run operations like formatting.Note that some of this PR was generated via Copilot. So if you don't want LLM code in your project, please let me know.
CI Setup:
.github/workflows/ci.yml: Added a new CI workflow configuration to run format checks and tests on different operating systems and Python versions.Documentation Updates:
README.md: Updated the testing section to include instructions for installing test dependencies and running tests usingpytest.Code Formatting Improvements:
ntfy/__init__.py: Improved code readability by adjusting the formatting ofnotifyfunction calls and argument handling. [1] [2]ntfy/backends/*: Applied consistent formatting tonotifyfunction definitions and calls across multiple backend files, includinglinux.py,matrix.py,notifico.py,ntfy_sh.py,prowl.py,pushbullet.py,pushover.py,slack_webhook.py,telegram.py, andwin32.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]CLI and Configuration:
ntfy/cli.py: Improved formatting of argument parsing and message formatting functions for better readability. [1] [2] [3] [4] [5]ntfy/config.py: Made a minor change to copy the default configuration to avoid potential issues with mutable defaults.Miscellaneous:
ntfy/terminal.py: Improved formatting of functions related to terminal window focus detection. [1] [2]setup.py: Removed unused test dependencies and thetests_requireandtest_suitearguments from the setup configuration. [1] [2]