Skip to content

Conversation

@alfrice
Copy link

@alfrice alfrice commented Oct 16, 2025

  1. Transitioned from pyramid to fastapi
  2. Initial pydantic schema modeling
  3. Dockerized
  4. tests
  5. updated timestamp on solr docs. @fpurcell this was hardcoded and I updated at return time

@fpurcell This looks like a lot, but your logic remains mostly unchanged. See the service folder.

@alfrice
Copy link
Author

alfrice commented Oct 16, 2025

@fpurcell I have two longer running tests that are skipped. Can run local. It compares current stage to this new local client.

@alfrice alfrice requested review from Copilot and fpurcell October 16, 2025 22:26
@alfrice alfrice marked this pull request as draft October 16, 2025 22:28
@alfrice alfrice self-assigned this Oct 16, 2025
Copy link

Copilot AI left a 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.

@alfrice alfrice requested a review from Copilot October 17, 2025 16:58
Copy link

Copilot AI left a 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.

@alfrice alfrice force-pushed the fastapi-rework branch 2 times, most recently from 17735fc to fe162ba Compare October 17, 2025 18:00
@alfrice alfrice requested a review from Copilot October 17, 2025 18:01
Copy link

Copilot AI left a 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.

@alfrice alfrice force-pushed the fastapi-rework branch 5 times, most recently from c78a2af to 2254fb2 Compare October 17, 2025 18:29
@alfrice alfrice requested a review from Copilot October 17, 2025 18:31
Copy link

Copilot AI left a 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.

@alfrice alfrice marked this pull request as ready for review October 17, 2025 18:38
@alfrice alfrice force-pushed the fastapi-rework branch 4 times, most recently from 6e6c6c0 to 7faebc5 Compare October 17, 2025 20:56
@alfrice alfrice requested review from Copilot and removed request for Copilot October 17, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants