-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add CI/CD and pre-commit #11
Conversation
For now, leave out pylint remarks.
The point of mocking HTTP responses from an OTE server is to ensure the otelib is tested and not the OTE server.
5f0d0f0
to
e026f34
Compare
A central fixture will mock OTE server responses.
It was truly testing the `OntoTransServer`, and not `dataresource`.
Move fixture with test data to the test file.
Codecov Report
@@ Coverage Diff @@
## master #11 +/- ##
=========================================
Coverage ? 73.54%
=========================================
Files ? 10
Lines ? 155
Branches ? 0
=========================================
Hits ? 114
Misses ? 41
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Test if response is "OK" for every use of `requests` and raise `ApiError` if not "OK", i.e., if the response code is not in the 200s. Properly set the `status` variable for `ApiError`.
Avoid cloning in the complete oteapi-services repository and instead have a local docker-compose file to use for the CI test with a real backend. Set the same environment variable prefix for the otelib settings as is set for oteapi-services (`OTEAPI_`).
The failing test will succeed as soon as EMMC-ASBL/oteapi-services#42 and EMMC-ASBL/oteapi-services#43 have been merged. 42 fixes the actual issue and 43 will make sure to update the container (Docker) image upon every new push to |
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.
OntoTransServer has been renamed to OTEClient
Not yet - #8 has not yet been merged. It will be merged now, however, and this will be updated accordingly. Good catch though :) |
Closes #5
Closes #9
GitHub Actions CI/CD workflows are added to run pytest, pre-commit, pylint, and test building the package.
Also for publishing the package upon creating a GitHub release.
Add pytest dependencies and configuration.
Add pre-commit with similar hooks as for oteapi-core.
Update the codebase to comply with the pre-commit hooks (black, mypy, bandit, pylint, isort, and assorted pre-commit-hooks).