Skip to content

Commit b54908c

Browse files
authored
Initial commit
0 parents  commit b54908c

File tree

15 files changed

+547
-0
lines changed

15 files changed

+547
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: build-and-push-jupyterlab-image
2+
3+
on:
4+
workflow_dispatch: # This allows you to manually trigger the action from GitHub UI.
5+
6+
jobs:
7+
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Docker Buildx
17+
id: buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Login to dockerhub
21+
uses: docker/login-action@v3
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
25+
26+
- name: Get lowercase repo name (for dynamic tags)
27+
id: repo_name
28+
run: |
29+
lowercase_name=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')
30+
echo "repo_name=${lowercase_name}" >> "$GITHUB_OUTPUT"
31+
32+
- name: Build and push latest
33+
id: docker_build_jupyterlab
34+
uses: docker/build-push-action@v5
35+
with:
36+
context: containers/jupyterlab
37+
file: containers/jupyterlab/Dockerfile
38+
builder: ${{ steps.buildx.outputs.name }}
39+
push: true
40+
tags: |
41+
esiil/${{ steps.repo_name.outputs.repo_name }}_jupyterlab:latest
42+
43+
- name: Image digest
44+
run: echo ${{ steps.docker_build_jupyterlab.outputs.digest }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Sync with Template Repository
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
sync_template:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout main repository
12+
uses: actions/checkout@v4
13+
14+
- name: Configure Git for merge
15+
run: |
16+
git config --global user.name "github-actions"
17+
git config --global user.email "actions@users.noreply.github.com"
18+
19+
- name: Fetch template repository
20+
run: git fetch --no-tags --no-recurse-submodules https://github.com/CU-ESIIL/Working_group_OASIS.git +refs/heads/*:refs/remotes/template/*
21+
22+
- name: Merge changes from template repository
23+
run: |
24+
git merge --no-commit --no-ff --allow-unrelated-histories template/main || true
25+
git checkout --ours .
26+
git add .
27+
28+
- name: Commit changes
29+
run: git commit -am "Merge changes from template repository"
30+
31+
- name: Push changes
32+
uses: ad-m/github-push-action@v0.6.0
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pages.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Deploy MkDocs site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
if [ -f requirements.txt ]; then
37+
python -m pip install -r requirements.txt
38+
else
39+
python -m pip install mkdocs
40+
fi
41+
42+
- name: Build MkDocs site
43+
run: mkdocs build --strict --clean --site-dir dist
44+
45+
- name: Configure GitHub Pages
46+
uses: actions/configure-pages@v5
47+
with:
48+
enablement: true
49+
continue-on-error: true
50+
51+
- name: Verify Pages is enabled
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: |
55+
set -euo pipefail
56+
api_url="https://api.github.com/repos/${GITHUB_REPOSITORY}/pages"
57+
status="$(curl -sS -H "Authorization: Bearer ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -o /tmp/pages-response.json -w "%{http_code}" "${api_url}")"
58+
if [ "${status}" = "404" ]; then
59+
echo "::error::Enable GitHub Pages: Settings → Pages → Source = GitHub Actions and Settings → Actions → Workflow permissions = Read and write."
60+
exit 1
61+
elif [ "${status}" != "200" ]; then
62+
echo "::error::Failed to verify GitHub Pages (HTTP ${status})."
63+
cat /tmp/pages-response.json
64+
exit 1
65+
fi
66+
67+
- name: Upload Pages artifact
68+
uses: actions/upload-pages-artifact@v3
69+
with:
70+
path: ./dist
71+
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# History files
2+
.Rhistory
3+
.Rapp.history
4+
5+
# Session Data files
6+
.RData
7+
.RDataTmp
8+
9+
# User-specific files
10+
.Ruserdata
11+
12+
# Example code in package build process
13+
*-Ex.R
14+
15+
# Output files from R CMD build
16+
/*.tar.gz
17+
18+
# Output files from R CMD check
19+
/*.Rcheck/
20+
21+
# RStudio files
22+
.Rproj.user/
23+
24+
# produced vignettes
25+
vignettes/*.html
26+
vignettes/*.pdf
27+
28+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
29+
.httr-oauth
30+
31+
# knitr and R markdown default cache directories
32+
*_cache/
33+
/cache/
34+
35+
# Temporary files created by R markdown
36+
*.utf8.md
37+
*.knit.md
38+
39+
# R Environment Variables
40+
.Renviron
41+
42+
43+
44+
# translation temp files
45+
po/*~
46+
47+
# RStudio Connect folder
48+
rsconnect/
49+
50+
# macOS
51+
.DS_Store

AGENTS.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# AGENTS.md
2+
3+
## Core Operating Contract
4+
- Treat this repository as the source of truth.
5+
- Treat the website as a rendered view of repository state.
6+
- Prefer small, additive, traceable edits.
7+
- Keep documentation synchronized with code and project structure.
8+
- Keep the repository minimalist by default.
9+
10+
## Default Workflow
11+
- Inspect repository structure before editing.
12+
- Make the smallest diff that solves the request.
13+
- Update related docs when behavior, workflows, or outputs change.
14+
- Update changelog, dev log, or equivalent history files for meaningful changes.
15+
- Preserve existing structure and historical context.
16+
- Do not perform destructive rewrites unless explicitly requested.
17+
18+
## Documentation and Website Policy
19+
- Treat `docs/` as project-level documentation and website source.
20+
- Update docs whenever code, workflows, or outputs change.
21+
- Amend existing docs when possible; do not replace whole files without need.
22+
- Preserve navigation, readability, and consistency in website changes.
23+
- Keep default website behavior clean and minimal unless the user asks for more expressive design.
24+
25+
## Testing Policy
26+
- Assume `tests/` may exist before a full testing framework is defined.
27+
- Do not invent domain-specific tests when expected behavior is unclear.
28+
- Add the smallest meaningful tests when behavior is known.
29+
- Prefer early-stage checks such as smoke tests, import tests, CLI tests, schema checks, or example-based checks.
30+
- If tests are deferred, document the gap; do not imply coverage that does not exist.
31+
32+
## Package and Structure Separation Policy
33+
- Keep website structure and package structure clearly separated.
34+
- Do not automatically repurpose `docs/` for package-native docs or build artifacts.
35+
- For Python packaging requests, prefer standard Python layout, typically `src/`.
36+
- For R packaging requests, follow standard R conventions (`R/`, `man/`, `DESCRIPTION`, `NAMESPACE`, optional `vignettes/`).
37+
- For other ecosystems, follow ecosystem conventions.
38+
- If structural conflicts arise, choose a durable long-term structure and document the decision.
39+
40+
## Data Discovery and Data Use Policy
41+
- Prefer open and FAIR data when possible.
42+
- Prefer streaming or lazy-access workflows over bulk downloads when feasible.
43+
- Use standards-based discovery systems (for example STAC) when relevant.
44+
- When relevant, consider streaming-friendly tooling such as xarray, zarr, GDAL, rasterio, pystac-client, stackstac, gdalcubes, terra, stars, cubo, or equivalent tools.
45+
- When introducing data, document source, access method, format, license, and citation requirements.
46+
- Do not silently ingest external data into the project.
47+
48+
## Data Sovereignty and Intellectual Property Policy
49+
- Consider licensing, copyright, privacy, Indigenous data sovereignty, and related restrictions for all data and content.
50+
- If rights or permissions are unclear, document uncertainty and avoid assuming open reuse.
51+
52+
## Design and Usability Policy
53+
- Keep the website simple, readable, and easy to extend by default.
54+
- When design improvements are requested, prioritize system-level improvements (layout, spacing, typography, hierarchy, navigation, consistency).
55+
- Do not use scattered one-off styling hacks.
56+
- If direct site inspection is possible, verify readability, navigation, link integrity, and that docs still reflect repository state.
57+
58+
## Decision Logging
59+
- Reflect meaningful structural, architectural, documentation, data-source, or design decisions in changelog, dev log, roadmap, or equivalent history files when appropriate.

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Research Project Template
2+
3+
This repository is a **minimal template for research and data science projects** that combine code, documentation, and a project website.
4+
5+
It includes:
6+
7+
* a clean project structure (`src`, `data`, `docs`, `tests`, etc.)
8+
* a documentation website built with **MkDocs + Material**
9+
* automatic deployment to **GitHub Pages** using GitHub Actions
10+
* development history files (changelog, roadmap, dev log)
11+
* an `AGENTS.md` file with guidance for AI coding agents
12+
13+
The website is built from the `docs/` folder and automatically deployed when changes are pushed.
14+
15+
---
16+
17+
# Enable the Website
18+
19+
After creating a repository from this template you must enable GitHub Pages once.
20+
21+
1. Go to **Settings → Pages**
22+
2. Under **Build and deployment**, choose
23+
**Source: GitHub Actions**
24+
25+
The site will then deploy automatically on push.
26+
27+
Your site will appear at:
28+
29+
```
30+
https://<your-username>.github.io/<repository-name>/
31+
```
32+
33+
---
34+
35+
# Preview Locally
36+
37+
```
38+
pip install mkdocs mkdocs-material
39+
mkdocs serve
40+
```
41+
42+
Then open:
43+
44+
```
45+
http://127.0.0.1:8000
46+
```
47+
48+
---
49+
50+
Use **"Use this template"** on GitHub to start a new project.
118 KB
Loading
15 KB
Binary file not shown.

docs/assets/hero.jpg

1.05 MB
Loading

0 commit comments

Comments
 (0)