From adde6576c8246ac0422cdcfa6dceb0a8ca94d7be Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Sun, 29 Dec 2024 10:48:19 -0700 Subject: [PATCH 1/3] update pip installs --- .github/workflows/build-publish-pypi.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/test-docs-linkcheck.yml | 2 +- .github/workflows/test-latest-deps.yml | 2 +- .github/workflows/test-minimum-deps.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-publish-pypi.yml b/.github/workflows/build-publish-pypi.yml index b846784b..fdbf19d0 100644 --- a/.github/workflows/build-publish-pypi.yml +++ b/.github/workflows/build-publish-pypi.yml @@ -36,7 +36,7 @@ jobs: - name: Build and check package run: | - python -m pip install --user -r ./environments/requirements/requirements-packaging.txt + python -m pip install -r ./environments/requirements/requirements-packaging.txt python -m validate_pyproject ./pyproject.toml python -m hatch build --clean python -m twine check --strict ./dist/* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b07e3494..341e6c2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - name: Install OSMnx run: | - python -m pip install -e . + python -m pip install . python -m pip check micromamba list python -m pip show osmnx diff --git a/.github/workflows/test-docs-linkcheck.yml b/.github/workflows/test-docs-linkcheck.yml index 068214f0..78a3740e 100644 --- a/.github/workflows/test-docs-linkcheck.yml +++ b/.github/workflows/test-docs-linkcheck.yml @@ -28,7 +28,7 @@ jobs: - name: Install requirements run: | - python -m pip install --user furo "sphinx==7.*" sphinx-autodoc-typehints + python -m pip install -r ./environments/requirements/requirements-docs.txt python -m pip check - name: Build docs and check links diff --git a/.github/workflows/test-latest-deps.yml b/.github/workflows/test-latest-deps.yml index 5230e1d5..bc255d7c 100644 --- a/.github/workflows/test-latest-deps.yml +++ b/.github/workflows/test-latest-deps.yml @@ -34,7 +34,7 @@ jobs: - name: Install OSMnx with latest/pre-release dependencies run: | python -m pip install --pre -r ./environments/tests/requirements-test-latest-deps.txt - python -m pip install -e . + python -m pip install . python -m pip check python -m pip list -v python -m pip show osmnx diff --git a/.github/workflows/test-minimum-deps.yml b/.github/workflows/test-minimum-deps.yml index 93c244aa..07f0060e 100644 --- a/.github/workflows/test-minimum-deps.yml +++ b/.github/workflows/test-minimum-deps.yml @@ -35,7 +35,7 @@ jobs: - name: Install OSMnx run: | - python -m pip install -e . + python -m pip install . python -m pip check micromamba list python -m pip show osmnx From 1227a18874445311acf96055630a256179d2159a Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Sun, 29 Dec 2024 11:39:41 -0700 Subject: [PATCH 2/3] move ruff and mypy caches into pre-commit cache folder --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6f1fb9da..92742ae2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ packages = ["osmnx"] path = "osmnx/_version.py" [tool.mypy] -cache_dir = "~/.cache/mypy" +cache_dir = "~/.cache/pre-commit/mypy" ignore_missing_imports = true python_version = "3.9" strict = true @@ -70,7 +70,7 @@ warn_no_return = true warn_unreachable = true [tool.ruff] -cache-dir = "~/.cache/ruff" +cache-dir = "~/.cache/pre-commit/ruff" exclude = ["build/*"] line-length = 100 From e23360b50596c6de13c38ab846846c95b2b02aed Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Sun, 29 Dec 2024 12:02:56 -0700 Subject: [PATCH 3/3] simplify workflow string quoting and pip caching --- .github/workflows/build-publish-docker.yml | 4 ++-- .github/workflows/build-publish-pypi.yml | 8 +++++--- .github/workflows/ci.yml | 4 ++-- .github/workflows/test-docs-linkcheck.yml | 6 ++++-- .github/workflows/test-latest-deps.yml | 4 ++-- .github/workflows/test-minimum-deps.yml | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-publish-docker.yml b/.github/workflows/build-publish-docker.yml index 44d60fa0..6ffb1a1d 100644 --- a/.github/workflows/build-publish-docker.yml +++ b/.github/workflows/build-publish-docker.yml @@ -6,9 +6,9 @@ name: Build and publish Docker image on: push: tags: - - 'v*' + - v* schedule: - - cron: "50 4 * * 1" # every monday at 04:50 UTC + - cron: 50 4 * * 1 # every monday at 04:50 UTC jobs: build_publish_docker: diff --git a/.github/workflows/build-publish-pypi.yml b/.github/workflows/build-publish-pypi.yml index fdbf19d0..967acae9 100644 --- a/.github/workflows/build-publish-pypi.yml +++ b/.github/workflows/build-publish-pypi.yml @@ -8,9 +8,9 @@ name: Build and publish to PyPI on: push: tags: - - 'v*' + - v* schedule: - - cron: "40 4 * * 1" # every monday at 04:40 UTC + - cron: 40 4 * * 1 # every monday at 04:40 UTC jobs: build_publish_pypi: @@ -32,7 +32,9 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: 3.* + cache: pip + cache-dependency-path: ./environments/requirements/requirements-packaging.txt - name: Build and check package run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 341e6c2d..39f81f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: branches: [main, v1] schedule: - - cron: "0 4 * * 1" # every monday at 04:00 UTC + - cron: 0 4 * * 1 # every monday at 04:00 UTC workflow_dispatch: jobs: @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] os: [ubuntu-latest] defaults: diff --git a/.github/workflows/test-docs-linkcheck.yml b/.github/workflows/test-docs-linkcheck.yml index 78a3740e..f67e2a73 100644 --- a/.github/workflows/test-docs-linkcheck.yml +++ b/.github/workflows/test-docs-linkcheck.yml @@ -3,7 +3,7 @@ name: Build docs and check links on: schedule: - - cron: "10 4 * * 1" # every monday at 04:10 UTC + - cron: 10 4 * * 1 # every monday at 04:10 UTC workflow_dispatch: jobs: @@ -24,7 +24,9 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: 3.* + cache: pip + cache-dependency-path: ./environments/requirements/requirements-docs.txt - name: Install requirements run: | diff --git a/.github/workflows/test-latest-deps.yml b/.github/workflows/test-latest-deps.yml index bc255d7c..eb557c71 100644 --- a/.github/workflows/test-latest-deps.yml +++ b/.github/workflows/test-latest-deps.yml @@ -4,7 +4,7 @@ name: Test latest/pre-release dependencies on: schedule: - - cron: "30 4 * * 1" # every monday at 04:30 UTC + - cron: 30 4 * * 1 # every monday at 04:30 UTC workflow_dispatch: jobs: @@ -29,7 +29,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: 3.* - name: Install OSMnx with latest/pre-release dependencies run: | diff --git a/.github/workflows/test-minimum-deps.yml b/.github/workflows/test-minimum-deps.yml index 07f0060e..8f048e26 100644 --- a/.github/workflows/test-minimum-deps.yml +++ b/.github/workflows/test-minimum-deps.yml @@ -4,7 +4,7 @@ name: Test minimum dependencies on: schedule: - - cron: "20 4 * * 1" # every monday at 04:20 UTC + - cron: 20 4 * * 1 # every monday at 04:20 UTC workflow_dispatch: jobs: