Skip to content

fix: use relative imports in models.py for Docker compatibility#169

Closed
AndyBodnar wants to merge 1 commit intoZeecka:mainfrom
AndyBodnar:fix/docker-import-168
Closed

fix: use relative imports in models.py for Docker compatibility#169
AndyBodnar wants to merge 1 commit intoZeecka:mainfrom
AndyBodnar:fix/docker-import-168

Conversation

@AndyBodnar
Copy link
Copy Markdown

Summary

  • Changed absolute imports to relative imports in aperisolve/models.py
  • Fixes module import errors when running in Docker with the Postgres container
  • The absolute imports caused circular import issues in the containerized environment

Test plan

  • Build the Docker image with docker-compose build
  • Start the containers with docker-compose up
  • Verify the Postgres container starts without module import errors
  • Test that AperiSolve functions correctly with the database

Fixes #168

Changed absolute imports to relative imports to fix module import
errors when running in Docker with the Postgres container. The
absolute imports caused circular import issues in the containerized
environment.

Fixes Zeecka#168
@Zeecka Zeecka added the question Further information is requested label Jan 10, 2026
@Zeecka
Copy link
Copy Markdown
Owner

Zeecka commented Jan 11, 2026

As mentioned in issue:

Also, using absolute imports is recommended :

Clear and explicit: you always know where things come from.
Stable when refactoring: moving files doesn’t silently break imports.
Works everywhere: scripts, tests, REPL, CLI entrypoints, workers, etc.
PEP 328 / PEP 8 recommended for top-level packages.
Plays nicely with tooling (IDE navigation, static analysis, mypy, pytest).

@Zeecka Zeecka closed this Jan 11, 2026
@AndyBodnar AndyBodnar deleted the fix/docker-import-168 branch January 17, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Postgres container fails to start

2 participants