Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 4.2 KB

File metadata and controls

81 lines (62 loc) · 4.2 KB

Developer Guide

Table of Contents

  1. Introduction
  2. Setting Up the Development Environment
  3. Testing a new or modified workflow
  4. Releasing a new version
    1. Bump Version Numbers
    2. Push Updated Docker Image
  5. Generate Documentation

Introduction

This guide provides instructions for developers working on the project. It covers setting up the development environment, pushing Docker images, generating documentation, and bumping version numbers.

Setting Up the Development Environment

  1. Clone the repository:
    git clone https://github.com/your-repo/metams.git
    cd metams
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:
    pip install -r requirements.txt
  4. Install developer-specific dependencies:
    pip install -r requirements-dev.txt

Testing a new or modified workflow

To test a workflow before an associated docker image is pushed, you can run the workflow locally using the docker image that is built locally according to the dockerfile in the workflow directory. To do this, your wdl must have the option to change the docker image in which the workflow is run, and this image must be specified in the input json file. For example, the following command will run the lipidomcis workflow using the docker image that is built locally. See the input file here for an example of how to specify the docker image in the input file.

```sh
miniwdl run wdl/metaMS_lcmslipidomics.wdl -i wdl/metams_input_lipidomics_local_docker.json --verbose --no-cache --copy-input-files
```

Releasing a new version

The following steps should be followed in order

Bump Version Numbers

The versioning of the repo, docker image and the GC/MS workflow are currently 3.5.1. The version of the lipid workflow is currently 1.5.1. The version of the LCMS metabolomics workflow is currently 1.3.1.

To bump the repo and all workflows, run one of the following commands. This will update the runtime version of all of the workflows, the version of the repo and the version of the docker image.

```sh
make major
```

```sh
make minor
```

```sh
make patch
```

Push Updated Docker Image

Use the github action to push a docker image to the appropriate dockerhub repository. This will use the version number that was set in the previous step and will build and push a docker image according to the dockerfile in the root of the repo. The docker image will be tagged with the version number and the latest tag.

Generating Documentation

This happens automatically with bumping versions if using the make major commands (or similar) above. Overview documentation of the two workflows can be found the docs folder of this repo.

For the workflow overview documentation, edit only the corresponding index.rst files in the docs folder. For example, to edit the documentation for the GC/MS workflow, edit the index.rst file in the docs/gcms folder. To edit the documentation for the lipidomics workflow, edit the index.rst file in the docs/lipidomics folder. To edit the documentation for the LCMS metabolomics workflow, edit the index.rst file in the docs/lcmsmetabolomics folder. The html versions of the overview documentation is generated with the same makefile command as the API documentation, which is make docu. This will generate the html versions of the overview documentation in the docs/_build/html folder. The html versions of the overview documentation are used in the github pages site for this repo.

API documentation can be found in the docs/metaMS file. We use pdoc to generate the API documentation. To regenerate the API documentation, run the following command. Note that this happens automatically with bumping versions if using the make major commands (or similar) above.

```sh
make docu
```