Open
Conversation
…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
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
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]