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
51 changes: 51 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Copilot Setup Steps

on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
- pyproject.toml
- poetry.lock
- docs/requirements.txt

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Poetry
run: pipx install "poetry==2.5.1"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: poetry
cache-dependency-path: |
pyproject.toml
poetry.lock
docs/requirements.txt

- name: Install development dependencies and optional extras
run: |
poetry env use python
poetry install --with dev --all-extras --no-interaction

- name: Install documentation dependencies
run: |
poetry run python -m pip freeze --exclude-editable > "$RUNNER_TEMP/copilot-constraints.txt"
poetry run python -m pip install --constraint "$RUNNER_TEMP/copilot-constraints.txt" --requirement docs/requirements.txt
poetry install --only-root --no-interaction

- name: Verify environment
run: |
poetry run python -m pip check
poetry run python -c "import nisystemlink.clients; import pyarrow; import sphinx"
poetry run pytest --version
poetry run sphinx-build --version
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,41 @@ the [decision index](docs/decisions/README.md) and read the relevant records.
Use its templates and lifecycle guidance to capture durable maintainer decisions
in the same PR as the related changes.

## Copilot cloud agent environment

The [Copilot setup workflow](.github/workflows/copilot-setup-steps.yml) prepares
an Ubuntu environment with Python 3.11, Poetry, development dependencies,
the optional PyArrow extra, and documentation tooling. The project is installed
in editable mode, and commands run in the shared environment with `poetry run`.

The setup uses `poetry.lock` for development dependencies and
[the documentation requirements](docs/requirements.txt) for Sphinx tooling.
Documentation installation is constrained to preserve the locked development
dependencies. Incompatible requirements fail setup rather than silently
changing those versions.

Useful validation commands include:

```sh
poetry run poe test
poetry run poe check
poetry run poe lint
poetry run poe types
poetry run poe doctest
poetry run sphinx-build -b html docs docs/_build/html
```

Setup performs lightweight environment checks, not the full validation suite.
Cloud, Enterprise, and web-server integration tests still require the
configuration described in this guide; the workflow does not provide service
credentials.

The workflow supports Copilot sessions that run on GitHub Actions. After it is
merged into the default branch, it can also be run manually from the Actions
tab. Pull requests changing the workflow or its dependency inputs validate the
setup automatically. If setup fails, inspect the workflow or agent session logs;
the agent may still start with an incomplete environment.

## Maintaining Python support and dependencies

Review Python support annually against the
Expand Down
Loading