Skip to content

Cleanup docker/makefile (STIT-347, STIT-348, STIT-349)#49

Open
AlexAxthelm wants to merge 27 commits intomainfrom
cleanup-docker-makefile
Open

Cleanup docker/makefile (STIT-347, STIT-348, STIT-349)#49
AlexAxthelm wants to merge 27 commits intomainfrom
cleanup-docker-makefile

Conversation

@AlexAxthelm
Copy link
Copy Markdown
Collaborator

@AlexAxthelm AlexAxthelm commented Mar 23, 2026

Refactors the local development workflow around a cleaner, more intentional set of Makefile targets and Docker Compose profiles. The goal is to simplify how services are started, reduce overlap between targets, and make the common development paths more obvious.

The Makefile now defines three primary entrypoints: frontend-dev, api-dev, and dev-docker which cover the main development modes. Supporting targets have been streamlined, and Docker Compose usage has been aligned with these flows via clearer profile usage and startup behavior.

Includes changes to .env files, and how handling of those variables are passed to docker containers.

Key changes:

  • Introduces clear primary entrypoints: make frontend-dev, make api-dev, make dev-docker
  • Simplifies and consolidates Docker Compose profiles and service startup logic
  • Removes redundant/overlapping targets and normalizes naming
  • Improves developer ergonomics with utility targets like check, clean, and reboot-docker
  • Standardizes how supporting services (DB, tools, seed, etc.) are started across workflows
  • Moves developer guidance into an updated HACKING.md reflecting the new workflow

For usage and onboarding, see the updated HACKING.md.

Copy link
Copy Markdown
Contributor

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

This PR streamlines local-dev and CI entry points by refactoring Makefile targets, reorganizing Docker Compose profiles/services, and simplifying Python package test/build commands across the uv workspace.

Changes:

  • Reworked Makefile targets to use py-* and per-package uv run --package ... helpers; updated GitHub Actions workflows accordingly.
  • Restructured docker-compose configuration with profiles, moved Adminer to docker-compose.local.yml, and expanded env.example.
  • Updated seed runner to wait for API readiness before posting payloads; adjusted OGSI tests to match the current OGFieldResource shape.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
scripts/test-package.py Removed legacy per-package pytest runner script.
packages/stitch-ogsi/tests/test_og_field.py Updated tests to stop assuming OGFieldResource exposes OilGasFieldBase fields directly.
env.example Expanded and reorganized environment variables for API/DB/frontend/seed.
docker-compose.yml Added profiles and refactored env handling for api/db/db-init/frontend.
docker-compose.local.yml Moved Adminer here; seed config updated and made host-accessible.
deployments/seed/src/stitch/seed/client.py Added wait_for_api() retry loop used by the seed entrypoint.
deployments/seed/src/stitch/seed/main.py Calls wait_for_api() before running OpenAPI validation + seeding.
Makefile Major target cleanup and new helpers for package/test/build workflows.
.github/workflows/python-*.yml Updated CI to call the new Makefile targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 61 to 65
def test_has_both_base_class_fields(self, og_payload: Sequence[OGFieldSource]):
resource = OGFieldResource(
id=1,
name="Merged Field",
country="USA",
source_data=og_payload,
location_type="Onshore",
)
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test no longer asserts any OilGasFieldBase fields (and no longer passes name/country/location_type), but the surrounding comments/docstring still describe OGFieldResource as combining OilAndGasFieldBase + Resource fields. Update the test name/comments to reflect the current model shape (e.g. that OGFieldResource holds view/provenance rather than inheriting field attributes).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbarlow12 I think this is something you're better equipped to comment on, but I'm hoping that this could be a follow-up PR?

@AlexAxthelm AlexAxthelm marked this pull request as ready for review March 26, 2026 14:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AlexAxthelm AlexAxthelm changed the title Cleanup docker/makefile Cleanup docker/makefile (STIT-347, STIT-348, STIT-349) Mar 26, 2026
@mbarlow12
Copy link
Copy Markdown
Contributor

Caught up with filters/querying today—will get it finished before the weekend.

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.

3 participants