Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into hayes-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Hayes committed Dec 10, 2024
2 parents 4b836ec + c5a1a85 commit 3c88b5e
Show file tree
Hide file tree
Showing 17 changed files with 5,434 additions and 5,950 deletions.
90 changes: 2 additions & 88 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,3 @@
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
description of best practices for developing scientific packages.
Contributions are welcome, please see our documentation:

[spc-dev-intro]: https://learn.scientific-python.org/development/

# Quick development

The fastest way to start with development is to use nox. If you don't have nox,
you can use `pipx run nox` to run it without installing, or `pipx install nox`.
If you don't have pipx (pip for applications), then you can install with
`pip install pipx` (the only case were installing an application with regular
pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
`brew install pipx nox`.

To use, run `nox`. This will lint and test using every installed version of
Python on your system, skipping ones that are not installed. You can also run
specific jobs:

```console
$ nox -s lint # Lint only
$ nox -s tests # Python tests
$ nox -s docs -- --serve # Build and serve the docs
$ nox -s build # Make an SDist and wheel
```

Nox handles everything for you, including setting up an temporary virtual
environment for each run.

# Setting up a development environment manually

You can set up a development environment by running:

```bash
python3 -m venv .venv
source ./.venv/bin/activate
pip install -v -e .[dev]
```

If you have the
[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
can instead do:

```bash
py -m venv .venv
py -m install -v -e .[dev]
```

# Pre-commit

You should prepare pre-commit, which will help you by checking that commits pass
required checks:

```bash
pip install pre-commit # or brew install pre-commit on macOS
pre-commit install # Will install a pre-commit hook into the git repo
```

You can also/alternatively run `pre-commit run` (changes only) or
`pre-commit run --all-files` to check even without installing the hook.

# Testing

Use pytest to run the unit checks:

```bash
pytest
```

# Coverage

Use pytest-cov to generate coverage reports:

```bash
pytest --cov=coincident
```

# Building docs

You can build the docs using:

```bash
nox -s docs
```

You can see a preview with:

```bash
nox -s docs -- --serve
```
https://coincident.readthedocs.io/en/latest/user_guide/contribute.html
10 changes: 5 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
path: dist

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@v1.4.4
uses: actions/attest-build-provenance@v2.0.1
with:
subject-path: "dist/*"

- uses: pypa/gh-action-pypi-publish@release/v1
with:
# Remember to tell (test-)pypi about this repo before publishing
# Remove this line to publish to PyPI
repository-url: https://test.pypi.org/legacy/
#with:
# Remember to tell (test-)pypi about this repo before publishing
# Remove this line to publish to PyPI
#repository-url: https://test.pypi.org/legacy/
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
schedule:
- cron: 0 0 * * *
- cron: 0 0 * * *
workflow_dispatch:
pull_request:
push:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pixi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0
environments: dev
manifest-path: pyproject.toml
cache: false
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
rev: "v4.6.0"
hooks:
- id: check-added-large-files
args: ["--maxkb=1000"]
args: ["--maxkb=2000"]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]
[![Available on pypi][pypi-version]][pypi-link]

[![DOI](https://zenodo.org/badge/853370896.svg)](https://doi.org/10.5281/zenodo.14327521)

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/uw-cryo/coincident)

Expand Down
3 changes: 3 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ IO

sliderule.subset_gedi02a
sliderule.subset_atl06
sliderule.process_atl06sr
sliderule.sample_3dep
xarray.to_dataset
xarray.plot_esa_worldcover
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
always_document_param_types = True
# autodoc_typehints = "none"
nb_execution_mode = "auto" # off, on
nb_execution_excludepatterns = ["sliderule.ipynb"]
nb_execution_excludepatterns = ["sliderule.ipynb", "contextual_data.ipynb"]
Loading

0 comments on commit 3c88b5e

Please sign in to comment.