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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Next steps:

## Contributing

See [Contributing](https://github.com/google/Xee/blob/main/docs/contributing.md) and sign the required CLA.
See [Contributing](https://github.com/google/Xee/blob/main/docs/contributing.md) and sign the required CLA. For local development, we recommend the Pixi environments defined in this repository for reproducible test and docs runs.

## License

Expand Down
8 changes: 6 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@

# Print Python environment info for easier debugging on ReadTheDocs

import importlib.util
import subprocess
import sys
import xee # verify this works

print('python exec:', sys.executable)
print('sys.path:', sys.path)
print('pip environment:')
subprocess.run([sys.executable, '-m', 'pip', 'list']) # pylint: disable=subprocess-run-check
if importlib.util.find_spec('pip') is not None:
print('pip environment:')
subprocess.run([sys.executable, '-m', 'pip', 'list']) # pylint: disable=subprocess-run-check
else:
print('pip environment: unavailable')

print(f'xee: {xee.__file__}')

Expand Down
50 changes: 47 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,60 @@ All submissions, including submissions by project members, require review. We
use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
for this purpose.

### Recommended development setup

We recommend using Pixi for reproducible local development. The repository
defines dedicated environments for tests and docs so contributors can run the
same commands across Linux, macOS, and Windows.

Install Pixi by following the upstream installation instructions:
<https://pixi.sh/latest/>

From the repository root, use:

```bash
pixi install -e tests
pixi install -e docs
```

The main development commands are:

```bash
pixi run -e tests pytest -q xee/ext_test.py
pixi run -e tests pytest -q xee/ext_integration_test.py
pixi run -e docs docs-build
pixi run -e docs docs-check
```

`docs-build` builds the HTML docs, while `docs-check` runs a stricter Sphinx
build with warnings treated as errors.

### Running tests

The Xee integration tests only pass on Xee branches (no forks). Please run the integration tests locally before sending a PR. To run the tests locally, authenticate using `earthengine authenticate` and run one of the following:

```bash
python -m unittest xee/ext_integration_test.py
pixi run -e tests python -m unittest xee/ext_integration_test.py
```

or

```bash
python -m pytest xee/ext_integration_test.py
```
pixi run -e tests python -m pytest xee/ext_integration_test.py
```

For regular unit tests, run:

```bash
pixi run -e tests pytest -q xee/ext_test.py
```

Before opening a PR, run at least:

```bash
pixi run -e tests pytest -q xee/ext_test.py
pixi run -e docs docs-check
```

If your change touches Earth Engine integration behavior and you are working on
an Xee branch, also run the integration tests locally.
Loading