-
Notifications
You must be signed in to change notification settings - Fork 13
Maintenance tasks before release #201
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
Conversation
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.
Pull Request Overview
This PR performs maintenance tasks to clean up testing infrastructure and code formatting before a release. The primary focus is removing insecure storage of API keys in the database and improving the test setup for API authentication.
- Removed storage of secret keys in the database for enhanced security
- Added dedicated API key fixtures for test authentication
- Applied code formatting and import organization improvements
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/nsls2api/tests/conftest.py | Added api_key and admin_api_key fixtures, removed inline key generation from db fixture |
| src/nsls2api/tests/api/test_admin_api.py | Updated tests to use the new admin_api_key fixture instead of database queries |
| src/nsls2api/services/sync_service.py | Added docstrings and applied code formatting |
| src/nsls2api/services/proposal_service.py | Reorganized imports alphabetically |
| src/nsls2api/services/facility_service.py | Applied code formatting to function signature |
| src/nsls2api/services/bnlpeople_service.py | Commented out debug logging statement |
| src/nsls2api/models/apikeys.py | Removed secret_key field from ApiKey model |
| src/nsls2api/infrastructure/security.py | Removed secret key storage, fixed typo in return value |
| src/nsls2api/api/v1/proposal_api.py | Reorganized imports and removed unused import |
| scripts/migrate_satellite_locations.py | Deleted migration script file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Self merging as @HarikaBishai has given 👍 |
This is a collection of some cleanup tasks that I kept meaning to do.
api_keyandadmin_api_keyfixture so tests can access an api key to use in testing