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

Move test, bench, and doc requirements out of pyproject.toml #1407

Merged
merged 9 commits into from
Sep 26, 2024
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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Steps to reproduce the behavior:

> Ex.
>
> 1. Install stactools
> 2. Run `scripts/test`
> 1. Install pystac w/ dev requirements: `pip install -e . -r requirements-dev.txt`
> 2. Run `pytest`
> 3. See error

Include OS, Python version, and PySTAC version.
Expand All @@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen.
**Screenshots and shell session dumps**
If applicable, add session dumps and/or screenshots to help explain your problem.

> ex. `scripts/lint >> lint_errors.txt`
> ex. `pre-commit run ruff > ruff.txt`

**Additional context**
Add any other context about the problem here.
Expand Down
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

**PR Checklist:**

- [ ] `pre-commit` hooks pass locally
- [ ] Tests pass (run `scripts/test`)
- [ ] Pre-commit hooks and tests pass (run `scripts/test`)
- [ ] Documentation has been updated to reflect changes, if applicable
- [ ] This PR maintains or improves overall codebase code coverage.
- [ ] Changes are added to the [CHANGELOG](https://github.com/stac-utils/pystac/blob/main/CHANGELOG.md). See [the docs](https://pystac.readthedocs.io/en/latest/contributing.html#changelog) for information about adding to the changelog.
14 changes: 7 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
cache: "pip"

- name: Install dependencies
run: pip install .[validation,test]
run: pip install .[validation] -r requirements-dev.txt

- name: Execute test suite
run: ./scripts/test
Expand All @@ -65,7 +65,7 @@ jobs:
cache: "pip"

- name: Install with dependencies
run: pip install .[validation,test]
run: pip install .[validation] -r requirements-dev.txt

- name: Run coverage with orjson
run: pytest tests --cov
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
cache: "pip"

- name: Install with test dependencies
run: pip install .[test]
run: pip install . -r requirements-dev.txt

- name: Execute linters & type checkers
run: pre-commit run --all-files
Expand All @@ -130,7 +130,7 @@ jobs:
python-version: "3.10"

- name: Install
run: pip install .[validation,test]
run: pip install .[validation] -r requirements-dev.txt

- name: Uninstall orjson
run: pip uninstall -y orjson
Expand All @@ -149,7 +149,7 @@ jobs:
cache: "pip"

- name: Install all dependencies
run: pip install .[bench,docs,orjson,test,urllib3,validation]
run: pip install .[orjson,urllib3,validation,jinja2]

check-benchmarks:
# This checks to make sure any API changes haven't broken any of the
Expand All @@ -163,7 +163,7 @@ jobs:
python-version: "3.10"
cache: "pip"
- name: Install pystac
run: pip install .[bench]
run: pip install . -r requirements-dev.txt
- name: Set asv machine
run: asv machine --yes
- name: Check benchmarks
Expand All @@ -180,6 +180,6 @@ jobs:
- name: Install pandoc
run: sudo apt-get install pandoc
- name: Install pystac
run: pip install .[docs]
run: pip install . -r docs/requirements.txt
- name: Check docs
run: make -C docs html SPHINXOPTS="-W --keep-going"
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ formats:

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs

sphinx:
fail_on_warning: false
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Update docstring of `name` argument to `Classification.apply` and `Classification.create` to agree with extension specification ([#1356](https://github.com/stac-utils/pystac/pull/1356))
- Add example of custom `StacIO` for Azure Blob Storage to docs ([#1372](https://github.com/stac-utils/pystac/pull/1372))
- Noted that collection links can be used in non-item objects in STAC v1.1.0 ([#1393](https://github.com/stac-utils/pystac/pull/1393))
- Move test, docs, and bench requirements out of pyproject.toml ([#1407](https://github.com/stac-utils/pystac/pull/1407))

### Fixed

Expand Down Expand Up @@ -672,7 +673,7 @@

- Fixed issue that can cause infinite recursion during full resolve ([#204](https://github.com/stac-utils/pystac/pull/193))
- Fixed issue that required label_classes in label items ([#201](https://github.com/stac-utils/pystac/pull/201))
- Fixed issue that caused geometries and bboxes produced by Shapely to fail PySTAC's validaton ([#201](https://github.com/stac-utils/pystac/pull/201))
- Fixed issue that caused geometries and bboxes produced by Shapely to fail PySTAC's validator ([#201](https://github.com/stac-utils/pystac/pull/201))
- Allow for path prefixes like /vsitar/ ([#208](https://github.com/stac-utils/pystac/pull/208))
- Fix Item set_self_href to ensure item asset locations do not break ([#226](https://github.com/stac-utils/pystac/pull/226))
- Fixed an incorrect exception being thrown from Link.get_href() if there is no target_href ([#201](https://github.com/stac-utils/pystac/pull/201))
Expand Down
1 change: 1 addition & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# PySTAC Community Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Enforcement
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2019, 2020, 2021 the authors
Copyright 2019-2024 the authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ network requests when reading with PySTAC, you'll need
pip install 'pystac[urllib3]'
```

If you are using jupyter notebooks and want to enable pretty display of pystac objects you'll need [`jinja2`](https://pypi.org/project/Jinja2/)
If you are using jupyter notebooks and want to enable pretty display of pystac
objects you'll need [`jinja2`](https://pypi.org/project/Jinja2/)

```shell
pip install 'pystac[jinja2]'
Expand Down
16 changes: 10 additions & 6 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ pip as follows:

git clone git@github.com:your_user_name/pystac.git
cd pystac
pip install -e '.[test]'
pip install -e . -r requirements-dev.txt

Testing
^^^^^^^
tl;dr: Run ``./scripts/test`` to run all tests as they run on CI.

PySTAC runs tests using `pytest <https://docs.pytest.org/en/latest/>`_. You can find unit tests in the ``tests/``
directory.
PySTAC runs tests using `pytest <https://docs.pytest.org/en/latest/>`_. You can
find unit tests in the ``tests/`` directory.

To run the tests:

.. code-block:: bash

$ pytest

To run the tests and generate the coverage report:

Expand Down Expand Up @@ -49,7 +54,7 @@ Code quality checks
^^^^^^^^^^^^^^^^^^^

tl;dr: Run ``pre-commit install --overwrite`` to perform checks when committing, and
``./scripts/test`` to run all checks and tests.
``pytest`` to run all tests.

PySTAC uses

Expand Down Expand Up @@ -94,7 +99,6 @@ and report any improvements or regressions.

.. code-block:: bash

pip install -e '.[bench]'
scripts/bench

The benchmark suite takes a while to run, and will report any significant
Expand Down
12 changes: 12 additions & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Sphinx
boto3
ipython
jinja2
jupyter
nbsphinx
pydata-sphinx-theme
rasterio
shapely
sphinx-autobuild
sphinx-design
sphinxcontrib-fulltoc
Loading