From 69740fe0e2fc4eceabc5bf825cc3deb0a715cda0 Mon Sep 17 00:00:00 2001 From: Katherine Heal Date: Thu, 12 Dec 2024 16:43:47 -0800 Subject: [PATCH] Stage changes for two tied versions to bump --- .bumpversion.cfg | 4 +-- .bumpversion_lipid.cfg | 17 ++++++++++++ MAINTAINERS.md | 61 ++++++++++++++++++++++++++++++++++++++++++ Makefile | 15 +++++++++++ 4 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 .bumpversion_lipid.cfg create mode 100644 MAINTAINERS.md diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 3f91160..b3f684b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -18,6 +18,4 @@ values = [bumpversion:file:metaMS/__init__.py] -[bumpversion:file:docs/index.rst] - -[bumpversion:file:metaMS/nmdc_lipidomics_metadata_generation/metadata_generator.py] +[bumpversion:file:docs/index.rst] \ No newline at end of file diff --git a/.bumpversion_lipid.cfg b/.bumpversion_lipid.cfg new file mode 100644 index 0000000..4c1f291 --- /dev/null +++ b/.bumpversion_lipid.cfg @@ -0,0 +1,17 @@ +[bumpversion] +current_version = 1.0.0 +commit = False +tag = False + +[bumpversion:part:release] +optional_value = rc1 +values = + alpha + beta + rc1 + rc2 + rc3 + +[bumpversion:file:docs/index_lipid.md] + +[bumpversion:file:metaMS/nmdc_lipidomics_metadata_generation/metadata_generator.py] \ No newline at end of file diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 0000000..b3ecd74 --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,61 @@ +# Developer Guide + +## Table of Contents +1. [Introduction](#introduction) +2. [Setting Up the Development Environment](#setting-up-the-development-environment) +3. [Pushing Docker Images](#pushing-docker-images) +4. [Generating Documentation](#generating-documentation) +5. [Bumping Version Numbers](#bumping-version-numbers) + +## 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: + ```sh + git clone https://github.com/your-repo/metams.git + cd metams + ``` +2. Install dependencies: + ```sh + pip install -r requirements.txt + ``` +3. Install developer-specific dependencies + ```sh + pip install -r requirements-dev.txt + ``` + +## Steps to releasing a new version + +### Pushing Updated Docker Image +You must be logged into docker hub +1. Build the push the tagged docker image + ```sh + make docker-nmdc + ``` + +### Bumping Version Numbers +The versioning of the repo, docker image and the GC/MS workflow are currently 2.2.3 +The version of the lipid workflow is currently 1.0.0 + +To bump *both* the repo and the lipid workflow, run one of the following commands. + + ```sh + make major + ``` + + ```sh + make minor + ``` + + ```sh + make patch + ``` + +### Generate Documentation +Documentation of the two workflows can be found the docs folder of this repo. + +For the lipidomics workflow, edit only the `docs/index_lipid.rst` file. Once changes are made there, re-render the `docs/index_lipid.html` and the `docs/README_LCMS_LIPID.md` with the following command. This should happen after the version numbers are bumped. + ```sh + make convert_lipid_rst_to_md + ``` diff --git a/Makefile b/Makefile index e980cba..7cb6bc0 100644 --- a/Makefile +++ b/Makefile @@ -17,14 +17,29 @@ mem: major: @bumpversion major --allow-dirty + @bumpversion major --allow-dirty --config-file .bumpversion_lipid.cfg minor: @bumpversion minor --allow-dirty + @bumpversion minor --allow-dirty --config-file .bumpversion_lipid.cfg patch: @bumpversion patch --allow-dirty + @bumpversion patch --allow-dirty --config-file .bumpversion_lipid.cfg + +bump_lipid_major: + + @bumpversion major --allow-dirty --config-file .bumpversion_lipid.cfg + +bump_lipid_minor: + + @bumpversion minor --allow-dirty --config-file .bumpversion_lipid.cfg + +bump_lipid_patch: + + @bumpversion patch --allow-dirty --config-file .bumpversion_lipid.cfg install: @source venv/bin/activate