Feature: script fake crn list for testing #403
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.
While testing we might need to use specific crn (exemple staging / local server) who is not in the crn list.
This Pr allow us to run a fake crn_list api locally.
Self proofreading checklist
Documentation
not updated yet
Changes
This pull request introduces a local mock CRN List API for development and testing, allowing the Aleph client SDK to use a locally served CRN list instead of the production endpoint. The changes add a FastAPI application, sample CRN list data, documentation, and update the Python dependencies to support this new API. Additionally, the Aleph SDK dependency is updated to a specific development branch.
New Local CRN List API:
crn_list.py
) that serves the CRN list from a localcrn_list.json
file, including CORS support and endpoints for the root and/crns.json
.crn_list.json
file with a mocked CRN entry for local testing.requirements.txt
specifyingfastapi
anduvicorn
as dependencies for running the API.README.md
with setup, usage instructions, and guidance on configuring the Aleph client SDK to use the local API.Dependency Updates:
aleph-sdk-python
dependency inpyproject.toml
to use a specific development branch from GitHub (1yam-fake-crn-list
).How to test
export CRN_LIST_URL=http://localhost:8000/crns.json
python scripts/api/crn_list/crn_list.py
and then create instance
Notes
Only ovh staging is in here for now, more can be added in the json if needed