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(test-data): Adds 'create_dummy_data' command #1064

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Jun 17, 2024

  1. feat(test-data): Adds 'create_dummy_data' command

    Adds 'create_dummy_data' command to generate test data to use when developing.
    
    Changes provider 'Activity' (which creates fake activity names) to allow specifying a year instead of using random.
    Dansk-Torskerognsforening committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    d7c12f0 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. fix(test-data): departments end date & address errors

    Departments no longer uses a factory that creates a "closed_dtm". but is set to None. This fixes a bug that made departments closed.
    
    Departments' address.region is now the region of their union.
    
    Unions are now in the right region.
    
    Also includes minor code additions to prepare for a refactoring of handle() and the UNIONS_TO_CREATE list.
    Dansk-Torskerognsforening committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    cd01c94 View commit details
    Browse the repository at this point in the history
  2. refactor(test-data): "Region" no longer part of union names

    Each union used to be named "Region ____". which made it easy to use the union's name as the name of the region too (since there's a union for each region).
    
    However this made the names wierd, because the union for Syddanmark should be named "Syddanmark", not "Region Syddanmark". The commit refactors the UNIONS_TO_CREATE list to contain named tuples which has "union_name" and "region_name". This
    fixes the wierd names and makes it possible to have a union be called something completely unrelated to the region its in, should you want that.
    Dansk-Torskerognsforening committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    a25ce9b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3ba9332 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2024

  1. refactor(test-data): move waitlist setup to function

    Setup of the waitlist, is moved into its own _setup_waitlist() function. It creates two children and puts them on a waitlist for two departments (which handle() supplies)
    
    The function is very 'static' and only does what is required (no parameters for alternative options). Hopefully, moving the code to its own function. will provide an easier opportunity to expand it later on.
    
    This update also fixes a bug with the help text.
    Dansk-Torskerognsforening committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    e821866 View commit details
    Browse the repository at this point in the history
  2. fix(test-data): signup_closing is before script has run

    The ActivityFactory made the signup_closing field be a date +/-100 days from when the script was run. This made some acitivities not show up in the activities overview of the website, since the signup had already closed. This is now fixed by setting signup_closed to a date 1-10 days in the future.
    Dansk-Torskerognsforening committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    fd15dcd View commit details
    Browse the repository at this point in the history