ScilifelabDataCentre / Publications

A web-based publications reference database system.
MIT License
10 stars 3 forks source link

Publications

A web-based publications reference database system.

Features

Important changes

Implementation

This system requires Python 3.6 or higher.

Front-end (via CDN's)

Back-end (installed on server)

Installation

  1. NOTE: tornado is difficult (even impossible?) to set up on Windows systems, so Linux is strongly recommended.

  2. Ensure that you have Python 3.9 or higher.

  3. Your Python environment must include the Publications directory in its path, e.g.:

    $ cd wherever/Publications
    $ export PYTHONPATH=$PWd
  4. Install the required Python modules (see Publications/requirements.txt)

  5. Ensure that you have the CouchDB server installed and running.

  6. Create the database publications in the CouchDB server using its own interface. Ensure that the database allows read/write access for the CouchDB server account of your choice. Record the CouchDB server account name and password for the settings.yaml file (see below).

  7. Copy the directory Publications/site_template and all its contents to Publications/site. The latter directory contains files that can or should be modified for your site.

  8. Edit your settings file Publications/site/settings.yaml. In particular, set the CouchDB connection, site name, etc.

  9. The Publications CouchDB database must be initialized using the CLI. This also tests that the CouchDB variables in the settings.yaml file are correct.

    $ python cli.py initialize
  10. Create an admin account using the CLI. This admin account is needed to create other accounts (admin or curator) in the web interface.

    $ python cli.py admin
  11. Set up the tornado web server to start on boot, using the port number you have defined in the settings.yaml file. You need to figure this out yourself.

  12. Set a proxy from your outward-facing web server (Apache, nginx, or whatever your site supports) for the tornado server. You need to figure this out yourself.

Command-line interface

There is a command-line interface (CLI) for admin work on the machine the system is running on. See its help texts. The top-level help text is:

$ python cli.py --help
Usage: cli.py [OPTIONS] COMMAND [ARGS]...

Options:
  -s, --settings TEXT  Name of settings YAML file.
  --log                Enable logging output.
  --help               Show this message and exit.

Commands:
  add-label        Add a label to a set of publications.
  admin            Create a user account having the admin role.
  counts           Output counts of database entities.
  curator          Create a user account having the curator role.
  dump             Dump all data in the database to a .tar.gz dump file.
  fetch            Fetch publications given a file containing PMIDs...
  find-pmid        Find the PMID for the publications in the CSV file.
  initialize       Initialize the database, which must exist; load all...
  password         Set the password for the given account.
  remove-label     Remove a label from a set of publications.
  select           Select a subset of publications and output to a file.
  show             Display the JSON for the single item in the database.
  undump           Load a Publications database .tar.gz dump file.
  update-crossref  Use Crossref to update the publications in the CSV file.
  update-pubmed    Use PubMed to update the publications in the CSV file.
  xrefs            Output all xrefs as CSV data to the given file.

Example instances