From 9e21381c5f453dae464d900d3bd8a0147ac78360 Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:19:59 -0400 Subject: [PATCH 1/7] bump python version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ed328c5..d613640 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ description = "Solar polarization resolver for any instrument" readme = "README.md" license = { file="LICENSE" } -requires-python = ">=3.8" +requires-python = ">=3.10" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", From 7a7028578eb4c45b01d077daadb53f022f4607e0 Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:22:28 -0400 Subject: [PATCH 2/7] Update CI.yml --- .github/workflows/CI.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 21e81e5..a1757e7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,3 +1,6 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + name: CI on: @@ -17,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -28,18 +31,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest pytest-cov hypothesis - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 + pip install ".[test]" + - name: Lint with ruff run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + ruff check . - name: Test with pytest run: | pip install . - pytest --cov=solpolpy tests/ --cov-report xml:/home/runner/coverage.xml + python setup.py pytest --addopts "--cov ." - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 env: From eca9bdfb9ad44ca07a70d78ba1075f834887f9a0 Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:22:53 -0400 Subject: [PATCH 3/7] Delete requirements_dev.txt --- requirements_dev.txt | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 requirements_dev.txt diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index c2558ac..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,12 +0,0 @@ -sunpy~=5.1 -astropy~=6.0 -numpy~=1.26 -matplotlib~=3.9 -networkx~=3.3 -ndcube~=2.2 - -ruff -pytest -coverage -pytest-cov -pre-commit From ea95cd59bc6e6bdecdea9b9775164c34d05bc914 Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:25:04 -0400 Subject: [PATCH 4/7] Update pyproject.toml --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d613640..48b4631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,8 @@ dependencies = [ test = [ 'pytest', 'coverage', - 'pytest-cov' + 'pytest-cov', + 'ruff' ] [build-system] From fff862f71a09542a62271f3fbb8dc3b960ab7c2b Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:26:51 -0400 Subject: [PATCH 5/7] fix coverage test --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1757e7..7bbd168 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,7 +38,7 @@ jobs: - name: Test with pytest run: | pip install . - python setup.py pytest --addopts "--cov ." + pytest --cov=solpolpy tests/ --cov-report xml:/home/runner/coverage.xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 env: From 79b7ada46c00326e187e54f7337051f6a4b4a8f9 Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:29:16 -0400 Subject: [PATCH 6/7] Delete requirements.txt --- requirements.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b2c3838..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -sunpy~=5.1 -astropy~=6.0 -numpy~=1.26 -matplotlib~=3.9 -networkx~=3.3 -ndcube~=2.2 From 033e6cd27ea6224409ac170d8891bcfc5c420bc9 Mon Sep 17 00:00:00 2001 From: Marcus Hughes Date: Mon, 3 Jun 2024 14:29:38 -0400 Subject: [PATCH 7/7] update version # --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 48b4631..bbca37f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "solpolpy" -version = "0.1.2" +version = "0.1.3" authors = [ { name="J. Marcus Hughes", email="mhughes@boulder.swri.edu"}, { name="Matthew J. West", email="mwest@boulder.swri.edu"},