Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See pull request for a full list of changes * Refactor Github OAuth logic * Add and enhance documentation * Combine `/login-with-github` and `/create-user-with-github` into a single `/login-with-github` endpoint * Enhance integration tests, remove redundant tests * Fix bugs after merge * Fix bugs in `data_sources` model: * `tags` and `agency_aggregation` now accurately reflect their database types. * Create `get_record_type_id_by_name` method * Update `DataSourcesPutSchema` to exclude `id` and `data_source_request` * Update `update_data_source_wrapper` function to optionally swap `record_type_name` with corresponding `record_type_id` key and value * Enhance `test_data_sources_by_id_put`: test for all editable parameters now * Add logic for linking/unlinking data requests with locations; add `location_id` to `typeahead/locations` logic * Rename `get_api_key_for_user` to `create_api_key_for_user` * Reorganize API key logic; remove redundant tests. * Add API logic to encrypt API keys with SHA256 hash * feat: miscellaneous client search updates (#150) * feat: miscellaneous client search updates * fix: use replace for swipe nav * Add test for checking duplicate user creation logic. * Remove `required` status from some schema fields * Standardize `/refresh-session` response to align with `/login`. Update test and internal logic accordingly. * Update `/data-requests` `PUT` logic and tests * format with black (#156) * Update JWT Token to include both user_id and user_email in the token * Revise existing tests relating to JWTs * feat: Github auth integration with client (#158) * fix: trailing slash (#159) * Change Github Access Token to JWT with Expiry of 5 minutes. * Add JWT_SECRET_KEY environment variable * * Adjust logic to account for removed data_sources.record_download_option_provided column * Add test for update_broken_source_url_as_of * Update Integration tests to include all possible inputs * Correct erroneous `POST` and `PUT` schemas * Rate limit `GET-BY-ID` endpoints to 50 per minute * Rate limit `GET-BY-ID` endpoints to 50 per minute, 250 per hour. * Fix Request Password Reset Bug * Update requirements.txt * Update pluggy library to 1.5.0 * Correct type hinting * Rebuild `/data-sources-map` * Re-added `python tests/test_schema_validation.py` * Temporarily remove other tests to more quickly test `test_schema_validation.py` * Re-add other tests * Fix missing authorization bug * refactor: miscellaneous client organization (#170) * chore: bump design sys * refactor: remove bespoke loading UI per button * refactor: miscellaneous client updates * fix: tests * Update reset password flow * Update `/reset-password` flow * Update related tests * Refactor access info logic. * Add RESET_PASSWORD_SECRET_KET to env * Increase create_date modification to 15 minutes from `datetime.now()`. * refactor: update password reset flow (#172) * fix: miscellaneous search functionality * refactor: reset password stuff * Initial draft * Update typeahead_location tests and correct minor bugs * * Update `/data-sources` `POST` to enable linking agency ids. * Updatet corresponding tests * LIBTYFI: Correct bug in `DatabaseClient.get_data_sources_for_map()` * Modify the format of the reset password link * fix: reset password redirect (#176) * fix: search * Create `/user/<user_id>` `GET` endpoint and associated logic/tests/documentation * Change `/data-sources` `POST` Authentication to standard JWT, from Admin-only * Fix bugs related to test data creation and amanagement * Disable variable column permission checking for post logic * Update test for `/data-sources` `POST` to have user executing post be standard user * Add logic for automatically specifying last approval editor * Add last_approval_editor_old to SQLAlchemy model * Add last_approval_editor_old to data sources schema * Excluding `last_approval_editor_old` from test data schema generation * Enhanced `/agencies` `GET` methods and tests to include linked data sources LIBTYFI: * Reorganized and refactored some schemas * Refactored some SQLAlchemy models * Refactored `test_select_subquery_relation` * Refactored some subquery relation logic * Ensure all three primary endpoints have subquery logic * Update tests for all three endpoints accordingly * Fix bugs in SQLAlchemy causing issues with relationships * Refactor some SQLAlchemy models to reduce redundancy * Begin work on refining sorting tests * Add previously removed columns to agencies data source subquery * Refine sorting tests, fix sorting logic where needed * feat: new data source route (#184) * refactor(pages): update request create route * refactor: move data source func to data-source store * feat: data source create route also updates search typeahead just slightly * fix: final removal of typeahead caching * fix: update data source id route * fix: update location typeahead * refactor: little improvements to request and search * refactor: data source create * chore(deps): add vue3-toastify * feat: add toast messages with vue3-toastify * feat: add toast to create routes * Update login logic to provide unauthorized response for invalid email and password * Create endpoint for withdrawing data requests * Move data sources map endpoint to `/map/data-sources` * Refactor reset tokens to use `user_id` rather than `email` as user identifier. * Install pre-commit and run pre-commit `black` on repository * Test pre-commit via refactor * Upgrade Python version to 3.12 * Remove space * Update Python version in README * feat: use dark mode for inputs (#192) bump design-system, update typeahead * Remove select packages from requirements.txt * fix: data source id animation on swipe * Update request reset password message * Remove references to `DEV_DB_CONN` * Remove references to `DEV_DB_CONN` * Add `/auth/signup` and associated logic, refactor access info logic * Reformat with black * Add VALIDATE_EMAIL_SECRET_KEY to Github Action and Readme. * Refactor user email/user id logic. * feat: data source enhancements and follow searches (#199) * chore(deps): bump design-system * fix: record type and ds by id * fix: auth issues with redirect * fix: misc auth fixes around sign in redirect * feat: add not found slot support for typeahead * feat: create data source advanced properties * feat: follow searches * fix: add not found functionality to data source create * fix: already exists logic * fix: warning toast for existing url * refactor: clean up agencies UI and logic * Begin updating change password endpoint * Begin updating change password endpoint * Update url for signup web app link * Finish update to reset password * LIBTYFI: Get rid of unused table arguments * refactor: use range date inputs and ds create cleanup (#201) * refactor: use range date picker ds post * refactor: use date picker in request * fix: data source agency originated logic * fix: v-if -> v-show - to preserve input vals * fix: miscellaneous ds create fixes * fix: search results error handling * fix: search results erroring * refactor: move signup to auth, rename funcs * feat: updated authentication flow * fix: token validation granularity * fix: miscellaneous results -> auth -> results fixes * fix: little problem with route getter * Remove `/user` endpoint * Endpoint and related test logic removed * Helper test logic which created users has been moved to a solution which interfaces directly with the database * Consolidated test functions, eliminated redundant functions * Removed unused imports in test functions * Add Josh bcc for signup link * Refactor EndpointInfo * Replace existing endpoints which used the old `endpoint_info` decorator with `endpoint_info_2` * Once every endpoint is thus replaced, remove the old `endpoint_info` and rename `endpoint_info_2` to `endpoint_info` * Update endpoint schema configs to accomodate this change. * Adjust some tests accordingly * Remove unused code * Refactor to make more DRY * Begin updating models to Pydantic * Complete updating models to Pydantic * Begin adding comprehensive tests LIBTYFI - Update `/archives` endpoint to align with current best practices for endpoint documentation and access logic - Update `/permissions` endpoint to align with current best practices for endpoint documentation and access logic - Clarify authorization checks to exit earlier on malformed requests - Add full `test_bad_request_authorization` and `test_http_not_allowed` * Update `annotated-types` requirement to `0.7.0` * Remove unused import * Refactor Access Logic: * Improve standardization of access token creation and parsing * Remove redundant logic * Improve standardization of error responses when parsing access tokens * Extract some logic to separate functions Add `test_bad_request_api_key_not_allowed` Add `test_bad_request_jwt_not_allowed` Add logic for getting specific authorization header Rename `test_bad_request_authorization` to `test_bad_request_malformed_header` Complete `test_bad_request_missing_header` Add `test_bad_request_endpoints_with_headers_have_bad_request_response_spec` Standardize response info to `/refresh-session`, `/user-profile`, `/validate-email` Remove unused modules and imports * Add logic to automatically indicate when an endpoint requires Admin permissions. * Create description for API documentation. * Add MAX_CONTENT_LENGTH to Flask App Configuration * Remove unused models * Add file source mapping to `SourceMappingEnum` * Remove unused models * Refactor error checking logic * Update `_get_source_getting_function` * Add TODO comment * Begin draft work on batch development * Work `/api-key` to accept JWT authorization rather than email and login. * Miscellaneous refactors * Continue draft for CSV import logic * Continue draft development * Continue draft for CSV import logic * Continue draft for CSV import logic * Complete development of mass import logic * Reformat with black * Remove unneeded code * Remove unneeded code * Set up CSV Export Logic * Begin work on agencies matching endpoint * Continue work on agencies matching endpoint * Complete draft of agencies match endpoint * Fix test_permissions_manager_init_user_not_found * Fix test_permissions_manager_init_user_not_found * Reorganize namespaces * feat: use new footer and donor box API * docs: update readme * chore(deps): bump design-system * Change Update Password Route to `/user/update-password` * refactor: api, auth, client data caching (#218) * fix: miscellaneous little tweaks * refactor: move async fetching out of stores * refactor: client search caching * refactor: add caching to data source by id * feat: typeahead caching * fix: broken typeahead on request routes * Correct bug in nomenclature for GetManySchemas * Correct bug in nomenclature for GetManySchemas * refactor: miscellaneous client cleanup * Replace state/county/location search parameters with location_id as search parameter * Add location id to `/search/follow` `GET` * Begin draft of work * fix: update location logic per API changes * Create filter for multiple statuses for `/data-requests` `GET` * fix: broken search form * Create Locations namespace * Update description of fields to include default if default is provided * fix: search with categories * Add aliasing logic to subquery parameters and DB client logic; update `/data-requests/{id} to utilize` * feat(client): data requests Add location requests to results, Add data-request/id route * fix: data requests get * fix: miscellaneous client cleanup * fix: broken build * fix: fetch all requests * fix: location text formatting * Hotfix: Add Basic Support for `/locations/{id}/data-requests` * fix: get requests by location and miscellaneous other fixes * Standardize location information. Add location info to data requests returned by `/locations/{id}/data-requests` * Fix broken tests * fix: location text * correct API intro link (#227) * fix: nvmrc and update pack-lock * fix: client build * Update email template for signup link. * fix: search results * fix: search results take 2 * Reformat with black --------- Co-authored-by: Joshua Graber <[email protected]> Co-authored-by: Josh <[email protected]> Co-authored-by: Joshua Graber <[email protected]>
- Loading branch information