From 49f9db48974c2fa215cb1f6868d48e63e9a516ec Mon Sep 17 00:00:00 2001 From: Gesina Phillips Date: Thu, 1 Feb 2024 12:40:50 -0500 Subject: [PATCH] testing black gh action --- .github/workflows/black.yml | 14 +++++++++++++ README.md | 42 +++++++++++++++++++++++++++++++++++-- requirements-dev.txt | 2 +- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/black.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0000000..a4a0460 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,14 @@ +name: Lint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: psf/black@stable + with: + options: "--check --verbose --line-length 99" + src: "./src" + version: "~= 24.0" diff --git a/README.md b/README.md index 2db444a..033f5b4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,47 @@ # ingest-validation-tests -This repository contains plug-in tests for use during validation of submissions. It is referenced by ingest-validation-tools. +This repository contains plug-in tests for use during validation of submissions. It is referenced by ingest-validation-tools. ## Development process +### Branches + - Make new feature branches from `devel`. - Make PRs to `devel`. (This is the default branch.) -- The last reviewer to approve a PR should merge it. At the moment that is likely to be @jswelling . +- The last reviewer to approve a PR should merge it. + +### Setup + +- Creating and activating a virtual environment is recommended. These instructions assume you are using a virtual environment. Example using venv: + +``` +python3.9 -m venv hm-ingest-validation-tests +source hm-ingest-validation-tests/bin/activate +``` + +- Run `pip install -r requirements-dev.txt` +- (optional) Integrate black with your editor. + - [Instructions for black.](https://black.readthedocs.io/en/stable/integrations/editors.html) + - If you choose not to integrate black with your editor, run the following from the base `ingest-validation-tests` directory before pushing code to GitHub: `black --line-length 99 .` + +### Testing + +- If ingest-validation-tools is not already set up: + +``` +# Starting from ingest-validation-tests... +cd .. +git clone https://github.com/hubmapconsortium/ingest-validation-tools.git +cd ingest-validation-tests +pip install -r ../ingest-validation-tools/requirements.txt +pip install -r ../ingest-validation-tools/requirements-dev.txt +``` + +- If ingest-validation-tools is already set up, add the appropriate ingest-validation-tools path and run + +``` +pip install -r /requirements.txt +pip install -r /requirements-dev.txt +``` + +- Run `test.sh` diff --git a/requirements-dev.txt b/requirements-dev.txt index d5c087a..2cd9d49 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,10 @@ black==23.12.1 -flake8==7.0.0 git+https://github.com/hubmapconsortium/fastq-utils.git@v0.2.5#egg=hubmap-fastq-utils imagecodecs>=2023.3.16 isort==5.13.2 jsonschema==4.4.0 pandas>=1.2.0 +pytest==8.0.0 python-frontmatter>=1.0.0 tifffile==2020.10.1 xmlschema>=1.6