Skip to content

Commit

Permalink
Merge pull request #1175 from gboeing/ci
Browse files Browse the repository at this point in the history
update CI
  • Loading branch information
gboeing committed May 6, 2024
2 parents e9ad490 + 0ac772c commit d9c0541
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 34 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ jobs:

- name: Install OSMnx
run: |
uv pip install -e .
conda list
python -m pip install -e .
micromamba list
python -m pip show osmnx
- name: Cache pre-commit
uses: actions/cache@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:

- name: Install OSMnx
run: |
uv pip install -e .
python -m pip install -e .
micromamba list
uv pip show --verbose osmnx
python -m pip show osmnx
- name: Test code
run: pytest --verbose --maxfail=1
2 changes: 1 addition & 1 deletion environments/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ sphinx-autodoc-typehints
# packaging
conda-smithy
hatch
pip
twine
uv
validate-pyproject

# typing
Expand Down
17 changes: 8 additions & 9 deletions environments/linux/create-environment.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#!/bin/bash
set -e
ENV=ox
ENV_PATH=$(conda info --base)/envs/$ENV
PACKAGE=osmnx
eval "$(conda shell.bash hook)"
conda activate base
mamba env remove -n $ENV --yes
mamba clean --all --yes --quiet --no-banner
mamba create -c conda-forge --strict-channel-priority -n $ENV --file "../docker/requirements.txt" --yes --no-banner
conda env remove -n $ENV --yes
mamba create -n $ENV --yes -c conda-forge --strict-channel-priority --file "../docker/requirements.txt"
eval "$(conda shell.bash hook)"
conda activate $ENV
uv pip uninstall $PACKAGE
uv pip install -e ../../.
python -m ipykernel install --sys-prefix --name $ENV --display-name "Python ($ENV)"
mamba clean --all --yes --quiet --no-banner
mamba env export -n $ENV > environment.yml
mamba list --no-banner
python -m pip --python $ENV_PATH uninstall $PACKAGE --yes
python -m pip --python $ENV_PATH install -e ../../.
python -m ipykernel install --prefix $ENV_PATH --name $ENV --display-name "Python ($ENV)"
conda env export -n $ENV > environment.yml
conda list -n $ENV
jupyter kernelspec list
ipython -c "import $PACKAGE; print('$PACKAGE version', $PACKAGE.__version__)"
2 changes: 0 additions & 2 deletions environments/tests/env-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ channels:
- conda-forge

dependencies:
- uv

# requirements
- geopandas
- networkx
Expand Down
2 changes: 0 additions & 2 deletions environments/tests/env-test-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ channels:
- conda-forge

dependencies:
- uv

# requirements (pinned to min versions from /pyproject.toml)
- geopandas=0.12
- networkx=2.5
Expand Down
26 changes: 13 additions & 13 deletions environments/windows/create-environment.bat
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
SET ENV="ox"
SET PACKAGE="osmnx"
CALL %USERPROFILE%\miniforge3\Scripts\activate.bat && ^
conda deactivate && ^
mamba env remove -n %ENV% --yes && ^
mamba clean --all --yes --quiet --no-banner && ^
mamba create -c conda-forge --strict-channel-priority -n %ENV% --file "../docker/requirements.txt" --yes --no-banner && ^
SET CONDA_ROOT=%USERPROFILE%\miniforge3
SET ENV=ox
SET ENV_PATH=%CONDA_ROOT%\envs\%ENV%
SET PACKAGE=osmnx
CALL %CONDA_ROOT%\Scripts\activate.bat && ^
conda activate base && ^
conda env remove -n %ENV% --yes && ^
mamba create -n %ENV% --yes -c conda-forge --strict-channel-priority --file "../docker/requirements.txt" && ^
conda activate %ENV% && ^
uv pip uninstall %PACKAGE% && ^
uv pip install -e ../../. && ^
python -m ipykernel install --sys-prefix --name %ENV% --display-name "Python (%ENV%)" && ^
mamba clean --all --yes --quiet --no-banner && ^
mamba env export -n %ENV% > environment.yml && ^
mamba list --no-banner && ^
python -m pip --python %ENV_PATH%\python.exe uninstall %PACKAGE% --yes && ^
python -m pip --python %ENV_PATH%\python.exe install -e ../../. && ^
python -m ipykernel install --prefix %ENV_PATH% --name %ENV% --display-name "Python (%ENV%)" && ^
conda env export -n %ENV% > environment.yml && ^
conda list && ^
jupyter kernelspec list && ^
ipython -c "import %PACKAGE%; print('%PACKAGE% version', %PACKAGE%.__version__)"
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ exclude_also = ["@overload", "if TYPE_CHECKING:"]
[tool.hatch.build]
packages = ["osmnx"]

[tool.hatch.envs.default]
installer = "uv"

[tool.hatch.version]
path = "osmnx/_version.py"

Expand Down

0 comments on commit d9c0541

Please sign in to comment.