From 89fcea1b7be4299234c6b3a0b33178737ce348da Mon Sep 17 00:00:00 2001 From: cclint Date: Wed, 25 Jun 2025 23:22:07 -0600 Subject: [PATCH 1/2] add linting --- .github/workflows/test.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ba9948..55a524b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: python-version: ["3.11", "3.12"] steps: - - name: Checkout repo + - name: Checkout repository uses: actions/checkout@v3 - name: Set up Python @@ -26,9 +26,18 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + pip install -e ".[trusted-node]" # editable mode with optional extras pip install -r requirements.txt - pip install -e . - pip install pytest + pip install pytest pytest-cov black flake8 mypy - - name: Run tests - run: pytest + - name: Check code formatting with Black + run: black --check csb_validator tests + + - name: Lint with flake8 + run: flake8 csb_validator tests + + - name: Static type check with mypy + run: mypy csb_validator + + - name: Run tests with coverage + run: pytest --cov=csb_validator --cov-report=term-missing From cc6b400b725de83b40ebc402f308f8dbbfa58587 Mon Sep 17 00:00:00 2001 From: cclint Date: Wed, 25 Jun 2025 23:27:48 -0600 Subject: [PATCH 2/2] black out --- setup.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index df7498c..8ea8c8b 100644 --- a/setup.py +++ b/setup.py @@ -8,15 +8,8 @@ author_email="clint.campbell@colorado.edu", url="https://github.com/CI-CMG/csb-validator", packages=find_packages(), - install_requires=[ - "aiofiles", - "fpdf", - "colorama", - "csbschema" - ], - extras_require={ - "trusted-node": ["csbschema"] - }, + install_requires=["aiofiles", "fpdf", "colorama", "csbschema"], + extras_require={"trusted-node": ["csbschema"]}, entry_points={ "console_scripts": [ "csb-validator=csb_validator.cli:main",