Skip to content
Merged
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
3 changes: 1 addition & 2 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
- name: Install and Build
shell: bash
run: |
micromamba run -n docs python -m pip install -e .
micromamba run -n docs python -m pip install -r requirements-docs.txt
micromamba run -n docs python -m pip install -e . --group docs
micromamba run -n docs sphinx-build -b html docs/ docs/_build/

- name: Deploy 🚀
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test_proj_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ jobs:
run: |
python -V
python -m pip install --upgrade --pre --only-binary :all: -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
python -m pip install -e .
python -m pip install -r requirements-test.txt
python -m pip install -e . --group test
pyproj -v

- name: Test
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: pre-commit/action@v3.0.1
- name: Install mypy
run: |
python -m pip install mypy types-certifi
python -m pip install --group typing
- name: mypy
run: |
mypy pyproj
Expand Down Expand Up @@ -73,9 +73,7 @@ jobs:
python${{ matrix.python-version }} -m venv testenv
. testenv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install -e .
python -m pip install -r requirements-test.txt
python -m pip install -e . --group dev

- name: Test
shell: bash
Expand Down Expand Up @@ -137,12 +135,7 @@ jobs:
- name: Install Env
shell: bash
run: |
if [ "${{ matrix.python-implementation }}" = "pypy" ]; then
sed -i.bak '/xarray/d' requirements-test.txt;
sed -i.bak '/pandas/d' requirements-test.txt;
fi;
micromamba run -n test python -m pip install -e .
micromamba run -n test python -m pip install -r requirements-test.txt
micromamba run -n test python -m pip install -e . --group test

- name: Check and Log Environment
shell: bash
Expand All @@ -155,7 +148,7 @@ jobs:
shell: bash
if: matrix.python-implementation == 'python'
run: |
micromamba run -n test python -m pip install pylint
micromamba run -n test python -m pip install --group lint

- name: pylint
shell: bash
Expand Down Expand Up @@ -196,7 +189,7 @@ jobs:
shell: bash
if: contains(matrix.os, 'ubuntu') && matrix.python-implementation == 'python'
run: |
micromamba run -n test python -m pip install -r requirements-docs.txt
micromamba run -n test python -m pip install --group docs
micromamba run -n test sphinx-build -b html docs/ docs/_build/
micromamba run -n test sphinx-build -b man docs/ docs/_build/

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ celerybeat-schedule
# dotenv
.env

# uv env
uv.lock

# virtualenv
.venv
venv/
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ environments. Our recommended setup for contributing is:
```
* Activate our new development environment ``conda activate devel`` on Mac/Linux or
``activate devel`` on Windows.
* Install development requirements ``python -m pip install -r requirements-dev.txt``
* Install development requirements ``python -m pip install --group dev``
* Make an editable install of pyproj by running ``python -m pip install -e .``
* Setup pre-commit hooks ``pre-commit install``

Expand Down Expand Up @@ -126,7 +126,7 @@ change the code and stay confident that things have not broken. Running the test
``pytest``, which is easily available through ``conda`` or ``pip``. It was also installed if you made our default ``devel`` environment.

### Running Tests
Running the tests can be done by running ``python -m pytest``. Make sure you install the test requirements before running the tests ``python -m pip install -r requirements-test.txt``.
Running the tests can be done by running ``python -m pytest``. Make sure you install the test requirements before running the tests ``python -m pip install --group test``.

Running the whole test suite isn't that slow, but can be a burden if you're working on just
one module or a specific test. It is easy to run tests on a single directory:
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test-coverage: ## run tests and generate coverage report
py.test --cov-report term-missing --cov=pyproj -v -s

install-docs: ## Install requirements for building documentation
python -m pip install -r requirements-docs.txt
python -m pip install --group docs

docs: ## generate Sphinx HTML documentation, including API docs
$(MAKE) -C docs clean
Expand All @@ -79,7 +79,6 @@ install: clean ## install the package to the active Python's site-packages
python -m pip install .

install-dev: clean ## install development version to active Python's site-packages
python -m pip install -r requirements-dev.txt
python -m pip install --group dev
pre-commit install
python -m pip install -r requirements-test.txt
PYPROJ_FULL_COVERAGE=YES python -m pip install -e .
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,38 @@ changelog = "https://pyproj4.github.io/pyproj/stable/history.html"
[project.scripts]
pyproj = "pyproj.__main__:main"

[dependency-groups]
dev = [
"cython>=0.28.4",
"pre-commit",
"setuptools",
{include-group = "lint"},
{include-group = "test"},
{include-group = "typing"},
]
docs = [
"furo>=2022.6",
"sphinx",
"sphinx-argparse",
]
lint = [
"pylint",
"ruff",
]
test = [
"numpy",
"packaging",
"pandas",
"pytest>3.6",
"pytest-cov",
"shapely",
"xarray",
]
typing = [
"mypy",
"types-certifi",
]

[tool.setuptools]
zip-safe = false # https://mypy.readthedocs.io/en/stable/installed_packages.html

Expand Down
5 changes: 0 additions & 5 deletions requirements-dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements-docs.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements-test.txt

This file was deleted.

Loading