-
Notifications
You must be signed in to change notification settings - Fork 1
fastapi-pydantic-containerization #3
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
base: master
Are you sure you want to change the base?
Conversation
|
@fpurcell I have two longer running tests that are skipped. Can run local. It compares current stage to this new local client. |
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
Transition from Pyramid to FastAPI, introduce Pydantic schemas, add Docker support, expand tests, and adjust Solr document timestamps.
- Replace Pyramid app and views with FastAPI app and routers (core, pelias, solr)
- Add Pydantic schemas for Pelias/Solr responses and containerization (Dockerfile, entrypoint, compose)
- Update Solr timestamp handling and add comparison tests against staging
Reviewed Changes
Copilot reviewed 56 out of 72 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tests_strings_crash.py | Path cleanup in CSV fixtures to align test data loading |
| tests/tests.py | New unit tests for PeliasToSolr parsing and API parameter conversion |
| tests/test_stops.py | Stop ID handling and output formatting adjustments |
| tests/test_main.py | New tests for FastAPI core endpoints (root, info, health) |
| tests/pr.py | Improve error handling and code style for PR helper script |
| tests/data/search_7-11_ticket.json | Test fixture for Pelias search results |
| tests/data/autocomplete_no_results.json | Test fixture for empty autocomplete results |
| tests/comparison_testing/util.py | Helpers to verify responses between local and staging |
| tests/comparison_testing/test_solr.py | Parametrized Solr wrapper comparison tests (skipped) |
| tests/comparison_testing/test_pelias.py | Parametrized Pelias wrapper comparison tests |
| setup.py | Remove setuptools build; replaced by Poetry |
| restart_wrapper.sh | Remove legacy Pyramid restart script |
| pyproject.toml | Add Poetry config, dependencies, tooling, and build system |
| pelias/adapter/tests/tests.py | Remove legacy Pyramid-based tests |
| pelias/adapter/tests/data/search_7-11_ticket.json | Remove legacy test data |
| pelias/adapter/tests/data/autocomplete_no_results.json | Remove legacy test data |
| pelias/adapter/pyramid/views.py | Remove Pyramid views |
| pelias/adapter/pyramid/app.py | Remove Pyramid app factory |
| pelias/init.py | Remove legacy namespace package |
| main.py | New FastAPI entrypoint, routers, CORS, and error handling |
| logging.ini | Logging configuration adjustments for FastAPI |
| docker/entrypoint.sh | New entrypoint for Gunicorn/Uvicorn with env-based tuning |
| docker/compose.yml | Docker Compose for local dev |
| docker/buildDocker.sh | Helper to build Docker image |
| docker/Dockerfile | Multi-stage Docker build with Poetry |
| dev.env | Development environment defaults |
| config/staging.ini | Remove Pyramid staging config |
| config/production.ini | Remove Pyramid production config |
| config/pelias.adapter.ini | Remove Pyramid config alias |
| config/local_pelias.ini | Remove Pyramid local config |
| config/base.ini | Remove Pyramid base config |
| com/github/ott/pelias/adapter/service/solr_service.py | SOLR wrapper service for FastAPI |
| com/github/ott/pelias/adapter/service/pelias_wrapper.py | Pelias response cleanup and routing logic |
| com/github/ott/pelias/adapter/service/pelias_to_solr.py | SOLR param mapping, Pelias calls, timestamp update |
| com/github/ott/pelias/adapter/service/pelias_service.py | Pelias service dispatcher for FastAPI |
| com/github/ott/pelias/adapter/service/pelias_json_queries.py | Helpers to query/normalize Pelias JSON |
| com/github/ott/pelias/adapter/service/config.py | Pelias URL config and API type enums |
| com/github/ott/pelias/adapter/schema/solr_schema.py | Pydantic schemas for SOLR responses |
| com/github/ott/pelias/adapter/schema/pelias_schema.py | Pydantic schemas for Pelias responses |
| com/github/ott/pelias/adapter/routers/solr.py | SOLR router endpoints |
| com/github/ott/pelias/adapter/routers/pelias.py | Pelias router endpoints and Cache-Control |
| com/github/ott/pelias/adapter/routers/core.py | Core info/health/root endpoints |
| com/github/ott/pelias/adapter/routers/init.py | Router package init |
| com/github/ott/pelias/adapter/models/solr/solr_stop_record.py | Stop record parsing improvements |
| com/github/ott/pelias/adapter/models/solr/solr_response.py | SOLR response parsing and route-stop retrieval |
| com/github/ott/pelias/adapter/models/solr/solr_record.py | Base SOLR record refactor |
| com/github/ott/pelias/adapter/models/init.py | Models package init |
| com/github/ott/pelias/adapter/core/errors.py | Custom exception type |
| com/github/ott/pelias/adapter/core/config.py | App settings and Cache-Control generation |
| com/github/ott/pelias/adapter/core/init.py | Core package init |
| buildout.cfg | Remove legacy buildout |
| README.md | Update project docs for FastAPI/Poetry |
| CHANGES.txt | Remove legacy changelog |
| .flake8 | Add flake8 configuration |
| .dockerignore | Add docker ignore rules |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 57 out of 73 changed files in this pull request and generated 10 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
17735fc to
fe162ba
Compare
fe162ba to
a5ebabd
Compare
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
Copilot reviewed 57 out of 73 changed files in this pull request and generated 10 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
c78a2af to
2254fb2
Compare
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
Copilot reviewed 57 out of 73 changed files in this pull request and generated 9 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
6e6c6c0 to
7faebc5
Compare
7faebc5 to
e4af45b
Compare
e4af45b to
a1a203a
Compare
@fpurcell This looks like a lot, but your logic remains mostly unchanged. See the service folder.