Histonets is a Django app built on top of OpenCV and scikit-{learn,image}
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
.envs/.local
assets
compose
config Fixes #4. Also adds task execution for AWS May 31, 2018
docs
histonets
locale
requirements Fixes #4. Also adds task execution for AWS May 31, 2018
scripts
utility
.babelrc
.coveragerc
.dockerignore
.editorconfig
.eslintignore
.eslintrc.json
.gitattributes
.gitignore
.prettierrc
.pylintrc
.travis.yml
CONTRIBUTORS.txt Initial commit for the new Histonets web interface 🔥 Mar 16, 2018
LICENSE Initial commit for the new Histonets web interface 🔥 Mar 16, 2018
Procfile
README.rst
local.yml
manage.py
merge_production_dotenvs_in_dotenv.py
package-lock.json
package.json
production.yml
pytest.ini
requirements.txt Initial commit for the new Histonets web interface 🔥 Mar 16, 2018
runtime.txt
setup.cfg
webpack.config.js
yarn.lock

README.rst

Histonets

From scanned map images to graph data

Built with Cookiecutter Django https://circleci.com/gh/sul-cidr/histonets-arch.svg?style=svg
License:MIT

Settings

Moved to settings.

Basic Commands

Setting Up Your Users

  • 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 an superuser account, use this command:

    $ python manage.py createsuperuser
    

For 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.

Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ coverage run manage.py test
$ coverage html
$ open htmlcov/index.html
$ yarn coverage

Running tests with py.test

$ py.test

And for JS files

$ yarn test

Live reloading and Sass CSS compilation

Moved to Live reloading and SASS compilation.

Webpack hot reloading is also supported by default when files in assets are modified.

Celery

This app comes with Celery.

To run a celery worker:

cd histonets
celery -A histonets.taskapp worker -l info

Please 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.

If using Docker, a Flower image is included listening on port 5555.

Email Server

In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server MailHog with a web interface is available as docker container.

Container mailhog will start automatically when you will run all docker containers. Please check cookiecutter-django Docker documentation for more details how to start all containers.

With MailHog running, to view messages that are sent by your application, open your browser and go to http://127.0.0.1:8025

IIIF Image Server

A dockerized version of Cantaloupe is also available and setup in the compose config file. The service takes a number of properties defined in a cantaloupe.properties file and it starts by default at http://127.0.0.1:8182 with the admin interface at http://127.0.0.1:8182/admin.

Images placed in /media/iiif will get IIIF by default. For example, the image /media/iiif/ghostdriver.jpg will have its info.json descriptor at http://localhost:8182/iiif/2/ghostdriver.jpg/info.json, and the image itself will be available at http://localhost:8182/iiif/2/ghostdriver.jpg/full/full/0/default.jpg.

Docker

A docker-compose config file is provided for local development. For convenience, a couple of scripts are include as well:

  • scripts/exec.sh, that runs a command inside a specific container (e.g., ./scripts/run.sh django flake8)
  • scripts/run.sh, that runs a command in a new container instance (e.g., ./scripts/run.sh django flake8)
  • scripts/dev.sh, that starts all servers and builds, recreates, or removes images if necessary.
  • scripts/destroy.sh, that removes all containers, Docker images, and orphans. The option --volumes can also be passed in to remove all associated volumes (such as those use by PostgreSQL).

Deployment

The following details how to deploy this application.

Heroku

See detailed cookiecutter-django Heroku documentation.

Docker

See detailed cookiecutter-django Docker documentation.