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

✊ Representation #23

Merged
merged 9 commits into from
Apr 14, 2023
Merged

✊ Representation #23

merged 9 commits into from
Apr 14, 2023

Conversation

mrharpo
Copy link
Contributor

@mrharpo mrharpo commented Apr 14, 2023

Representation

  • Adds __admin__repr__ to models from the starlette-admin docs
    • Returns string to display in admin interface
    • Can also use __admin_select2_repr__ to return HTML snippet

Screen Shot 2023-04-14 at 08 42 54

Faker

  • Added custom CLAMSProvider for CLAMS specific faking
    • app_name Creates a random app-{NAME}
    • guid Creates a random cpb-aacip-* guid
    • collection_name: Creates a {PERSON} Collection or {TITLE} Collection
    • batch_name: Creates a Batch: {RANDOM_INT}
    • title: Creates a 1-10 word Title Case Sentence
  • Improved faker functions to match fields better

Models

  • Added AppStatus Enum
    • PENDING | RUNNING | COMPLETED | FAILED

Factories

  • Added UserFactory

Seed

  • Improved some seeding logic
  • Added documentation for steps

afred and others added 8 commits April 13, 2023 10:24
Also:
* Relates ClamsEvent to Batch, rather than Pipeline. This was a mistake in the data model.
* Swaps flake8 for ruff 🐶
* Refactors database engine config
  * Consolidates DB config into db.py
  * Db config is chosen by environment variable ENVIRONMENT, default to 'development'.
  * Test db uses in-memory db, development db uses sqlite. Production db will eventually
    use postres probably, but not defined yet.

Co-authored-by: Harpo Harbert <ryan_harbert@wgbh.org>
* main:
  Adds update dependencies workflow (#20)
  🌱 Seed (#21)
@mrharpo mrharpo added this to the v0.2.0 Views 👁 milestone Apr 14, 2023
@mrharpo mrharpo requested a review from afred April 14, 2023 15:04
@mrharpo mrharpo self-assigned this Apr 14, 2023
@mrharpo mrharpo temporarily deployed to Codecov April 14, 2023 15:05 — with GitHub Actions Inactive
@mrharpo mrharpo temporarily deployed to Codecov April 14, 2023 15:08 — with GitHub Actions Inactive
@mrharpo mrharpo temporarily deployed to Codecov April 14, 2023 15:08 — with GitHub Actions Inactive
Copy link
Contributor

@afred afred left a comment

Choose a reason for hiding this comment

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

👍 looks great!

@afred afred merged commit f72558c into main Apr 14, 2023
@afred afred deleted the repr2 branch April 14, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants