Skip to content

Commit

Permalink
Package re-structuring and updated docs (#4)
Browse files Browse the repository at this point in the history
* Quotation marks removed

* Reporting update

* Restart

* Actions set up

* rasterio install added

* docs updated

* docs structure updated

* conf file location corrected

* Documentation added

* Merge functionality updated

* Unittesting added

* test script and running added

* Statistics analysis added

* autodoc modules edited

* autodoc dir moved

* module dir changed

* Docs quickstart re-run

* docs dir edited

* markdown enabled
  • Loading branch information
PennyHow authored Apr 30, 2024
1 parent 40e5e5c commit dd78616
Show file tree
Hide file tree
Showing 162 changed files with 2,077 additions and 36,840 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build --sdist --wheel --outdir dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request:
types: [opened, reopened, synchronize, edited]
workflow_dispatch:

jobs:
build:
name: unit_test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8','3.9','3.10']
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install Bottleneck
python3 -m pip install --upgrade setuptools
cd $GITHUB_WORKSPACE
pip install .
- name: Run unit tests
shell: bash
run: |
python3 -m unittest discover griml
25 changes: 5 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@

*.tif
other/out/*
other/datasets/*
other/old/*
src/examples/getHagenBrae.py
src/examples/analyse.py
src/examples/getHagenBrae_dask.py
src/examples/getMargin.py
src/examples/getMarginGIMP.py
src/examples/getTimeSeries.py
src/examples/margin.py
src/examples/process_old.py
src/examples/sar_water.py
*.docx
src/griml/examples/analyse.py
src/griml/examples/getHagenBrae.py
src/griml/examples/getHagenBrae_dask.py
src/griml/examples/getMargin.py
src/griml/examples/getMarginGIMP.py
src/griml/examples/getTimeSeries.py
src/griml/examples/margin.py
src/griml/examples/process_old.py
src/griml/examples/sar_water.py
other/iml_2017/*
other/hagen_brae/*
other/lake_temperature/*
other/south_greenland/*
src/griml/examples/*
26 changes: 26 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

formats:
- pdf
- epub
Binary file removed dist/griml-0.0.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/griml-0.0.1.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
4 changes: 0 additions & 4 deletions docs/build/.buildinfo

This file was deleted.

Binary file removed docs/build/.doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/build/.doctrees/index.doctree
Binary file not shown.
Binary file removed docs/build/.doctrees/modules.doctree
Binary file not shown.
24 changes: 0 additions & 24 deletions docs/build/_sources/index.rst.txt

This file was deleted.

56 changes: 0 additions & 56 deletions docs/build/_sources/modules.rst.txt

This file was deleted.

Loading

0 comments on commit dd78616

Please sign in to comment.