A Django app which defines a database and API to data related to yeast gene regulation
License: GPLv3
Moved to settings.
- 
To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.
 - 
To create a superuser account, use this command:
 
  python manage.py createsuperuserFor convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
Running type checks with mypy:
  mypy yeastregulatorydb- there is an issue accessing 
Models.objectsthat is unresolved. See issue 1684. I choose to resolve this by ignoring the attr-defined error when accessingModel.objects(see any viewset for an example). Note that in cases where a custom manager is defined, I use _default_manager (see django docs). This raises a "accessing private method" warning in pylint, which is also ignored. 
To run the tests, check your test coverage, and generate an HTML coverage report:
  coverage run -m pytest
  coverage html
  open htmlcov/index.html  pytestNOTE: if major changes are made to the database, it may be necesary to
remove --reuse-db from the addopts key of the pytest section of
pyproject.toml. It can be added back after a run without it.
Moved to Live reloading and SASS compilation.
This app comes with Celery.
To run a celery worker:
cd yeastregulatorydb
celery -A config.celery_app worker -l infoPlease note: For Celery's import magic to work, it is important where the celery commands are run. If you are in the same folder with manage.py, you should be right.
To run periodic tasks, you'll need to start the celery beat scheduler service. You can start it as a standalone process:
cd yeastregulatorydb
celery -A config.celery_app beator you can embed the beat service inside a worker with the -B option (not recommended for production use):
cd yeastregulatorydb
celery -A config.celery_app worker -B -l infoTo run the CI that is in this repo, you need to transform the .envs directory
into a binary string and save it as a secret. This can be done like so:
tar -czvf envs.tar.gz .envs
base64 envs.tar.gz > .tmp.txtThen, go to the settings of the repo, and add a secret called ENV_FILE with
the string in .tmp.txt. Make sure that and the .tar.gz does not get pushed to
git.
The following details how to deploy this application.
See detailed cookiecutter-django Docker documentation.
I am using version 2023.12.06 and set the following options:
➜  code cookiecutter https://github.com/cookiecutter/cookiecutter-django
You've downloaded /home/oguzkhan/.cookiecutters/cookiecutter-django before. Is
it okay to delete and re-download it? [y/n] (y): y
  [1/27] project_name (My Awesome Project): YeastRegulatoryDB
  [2/27] project_slug (yeastregulatorydb):
  [3/27] description (Behold My Awesome Project!): A Django app which defines a database and API to data related to yeast gene regulation
  [4/27] author_name (Daniel Roy Greenfeld): Chase Mateusiak
  [5/27] domain_name (example.com): example.com
  [6/27] email ([email protected]): [email protected]
  [7/27] version (0.1.0): 0.0.0dev
  [8/27] Select open_source_license
    1 - MIT
    2 - BSD
    3 - GPLv3
    4 - Apache Software License 2.0
    5 - Not open source
    Choose from [1/2/3/4/5] (1): 3
  [9/27] Select username_type
    1 - username
    2 - email
    Choose from [1/2] (1): 1
  [10/27] timezone (UTC): America/Chicago
  [11/27] windows (n): n
  [12/27] Select editor
    1 - None
    2 - PyCharm
    3 - VS Code
    Choose from [1/2/3] (1): 3
  [13/27] use_docker (n): y
  [14/27] Select postgresql_version
    1 - 15
    2 - 14
    3 - 13
    4 - 12
    5 - 11
    6 - 10
    Choose from [1/2/3/4/5/6] (1): 1
  [15/27] Select cloud_provider
    1 - AWS
    2 - GCP
    3 - Azure
    4 - None
    Choose from [1/2/3/4] (1): 1
  [16/27] Select mail_service
    1 - Mailgun
    2 - Amazon SES
    3 - Mailjet
    4 - Mandrill
    5 - Postmark
    6 - Sendgrid
    7 - SendinBlue
    8 - SparkPost
    9 - Other SMTP
    Choose from [1/2/3/4/5/6/7/8/9] (1): 2
  [17/27] use_async (n): y
  [18/27] use_drf (n): y
  [19/27] Select frontend_pipeline
    1 - None
    2 - Django Compressor
    3 - Gulp
    4 - Webpack
    Choose from [1/2/3/4] (1): 1
  [20/27] use_celery (n): y
  [21/27] use_mailpit (n): n
  [22/27] use_sentry (n): n
  [23/27] use_whitenoise (n): y
  [24/27] use_heroku (n): n
  [25/27] Select ci_tool
    1 - None
    2 - Travis
    3 - Gitlab
    4 - Github
    5 - Drone
    Choose from [1/2/3/4/5] (1): 4
  [26/27] keep_local_envs_in_vcs (y): n
  [27/27] debug (n): n