Skip to content

fairdataihub/cwl-validator-api

Repository files navigation

cwl-validator

Getting started

Prerequisites/Dependencies

You will need the following installed on your system:

Setup

If you would like to update the api, please follow the instructions below.

  1. Create a local virtual environment and activate it:

    python -m venv .venv
    source .venv/bin/activate

    If you are using Anaconda, you can create a virtual environment with:

    conda create -n cwl-validator-dev-env python=3.10
    conda activate cwl-validator-dev-env
  2. Install the dependencies for this package. We use Poetry to manage the dependencies:

    pip install poetry==1.3.2
    poetry install

    You can also use version 1.2.0 of Poetry, but you will need to run poetry lock after installing the dependencies.

  3. Add your environment variables. An example is provided at .env.example

    cp .env.example .env

    Make sure to update the values in .env to match your local setup.

  4. Add your modifications and run the tests:

    poetry run pytest

    If you need to add new python packages, you can use Poetry to add them:

     poetry add <package-name>
  5. Format the code:

    poe format
  6. Check the code quality:

    poe typecheck
    poe lint
    poe flake8

    You can also use poe precommit to run both formatting and linting.

  7. Run the tests and check the code coverage:

    poe test
    poe test_with_capture # if you want to see console output

Running

For developer mode:

poe dev

or

flask run --debug

For production mode:

python3 app.py --host $HOST --port $PORT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors