From b667a52535b01736083371b20cbcc4b7e5ef036c Mon Sep 17 00:00:00 2001 From: Gesina Phillips Date: Thu, 1 Feb 2024 14:24:17 -0500 Subject: [PATCH] cleanup --- .github/workflows/isort.yml | 4 ++-- README.md | 17 +++++++++++------ pyproject.toml | 1 - tests/test_fastq_validator_logic.py | 1 + 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml index db105a8..8802cf3 100644 --- a/.github/workflows/isort.yml +++ b/.github/workflows/isort.yml @@ -11,5 +11,5 @@ jobs: python-version: 3.9 - uses: isort/isort-action@master with: - configuration: "--check-only --diff --profile black" - requirementsFiles: "requirements.txt requirements-test.txt" + configuration: "--check-only --diff --profile black --multi-line 3" + requirementsFiles: "requirements.txt requirements-test.txt" diff --git a/README.md b/README.md index 5ff0ca9..81be8dc 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,12 @@ This repository contains plug-in tests for use during validation of submissions. - Make new feature branches from `devel`. - Before submitting a PR, make sure your code is black and isort compliant. Run the following from the base `ingest-validation-tests` directory: - - `black --line-length 99 .` (you can integrate black with your editor to skip this step, see Setup section below) - - `isort .` + ``` + black --line-length 99 . + isort --profile black --multi-line 3 . + ``` + + (You can integrate black and potentially isort with your editor to skip this step, see Setup section below) - Make PRs to `devel`. (This is the default branch.) - The last reviewer to approve a PR should merge it. @@ -19,14 +23,15 @@ This repository contains plug-in tests for use during validation of submissions. - 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 -``` + ``` + 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) +- (optional) Integrate isort with your editor. ### Testing diff --git a/pyproject.toml b/pyproject.toml index 72dd8d9..93863fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,3 @@ line-length = 99 [tool.isort] profile = "black" multi_line_output = 3 -src_paths = ["src/ingest-validation-tests"] diff --git a/tests/test_fastq_validator_logic.py b/tests/test_fastq_validator_logic.py index c554d6f..31bd68a 100644 --- a/tests/test_fastq_validator_logic.py +++ b/tests/test_fastq_validator_logic.py @@ -3,6 +3,7 @@ from typing import TextIO import pytest + from src.ingest_validation_tests.fastq_validator_logic import FASTQValidatorLogic _GOOD_RECORDS = """\