Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
34 changes: 34 additions & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: gfts
channels:
- conda-forge
- defaults
dependencies:
- python=3.11
- jupyter-book
- matplotlib
- numpy
- ghp-import
- xarray
- cftime
- netcdf4
- h5netcdf
- cartopy
- holoviews
- hvplot
- geoviews
- cartopy
- geopandas
- movingpandas
- pooch
- fsspec
- s3fs
- git
- jupyterlab-git
- "nodejs>=16,<17"
- jupyterlab-myst>=2.0.0
- pip:
- wget
- sphinx-exercise
- jupytext
- nbgitpuller
- mystmd
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy

on:
# Trigger the workflow on push to main branch and tutorial path
push:
branches:
- main
paths:
- visualisation/**

# This job installs dependencies, build the jupyter notebook, and pushes it to `render`, a new `branch`
jobs:
build:
name: Setup
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Set up conda and dependencies
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .binder/environment.yml
environment-name: xdggs
condarc: |
channels:
- conda-forge
# Build the book
- name: Build the jupyter book
run: |
jupyter-book build visualisation
# Deploy the book's HTML to gh-pages branch
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: visualisation/_build/html
force_orphan: true
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --install-hooks
#

ci:
# pre-commit.ci will open PRs updating our hooks once a month
autoupdate_schedule: monthly

exclude: "(.*/)?secrets/.*|code_of_conduct.md|rule_of_participation.md"

repos:
# autoformat and lint Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
types_or: [python, jupyter]
args: ["--fix", "--show-fixes"]
- id: ruff-format
types_or: [python, jupyter]

# Autoformat: markdown, yaml, javascript (see the file .prettierignore)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier

# Autoformat and linting, misc. details
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: check-case-conflict
- id: check-executables-have-shebangs
52 changes: 52 additions & 0 deletions visualisation/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#######################################################################################
# A default configuration that will be loaded for all jupyter books
# See the documentation for help and more options:
# https://jupyterbook.org/customize/config.html

#######################################################################################
# Book settings
title: xdggs examples
author: Pangeo # The author of the book
copyright: "2024" # Copyright year to be placed in the footer
logo: "./images/xdggs.png" # A path to the book logo
only_build_toc_files: true

# Force re-execution of notebooks on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: false
timeout: 1000

# Add a launch button on a specific binder instance
launch_buttons:
notebook_interface: "jupyterlab"
binderhub_url: "https://notebooks.gesis.org/binder/" # The URL for your BinderHub (e.g., https://mybinder.org)
jupyterhub_url: "http://pangeo-eosc.vm.fedcloud.eu/jupyterhub/" # The URL for your JupyterHub. (e.g., https://datahub.berkeley.edu)

# Define the name of the latex output file for PDF builds
latex:
latex_documents:
targetname: xdggs.tex

# Add a bibtex file so that we can create citations
bibtex_bibfiles:
- references.bib

# Information about where the book exists on the web
repository:
url: https://github.com/tinaok/xdggs_examples # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
use_issues_button: true
use_repository_button: true

sphinx:
config:
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
extra_extensions:
- sphinx_exercise
2 changes: 2 additions & 0 deletions visualisation/_toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
format: jb-book
root: xdggs-explore-demo
Binary file added visualisation/images/xdggs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added visualisation/readme.md
Empty file.
7,442 changes: 7,442 additions & 0 deletions visualisation/xdggs-explore-demo.ipynb

Large diffs are not rendered by default.