Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

workflowr/workflowr.io-django

Repository files navigation

ARCHIVED: I instead decided to deploy workflowr.io using a combination of the static site generator Hugo (website source code at workflowr/workflowr.io) and a GitHub app (also named workflowr.io) to register projects.

workflowr.io

A website to share and discover workflowr projects.

Setup computational environment

The software dependencies are managed by conda and specified in environment.yml. Install Miniconda to get started.

# Create the environment
conda env create --file environment.yml

# Activate the environment
conda activate wio

# Update the environment
conda env update --file environment.yml

# Deactivate the environment
conda deactivate wio

Development

# Run the test suite
python manage.py test

# Restart database for interactive testing
bash setup-models.sh

# Create a temporary superuser for testing the site
bash createsuperuser.sh

# Run the development server (http://localhost:8000/)
python manage.py runserver

# Start an interactive shell with Django settings activated
python manage.py shell

Heroku

# Install Heroku CLI app
sudo snap install heroku --classic

# Login (opens browser for authentication)
heroku login

# Run the development server (http://localhost:5000/)
heroku local web

# Add heroku remote
git remote add  heroku https://git.heroku.com/workflowr.git

# Deploy the site
git push heroku master

# Open the site in the browser
heroku open

# View the server logs
heroku logs --tail

# View currently used resources
heroku ps

# Start an interactive shell on the remote server
heroku run python manage.py shell

# Run the database migrations on the remote server
heroku run python manage.py migrate

Endpoints

  • projects/ - List all projects
  • projects/github/ - List all projects hosted on GitHub
  • projects/github/user/ - List all of user's projects hosted on GitHub
  • projects/github/user/project/ - Detail view for project
  • authors/ - List all authors
  • tags/ - List all tags
  • tag/tagname/ - List all projects tagged with "tagname"
  • publications/ - List all publications

Create a UML diagram of database schema

Use the graph_models feature of django-extensions to create a UML diagram of the database schema specified in projects/models.py.

conda activate wio
python manage.py graph_models --pydot projects -o graph-model.png

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published