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

Document how to create/load fixture data #175

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Conversation

tim-schilling
Copy link
Member

This documents how to create a fixture for the application. This will make it easier for folks to share reproducible environments locally and avoid needing to rely on staging so heavily.

@dawnwages this also adds the database environment variable to the settings which should restore your local environment.

@sabderemane @RachellCalhoun @dawnwages here's a fixture to use that has the first draft of Rachell's blog post that's on production. Or at least some version of it.

fixture-20231230.zip

Copy link
Member

@RachellCalhoun RachellCalhoun left a comment

Choose a reason for hiding this comment

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

LGTM, I had a few comments below. Thanks!

  1. It might be helpful to add/change instructions to include loading fixtures to an existing db, which is what I did by skipping a few steps. I think this is also a very likely situation because if someone is setting up the project for the first time they've likely done the readme install which includes creating a db, or it's someone who has been working on in and has a db. I know this won't work for all cases.
  2. should we add fixtures/data.json to .gitignore?

@tim-schilling
Copy link
Member Author

I'm skeptical about adding this to an existing db because it uses primary keys rather than natural keys. If there are conflicts with existing data, it could result in data being associated with the wrong objects.

Yeah, we probably should ignore it until we know we want to store something.

@tim-schilling
Copy link
Member Author

Amended my commit with the gitignore addition.

@tim-schilling tim-schilling merged commit 3a44dba into develop Jan 12, 2024
1 check passed
@tim-schilling tim-schilling deleted the local-fixture branch January 12, 2024 02:29
@tim-schilling tim-schilling temporarily deployed to staging-djangonaut-space January 12, 2024 02:29 — with GitHub Actions Inactive
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