From 868261c5add86b779beb0828f2433ac55615e4ab Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Wed, 8 Nov 2023 18:50:04 -0700 Subject: [PATCH 1/4] Migrate Pytest config into TOML --- pyproject.toml | 4 ++++ pytest.ini | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index 953bb809..7d199f22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,6 +78,10 @@ requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" +[tool.pytest] +filterwarnings = ["error::UserWarning"] + + [tool.bumpversion] current_version = "0.7.0" commit = false diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index ce98216e..00000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -filterwarnings = - error::UserWarning From 4ee9d86066b2d8e40facc8dee7e62963d2f5eb32 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Wed, 8 Nov 2023 18:53:46 -0700 Subject: [PATCH 2/4] Migrate Mypy config to TOML --- mypy.ini | 5 ----- pyproject.toml | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 3bb68e1a..00000000 --- a/mypy.ini +++ /dev/null @@ -1,5 +0,0 @@ -[mypy] -disallow_untyped_defs = True -ignore_missing_imports = True -[mypy-tests.*] -ignore_errors = True diff --git a/pyproject.toml b/pyproject.toml index 7d199f22..9c5377b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,6 +82,17 @@ build-backend = "poetry.masonry.api" filterwarnings = ["error::UserWarning"] +[tool.mypy] +disallow_untyped_defs = false +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = [ + "tests.*", +] +ignore_errors = true + + [tool.bumpversion] current_version = "0.7.0" commit = false From 5253e927aa1f7058cd1b942bc29accdd2e1f8243 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Thu, 9 Nov 2023 08:49:34 -0700 Subject: [PATCH 3/4] Run test workflow on all changes This prevents repo changes from desyncing with the actions config, resulting in tests not running when we might expect them to. --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 04db1cf1..468417f1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,13 +2,7 @@ name: Unit Tests on: push: - paths: - - earthaccess/** - - tests/** pull_request: - paths: - - earthaccess/** - - tests/** types: [opened, synchronize] jobs: From c64b1d690bb44f11f5b0fe5f9b69ac8fa98aaff4 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Thu, 9 Nov 2023 08:53:12 -0700 Subject: [PATCH 4/4] Add pre-commit CI config Adjust YAML whitespace for consistency with our other YAML files --- .pre-commit-config.yaml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0270e175..501e096c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,17 @@ +ci: + autoupdate_schedule: "monthly" # Like dependabot + autoupdate_commit_msg: "chore: update pre-commit hooks" + autofix_prs: false # Comment "pre-commit.ci autofix" on a PR to trigger + repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 - hooks: - - id: check-yaml - - id: trailing-whitespace - - id: check-toml - - id: check-json -- repo: https://github.com/psf/black - rev: 20.8b1 - hooks: - - id: black +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: trailing-whitespace + - id: check-toml + - id: check-json +- repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black