Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c1ee1ff
Add prototype agent instructions
f-PLT Feb 24, 2026
cfb9419
Add headers to utils.py
f-PLT Feb 24, 2026
2ab1a02
Update plans and instructions
f-PLT Feb 24, 2026
84fc758
Add copernicus catalog
f-PLT Feb 24, 2026
b370bfd
Add auth utilises
f-PLT Feb 24, 2026
d40f275
Update StacSearch for Copernicus catalog
f-PLT Feb 24, 2026
b162228
Fix stac endpoint and collection name
f-PLT Feb 24, 2026
94903c4
Update documentation
f-PLT Feb 24, 2026
cd95751
Fix problem with endpoint and band info.
f-PLT Feb 24, 2026
e264748
update agent files and dependencies
f-PLT Feb 26, 2026
b120365
Update Agent files
f-PLT Feb 26, 2026
f74155a
Update Instructions
f-PLT Feb 27, 2026
eed4221
Update Instructions
f-PLT Feb 27, 2026
c7656fe
Update various docs
f-PLT Mar 12, 2026
9d45005
Update various docs
f-PLT Mar 12, 2026
d65848e
Add copernicus enums for sentinel2
f-PLT Mar 12, 2026
901f5c4
Refactor docstring, types and add safety checks
f-PLT Mar 30, 2026
5d6db2a
Refactor copernicus tests
f-PLT Mar 30, 2026
3d391c6
Fix pylint
f-PLT Mar 30, 2026
97765fb
Add S3 access plan for copernicus catalog
f-PLT Mar 30, 2026
10ebed5
Update instructions
f-PLT Apr 1, 2026
0b2192f
Update instructions
f-PLT Apr 1, 2026
6d44bdd
build: task 1 - add boto3 dependency and update env template
f-PLT Apr 13, 2026
725a5e3
feat: task 2 - implement s3_utils for client config and url parsing
f-PLT Apr 13, 2026
5d3c333
feat: task 2 - implement s3_utils and revert structlog changes
f-PLT Apr 13, 2026
a0c4cc2
refactor: task 3 - implement download dispatcher for s3 and http in s…
f-PLT Apr 13, 2026
8470987
test: task 4 - update integration tests for copernicus s3 downloads
f-PLT Apr 13, 2026
6852f87
Fix pre-commit and pylint
f-PLT Apr 13, 2026
2212231
docs: add copernicus sentinel-2 exploration notebook
f-PLT Apr 13, 2026
20e844c
Update pre-commit and project dependencies
f-PLT Apr 13, 2026
f4bed74
Add __str__ and __repr__ functions for Copernicus enum classes
f-PLT Apr 13, 2026
be9d574
Update python version in Makefile.variables
f-PLT Apr 13, 2026
91033c4
QoL improvements to stac Asset class
f-PLT Apr 13, 2026
726369c
Add env.example file
f-PLT Apr 13, 2026
d8cb887
Add example notebook for Copernicus Sentinel 2 catalog
f-PLT Apr 13, 2026
853ca43
Update Readmes
f-PLT Apr 13, 2026
d74295e
Update `actions` versions in CI
f-PLT Apr 13, 2026
36613ba
Add `https://www.earthdata.nasa.gov/` to markdown link checker becaus…
f-PLT Apr 13, 2026
09021c2
Update CHANGES.md
f-PLT Apr 13, 2026
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
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copernicus Account Credentials
COPERNICUS_USERNAME=""
COPERNICUS_PASSWORD=""

# Copernicus S3 (CDSE) Credentials
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""
COPERNICUS_S3_ENDPOINT="https://eodata.dataspace.copernicus.eu"
1 change: 1 addition & 0 deletions .gemini/GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You must strictly adhere to the project rules defined in `docs/agents/agent_instructions.md`. Read this file before making any significant architectural, geospatial data processing changes, or general code modifications. Use `read_file` to load `docs/agents/agent_istructions.md`.
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You must strictly adhere to the project rules defined in `docs/agents/agent_instructions.md`. Read this file before making any significant architectural, geospatial data processing changes, or general code modifications.
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v5
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.13'

- name: Install UV
run: |
make uv-install-venv

- name: Cache UV virtualenv and dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cache/uv
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v5
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.13'

- name: Install UV
run: |
make uv-install-venv

- name: Cache UV virtualenv and dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cache/uv
Expand All @@ -34,7 +34,7 @@ jobs:
uv-${{ runner.os }}-

- name: Cache pre-commit
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cache/pre-commit
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Python 3.11
uses: actions/setup-python@v5
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.13'

- name: Install UV
run: |
make uv-install-venv

- name: Cache UV virtualenv and dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cache/uv
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v5
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.13'

- name: Install UV
run: |
make uv-install-venv

- name: Cache UV virtualenv and dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cache/uv
Expand Down
6 changes: 6 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
},
{
"pattern": "https://github.com/RolnickLab/lab-template-documentation"
},
{
"pattern": "https://www.donneesquebec.ca/"
},
{
"pattern": "https://www.earthdata.nasa.gov/"
}
]
}
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exclude: "/migrations/|Makefile*"
default_stages: [ commit ]
default_stages: [ pre-commit ]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -18,7 +18,7 @@ repos:
files: '^(?!data/usa_polygon_5070\.gpkg$)(?!data/s2_grid_usa_polygon_5070\.gpkg$).*$'

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
rev: v2.3.3
hooks:
- id: autoflake

Expand All @@ -28,12 +28,12 @@ repos:
- id: autopep8

- repo: https://github.com/psf/black
rev: 25.12.0
rev: 26.3.1
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 7.0.0
rev: 8.0.1
hooks:
- id: isort

Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You must strictly adhere to the project rules defined in `docs/agents/agent_instructions.md`. Read this file before making any significant architectural, geospatial data processing changes, or general code modifications.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
______________________________________________________________________

- Add download functions for known data sources
- Add Copernicus stac catalog
- Add S3 download protocol for Copernicus Catalog
- Update Github-CI

## [0.2.1](https://github.com/RolnickLab/geospatial-tools/tree/0.2.1) (2025-09-17)

Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You must strictly adhere to the project rules defined in `docs/agents/agent_instructions.md`. Read this file before making any significant architectural, geospatial data processing changes, or general code modifications.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ To get started and to learn more about testing in Python:

## Docstring and type hinting

Docstring format should follow the Numpy standard and type hinting should be used
Docstring format should follow the Google standard and type hinting should be used
as per the PEP8 standard : https://docs.python.org/3/library/typing.html

## Version management and Changelogs
Expand Down
2 changes: 1 addition & 1 deletion Makefile.variables
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ APP_VERSION := 0.2.1
# APPLICATION_NAME must be aligned with the name of the folder containing your package
APPLICATION_NAME := geospatial_tools

PYTHON_VERSION := 3.11
PYTHON_VERSION := 3.13

# This is the default install environment for the project.
# Here, we are talking about the virtual environment management - not dependencies.
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository is a collection of tools and scripts for geospatial use cases.

## 🐍 Python Version

This project uses **Python 3.11** and relies on a `Makefile` for standardized, reproducible commands.
This project uses **Python 3.13** and relies on a `Makefile` for standardized, reproducible commands.

You can read more about the makefile [here](.make/README.md).

Expand Down Expand Up @@ -65,6 +65,30 @@ uv run python <python_script.py>
uv run pre-commit
```

## 🔑 Configuration

### Copernicus Data Space Ecosystem

To access the Copernicus Data Space Ecosystem (CDSE) for searching and downloading Sentinel data, you need to set up your credentials.

1. **Register**: Create an account at [https://documentation.dataspace.copernicus.eu/Registration.html](https://documentation.dataspace.copernicus.eu/Registration.html).

2. **Register** an S3 access key at [https://documentation.dataspace.copernicus.eu/APIs/S3.html](https://documentation.dataspace.copernicus.eu/APIs/S3.html)

3. **Environment Variables**: Set the following environment variables in a `.env` file, or add them to your shell :

```bash
export COPERNICUS_USERNAME="your_username"
export COPERNICUS_PASSWORD="your_password"
export AWS_ACCESS_KEY_ID="access_key"
export AWS_SECRET_ACCESS_KEY="secret_key"
export COPERNICUS_S3_ENDPOINT="https://eodata.dataspace.copernicus.eu"
```

If these variables are not set, the tools will prompt you for your credentials interactively.

You can use the [.env.example](.env.example) file as a baseline to create your own `.env` file.

## 📖 Project Usage

## 🌐 Environment & Portability Note
Expand Down
2 changes: 1 addition & 1 deletion data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- [NASA's EarthData](https://www.earthdata.nasa.gov/)
- [USGS Earth Explorer](https://earthexplorer.usgs.gov/)
- [Copernicus Open Access Hub](https://www.copernicus.eu/en/access-data)
- [Copernicus Open Access Hub](https://dataspace.copernicus.eu/explore-data)
- [Climate Data Store](https://cds.climate.copernicus.eu/datasets)

## Satellite data
Expand Down
51 changes: 51 additions & 0 deletions docs/agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Agents

This folder is for everything concerning AI agents (such as Claude, Codex, Gemini, etc.) and related documentation.

These instructions are meant to be a first step into agent-based development. They are deliberately structured to help the user acquire deeper knowledge while still benefiting from agent assisted programming. Once you feel comfortable with these, please feel free to modify and extend them for your own projects and skill levels.

Yes, these instructions are more prescriptive than *current* best practices, but they are also configured to work better with lower end models that **do** require more guidance.

- [agent_instructions.md](agent_instructions.md): File containing strictly model-agnostic context (usable by Claude, Codex, Gemini, etc.) relating to the project. Reference this file as your primary context when using any AI agent with this repository.
- [planning](planning/): Folder that contains the planning and task tracking documents produced by agents. Create sub folders by PR and/or task.
- [instructions](instructions/): Folder to contain specific agent skills and reference document that are referenced by the `agent_instructions.md`.

## Available Agent Skills

The `instructions/` folder contains specific skill files that guide the agent's behavior for particular tasks. Here is a summary of each skill, its purpose, and when to use it:

| Skill | Description | When to Use & Why |
| ------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `analytics.md` | Extracts truth from experimental data with statistical rigor. | Use for Exploratory Data Analysis (EDA) and visualization to ensure reproducibility and prevent misleading claims. |
| `formal_planning.md` | Enforces a structured planning protocol via a Formal Design Document. | Use when explicitly asked for a plan, architecture, or proposal to map out scope, trade-offs, and steps before coding. |
| `infrastructure.md` | Manages reproducible and resilient environments/pipelines as code. | Use for containerization (Docker), HPC/SLURM cluster setup, or CI/CD tasks to ensure fault tolerance and exact dependency pinning. |
| `KNOWLEDGE.md` | A centralized repository for project-specific tribal knowledge. | Use to document or consult specific findings, library quirks, or architectural decisions to avoid repeating past mistakes. |
| `ml.md` | Builds state-of-the-art, reproducible, and reliable machine learning pipelines. | Use for ML model training, evaluation, and experiment management to guarantee strict data isolation and deterministic execution. |
| `orchestrator.md` | Focuses on horizontal integration and strategic decomposition of goals. | Use for multi-component tasks to define explicit contracts between modules and ensure end-to-end flows work correctly. |
| `plan_to_tasks.md` | Decomposes high-level plans into modular, atomic, and verifiable tasks. | Use when transitioning from planning to execution to ensure each step has clear context, acceptance criteria, and testing protocols. |
| `python.md` | Elevates Python scripts into robust, maintainable, and type-safe software. | Use for all Python development and QA to enforce strict typing, SOLID principles, vectorization, and automated workflows. |
| `root_cause_analysis.md` | Systematically diagnoses and permanently fixes software failures. | Use when presented with a bug, traceback, or unexpected result to isolate the failure (MRE) and target the actual root cause. |
| `security.md` | Identifies vulnerabilities, enforces defense-in-depth, and ensures data privacy. | Use for tasks involving authentication, untrusted input, or infrastructure to prevent injection attacks and hardcoded secrets. |
| `specdrivendev.md` | Implements lightweight Spec-Driven Development to define contracts first. | Use when starting a new feature to define data structures, signatures, and docstrings before writing logic, preventing LLM hallucinations. |
| `systemdesign.md` | Designs systems that are maintainable, evolvable, and robust. | Use for architectural decisions to enforce separation of concerns, configuration-first design, and proper dependency injection. |

## How to use them

This template comes with CLAUDE.md and GEMINI.md files that essentially point to [agent_instructions.md](agent_instructions.md) and should, in theory, automatically take them into account.

In practice... it's not always the case. It is probably better to manually feed the instructions directly to the agent/tool as context in your prompt just to make sure:

```text
Using @docs/agents/agent_instructions.md, @docs/agents/instructions/python.md, and @docs/agents/instructions/systemdesign.md and @docs/agents/instructions/formal_planning.md, create a plan for a new class that will ...
```

When using models with smaller context windows, it will also be important to clear the context once in a while to ensure better results.

For example:

- Create plan
- Manually revise plan document
- Clear context
- Ask agent to implement first step of the plan
- Clear context
- Repeat
Loading