Skip to content

chore(populate_db): migrate assigned dev seed data from JSON to YAML (#2010)#2011

Merged
andrewtavis merged 3 commits intoactivist-org:mainfrom
Ayananth:chore/populate-db-json-to-yaml-2010
Mar 16, 2026
Merged

chore(populate_db): migrate assigned dev seed data from JSON to YAML (#2010)#2011
andrewtavis merged 3 commits intoactivist-org:mainfrom
Ayananth:chore/populate-db-json-to-yaml-2010

Conversation

@Ayananth
Copy link
Copy Markdown
Contributor

Contributor checklist


Description

This PR switches the dev environment seed data used by the populate_db command from JSON to YAML to make the data easier to read and maintain.

Changes include:

  • Updated the populate_db command to load assigned seed data using yaml.safe_load instead of the json module.
  • Converted backend/core/management/commands/entity_data_to_assign.json to YAML.
  • Converted the test fixture backend/tests/fixtures/populate_db_assigned.json to YAML.
  • Added --yaml-data-to-assign as the primary CLI argument.
  • Kept --json-data-to-assign as a deprecated alias for backward compatibility.
  • Updated tests to use the YAML fixtures and arguments.
  • Updated docker-compose.yml to pass the YAML seed file.
  • Added pyyaml as a dependency and updated uv.lock.

This makes the seed data easier to edit and maintain while preserving backward compatibility.

Related issue

Closes #2010

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 15, 2026

Deploy Preview for activist-org ready!

Name Link
🔨 Latest commit e436126
🔍 Latest deploy log https://app.netlify.com/projects/activist-org/deploys/69b8760f4aae5700081f837b
😎 Deploy Preview https://deploy-preview-2011--activist-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for the pull request! ❤️

The activist team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and Development rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the Development room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

activist uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Copy Markdown
Contributor

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link
Copy Markdown
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Approving assuming tests pass ✅

praise: Thanks for the quick work here, @Ayananth! Really a nice addition that will make it easier for us to do presentations with specific data in the future :)

One thing that I'm thinking is that it would be nice to have the activist organization be filtered as the top organization in dev mode so that we're always dogfeeding the platform in dev mode. Maybe you'd want to look into this? I'll make an issue and ping you! 😊

@andrewtavis andrewtavis merged commit 17fc942 into activist-org:main Mar 16, 2026
11 checks passed
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.

Switch data loaded into dev environment over to YAML from JSON

2 participants