uwscope / scope-web

0 stars 5 forks source link

scope-web

Core UW Scope components, including:

Development Environment

With prerequisites:

A typical registry development environment then:

invoke depend.install.all        # Install all dependencies.
invoke dev.registry.serve        # Serve the registry client, listening on `localhost:3000`, including hot reloading.
invoke dev.server.flask.serve    # Start Flask, listening on `localhost:4000`, including hot reloading.

The registry web client will then be accessible at http://localhost:3000/.

Using Invoke

This project uses Invoke for task execution.

invoke -l

For example:

Available tasks:

  database.forward          Forward the database cluster, listening on `localhost:5000`.
  depend.install.all        Install all dependencies.
  depend.install.flask      Install flask dependencies.
  depend.install.registry   Install registry dependencies.
  depend.install.tasks      Install tasks dependencies.
  depend.update.all         Update all dependencies.
  depend.update.flask       Update flask dependencies.
  depend.update.registry    Update registry dependencies.
  depend.update.tasks       Update tasks dependencies.
  dev.registry.serve        Serve the registry client, listening on `localhost:3000`, including hot reloading.
  dev.server.flask.serve    Start Flask, listening on `localhost:4000`, including hot reloading.
  prod.registry.build       Build a bundle of the registry client.
  prod.registry.serve       Serve a bundle of the registry client, listening on `0.0.0.0:3000`.
  prod.server.flask.serve   Start Flask, listening on `0.0.0.0:4000`.

Providing Secrets

Runtime secrets are expected in the secrets directory.

Database Access

Contents of the database cluster can be directly inspected using:

Installation of System Dependencies

Requires availability of Git, of Javascript dependencies, and of Python dependencies.

Git

Requires a Git executable on the path.

Javascript

For Javascript components, requires Node.js and the Yarn package manager.

Python

For Python components, requires Python and the Pipenv package manager.

Initializing and Using Pipenv

Pipenv creates a Python virtual environment that includes the dependencies in a Pipfile.lock. You must first initialize the virtual environment, then activate a shell within the virtual environment.

Initializing Pipenv

Ensure Pipenv is installed and the pipenv command is accessible, as in Installation of System Dependencies:

pipenv --version

Initialize a virtual environment by using the pipenv command to install the Pipfile.lock dependencies:

pipenv sync

Then activate a shell inside the created virtual environment.

On Windows:

On a Mac:

Using Pipenv

Within a Pipenv shell, all commands benefit from dependencies in Pipfile and Pipfile.lock. See examples in Development Environment and in Using Invoke.

This project's development dependencies also include Pipenv, so the pipenv command is available locally (e.g., without a need to reference a specific global installation).