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

how to add some tests? #41

Open
bwheelz36 opened this issue Mar 5, 2023 · 0 comments
Open

how to add some tests? #41

bwheelz36 opened this issue Mar 5, 2023 · 0 comments
Assignees

Comments

@bwheelz36
Copy link
Member

It would be nice to have some tests that the code is working. At a minimum, a script which sets up and deploys the server so we can check this runs without issues (also checks that dependencies are correct etc.).

I can almost write this script already, the main questions are:

  • how to autocreate a super user when prompted?
  • once we deploy, appropriate way in bash to check that it has worked, then shut it down elegantly (may need to start in a seperate process?)

I've put example below with comments indicating the steps I'm unsure of.

git clone https://github.com/ACRF-Image-X-Institute/scientific-method-app.git
cd scientific-method-app/
python3 -m venv venv  # create virtual environement
source venv/bin/activate   # activate environment
pip install -r requirements.txt  # install requirements
python manage.py makemigrations  # set up app as per readme
python3 manage.py migrate
python3 manage.py createsuperuser  # here, we get prompted for text input; how to handle this automatically?
python3 manage.py runserver  # how can we test this this worked properly, then shut it down elegaantly?
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

No branches or pull requests

3 participants