-
Notifications
You must be signed in to change notification settings - Fork 7
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
Monthly webtests #116
Monthly webtests #116
Conversation
I changed a setting in the repo so now someone from within BookOps-CAT will need to approve any workflows that are triggered by pull requests from external contributors. This setting is under Settings > Actions > General and more information is available here: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks As an extra precaution we can change the workflow to run on pull requests that have been closed and merged: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges |
The live tests were not triggered when I just added a commit to this PR so changing the workflow to run run on closed, merged pull requests (rather than all pull requests) seems to have worked. |
Some tests were timing out when they ran yesterday. I changed the scope of the fixture that requests an access token and added automatic retries on some of the tests that include multiple API requests. I won't add anything else to this PR! |
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.
Thank you, Charlotte!
* Authorization server scope changes (#111) * updated dependencies and version * updated WorldcatAccessToken with scope/scopes changes * updated changelog and advanced docs added test * response type for metadata api methods is Response (#112) * Bug fixes (#113) * added ignore flake8 F401 for test_bookops_worldcat * added types-pyyaml as dev dependency * added type annotations removed unnecessary imports * deleted test.mrc as it is now redundant * fixed typo in import statement * exported updated dev-requirements.txt * added 3.13 to unit-tests.yaml * fixed live_keys fixture for GITHUB_ACTIONS * New /search/bibs/{oclcNumber} endpoint (#115) * added bib_search method to MetadataSession class * added section on /search/bibs/ endpoint to docs * fixed return type for bib_search method * Holdings unset updates (#114) * added cascadeDelete arg to holdings_unset methods * updated docs to reflect holdings unset changes * Monthly webtests (#116) * added yaml file for monthly live test gh action * added additional webtest for WorldcatAccessToken * updated contributing.md with info about live tests * added fixtures for live tests and monthly checks * separated live tests into two classes * renamed, simplified endpoint_params fixture * reviewing changes to MetadataSession webtests * moved webtests to separate files and directory * created separate conftest for webtests * fixed typos in conftest docstrings * separated webtests into different classes * updated monthly test schedule * added additional type annotations to conftest.py * updated live_keys fixture for posix and windows * updated triggers in monthly-api-tests.yaml * moved live_keys fixture to webtests/conftest.py * changed triggers for webtest workflow * fixed typo in conditionals * changed live_token fixture scope to reduce calls * added automatic retries to holdings tests * Updated changelog and dependencies for release v1.1.0 (#117) * updated version in __version__.py * updated changelog for version 1.1.0 * fixed date in changelog * updated release checklist and contribution guide * changed package version, added python 3.13 * updated all dependencies * added additional dependency updates to changelog * added link to detailed code changes in changelog * fixed failing test due to change in api response * updated mkdocstrings due to error caused by griffe
Changed
tests/webtests/
directorytests/webtests/test_metadata_api_live.py
,tests/webtests/test_query_live.py
,tests/webtests/test_authorize_live.py
contributing.md
to include note on live testsTestLiveMetadataSession
have been expanded to check for additional details in the API's responsesAdded
monthly-api-check.yaml
to.github/workflows
webtest
marker) will run at 5AM on the 15th of each monthmain
or any branch starting withreleases/
conftest.py
file intests/webtests
containingendpoint_params
) andMetadataSession
methods (method_params
)WorldcatAccessToken
to be used across multiple tests. this will speed up tests as they will not request a new token for each test as they had previouslytests/webtests/
directory for all live tests and moved existing tests to those files. live tests are now intests/webtests/test_metadata_api_live.py
,tests/webtests/test_query_live.py
,tests/webtests/test_authorize_live.py
test_authorize_live.py
:test_metadata_api_live.py
:TestLiveMetadataSessionErrors
andTestAPISpec
) to better organize webtestsTestAPISpec
compare the OpenAPI spec published with the Metadata API documentation to the parameters included in the signature of eachMetadataSession
methodtest_open_api_spec_check
) also compares the number of endpoints outlined in the API documentation as well as their available methods to the expected list of endpoints and methodsThis PR will resolve #90 as contributors outside of BookOps will be able to contribute live tests and have them run via GitHub actions. These tests will not run until the PR has been approved by someone on the BookOps-CAT team and merged.