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

feat: fixtures to fill data in a local environment #303

Closed
wants to merge 2 commits into from

Conversation

Shadows97
Copy link
Collaborator

What

  • Add fixtures to fill data in a local environment

@Shadows97 Shadows97 linked an issue May 27, 2024 that may be closed by this pull request
@Shadows97 Shadows97 requested a review from raphodn May 27, 2024 09:33
from openfoodfacts import Flavor
from sqlalchemy.orm import Session

from app.db import Base, engine
Copy link
Member

Choose a reason for hiding this comment

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

when i tried to run it locally - poetry run python fixtures/import_data.py - i get the following error

Traceback (most recent call last):
  File "....../open-prices/fixtures/import_data.py", line 5, in <module>
    from app.db import Base, engine
ModuleNotFoundError: No module named 'app'

@@ -0,0 +1,1073 @@
users:
- user_id: "john_doe"
Copy link
Member

Choose a reason for hiding this comment

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

just to be sure, these users are fake so it won't be possible to login with them, right ? or do you have a way to bypass the OFF login ?

@@ -46,6 +46,12 @@ The run the migration of the database with
make migrate-db
```

The load the fixtures with
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The load the fixtures with
You can load some fixtures with

@raphodn
Copy link
Member

raphodn commented Oct 6, 2024

Closing as this does not work anymore, following the migration from FastAPI to Django (#366)..
Feel free to open a new PR that is Django-compatible 😇

@raphodn raphodn closed this Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Have fixtures to fill data in a local environment
2 participants