Skip to content
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

Restructure files #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

john0isaac
Copy link

Purpose

Fix #52

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

[ ] Yes
[x] No

Type of change

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

See CONTRIBUTING.md for more details.

  • [-] The current tests all pass (python -m pytest).
  • [-] I added tests that prove my fix is effective or that my feature works
  • [-] I ran python -m pytest --cov to verify 100% coverage of added lines
  • [-] I ran python -m mypy to check for type errors
  • [-] I either used the pre-commit hooks or ran ruff manually on my code.

Copy link
Author

Choose a reason for hiding this comment

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

This is a workaround to keep using pyproject.toml.

The only down side is that now (locally) you'll need to install the fastapi_app package before installing the backend package as the backend package can't resolve the fastapi_app source, I tried specifying the path but it needs a full path which will be a nightmare on different platforms.
https://stackoverflow.com/questions/75159453/specifying-local-relative-dependency-in-pyproject-toml

Copy link
Author

@john0isaac john0isaac Jul 1, 2024

Choose a reason for hiding this comment

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

Btw we can use a packages manager (poetry or smth) and we will be able to specify a relative path but I know you are not a big fan of this approach so, I didn't do it. But it's an option too.

Comment on lines 130 to +134
```bash
python3 -m pip install -e src/backend
python3 -m pip install -e src
python ./src/fastapi_app/setup_postgres_database.py
python ./src/fastapi_app/setup_postgres_seeddata.py
python ./src/backend/fastapi_app/setup_postgres_database.py
python ./src/backend/fastapi_app/setup_postgres_seeddata.py
Copy link
Author

Choose a reason for hiding this comment

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

This now how it works but it's not pretty due to the issue I mentioned below.

vscode resolution will still work as is and running the launch.json scripts will work as is.

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.

Remove unused code from container
1 participant