Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace conda with pip in CI #1211

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Create environment with Micromamba
uses: mamba-org/setup-micromamba@v1
- name: Setup Python
uses: actions/setup-python@v5
with:
cache-environment: true
create-args: python=${{ matrix.python-version }}
environment-file: ./environments/tests/env-ci.yml
post-cleanup: none
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install OSMnx
run: |
python -m pip install -r ./environments/tests/requirements-ci.txt
python -m pip install -e .
micromamba list
python -m pip list -v
python -m pip show osmnx
python --version

- name: Cache pre-commit
uses: actions/cache@v4
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Create environment with Micromamba
uses: mamba-org/setup-micromamba@v1
- name: Setup Python
uses: actions/setup-python@v5
with:
cache-environment: true
environment-file: ./environments/tests/env-test-minimal.yml
post-cleanup: none
python-version: "3.9"
cache: "pip"

- name: Install OSMnx
run: |
python -m pip install -r ./environments/tests/requirements-test-minimal.txt
python -m pip install -e .
micromamba list
python -m pip list -v
python -m pip show osmnx
python --version

- name: Test code
run: pytest --verbose --maxfail=1
32 changes: 0 additions & 32 deletions environments/tests/env-ci.yml

This file was deleted.

29 changes: 0 additions & 29 deletions environments/tests/env-test-minimal.yml

This file was deleted.

26 changes: 26 additions & 0 deletions environments/tests/requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# requirements
geopandas
networkx
numpy
pandas
requests
shapely

# extras
matplotlib
rasterio
rio-vrt
scikit-learn
scipy

# linting/testing
lxml
pre-commit
pytest
pytest-cov
typeguard

# docs
furo
sphinx == 7.*
sphinx-autodoc-typehints
26 changes: 26 additions & 0 deletions environments/tests/requirements-test-minimal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Pin dependencies to minimum required versions. Allows you to create an
# environment to run the test suite against the oldest supported versions of
# Python and the required/optional dependencies.

# pin python-version in ./github/workflows/test-minimal.yml to min version
# from /pyproject.toml

# requirements (pinned to min versions from /pyproject.toml)
geopandas == 1.0
networkx == 2.5
numpy == 1.22
pandas == 1.4
requests == 2.27
shapely == 2.0

# extras (pinned to min versions from /pyproject.toml)
matplotlib == 3.5
rasterio == 1.3
rio-vrt == 0.3
scikit-learn == 0.23
scipy == 1.5

# testing
lxml
pytest
typeguard
2 changes: 1 addition & 1 deletion tests/test_osmnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,4 +723,4 @@ def test_features() -> None:
"(3 1, 3 3, 2 3, 1 3, 1 1, 2 1, 3 1)), "
"((2.5 2.5, 2.5 1.5, 1.5 1.5, 1.5 2.5, 2.5 2.5)))"
)
assert result == wkt.loads(geom_wkt)
assert result.equals(wkt.loads(geom_wkt))