Skip to content

Commit

Permalink
Dev1 (#22)
Browse files Browse the repository at this point in the history
* Fix the probme when alpha is too low the result is incorrect.

* ignore slice type limit (int)

* Fix ruff syntax

* add pyright config and type ignore

* Fix type in rcimodel and remove responsibility of scale from Indexsnapshot

* Remove floating point error in intensity.

* Fix tox (mypy)

* IndexedSnapshop accept nan value inside with corrsponding tests.

* Tests for input data with NAN values.

* Quick_start and some features in blrprx model.

* Delete useless file.

* Fix some typing and linting for mypy and ruff.

* Fix tox and use poetry correctly. Minor text change in quick_start.py.

* Testing Github workflow doc generation.

* Fixing python 3.10 treated as 3.1. Now using 3.11.

* Publish the 1.0.0 pyblrp. Change theme of doc.

* Fix doc theme package name.

* Fix the READMD url and image trasparency.

* Fix s some requirements.txt files and tox.ini settings for mypy and ruff using poetry export command.

* Remove hash from requirements.txt requirements-dev.txt and docs/requirements-doc.txt

* Only run mypy and ruff on ubuntu-latest.

* Fix github action envs.

* Fix github action envs.

* Fix github action.:

* Fix github action.

* Remove doc building from tox.ini.
  • Loading branch information
KilinW authored Jul 1, 2024
1 parent 4a80b52 commit df3e5e7
Show file tree
Hide file tree
Showing 23 changed files with 1,632 additions and 149,504 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy docs

on:
push:
branches:
- main
- dev1

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
pip install -r docs/requirements-doc.txt
- name: Build docs
run: |
sphinx-build -M html docs/source docs/build
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/dev1'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
14 changes: 10 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11']

include:
- os: ubuntu-latest
envs: ruff,mypy # Specify environments to run only on Ubuntu

steps:
- uses: actions/checkout@v2
Expand All @@ -22,6 +24,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test using tox
run: tox
pip install poetry
- name: Install dependencies with Poetry
run: poetry install

- name: Test using poetry run tox
run: |
poetry run tox
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
## Model Description
The Bartlett-Lewis Rectangular Pulses model, enhanced in this package, draws on the cutting-edge research presented in Onof and Wang (2020). It operates as a robust stochastic framework designed to simulate rainfall intensity effectively. By modelling the behavior of rainfall through a Poisson cluster point process, the package accounts for individual characteristics of rain cells and storm patterns, including cell duration, intensity, and overall storm duration. Enhanced by the latest scientific advances, this model offers improved accuracy in predicting and simulating the stochastic nature of rainfall events.

![fig01-RBL](assets/fig01-RBL.png)
![fig01-RBL](https://raw.githubusercontent.com/NTU-CompHydroMet-Lab/pyBL/main/assets/fig01-RBL.png)


## Workflow of pyBL
Expand All @@ -58,7 +58,7 @@ The pyBL package employs a systematic workflow to generate synthetic rainfall ti
<!-- //CY: the necessarity of adding this line? -->
<!-- For a detailed breakdown of each step, see our Detailed Workflow Documentation. -->

![fig02-package-workflow](assets/fig02-package-workflow.png)
![fig02-package-workflow](https://raw.githubusercontent.com/NTU-CompHydroMet-Lab/pyBL/main/assets/fig02-package-workflow.png)


## Installation Guide
Expand Down
Binary file modified assets/fig02-package-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 30 additions & 2 deletions docs/requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# Requirements for building documentation
furo
accessible-pygments==0.0.5 ; python_version >= "3.9" and python_version < "4.0"
alabaster==0.7.16 ; python_version >= "3.9" and python_version < "4.0"
babel==2.15.0 ; python_version >= "3.9" and python_version < "4.0"
beautifulsoup4==4.12.3 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.6.2 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32"
docutils==0.21.2 ; python_version >= "3.9" and python_version < "4.0"
idna==3.7 ; python_version >= "3.9" and python_version < "4.0"
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "4.0"
importlib-metadata==8.0.0 ; python_version >= "3.9" and python_version < "3.10"
jinja2==3.1.4 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "4.0"
packaging==23.2 ; python_version >= "3.9" and python_version < "4.0"
pydata-sphinx-theme==0.15.4 ; python_version >= "3.9" and python_version < "4.0"
pygments==2.18.0 ; python_version >= "3.9" and python_version < "4.0"
requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0"
snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
soupsieve==2.5 ; python_version >= "3.9" and python_version < "4.0"
sphinx==7.3.7 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-applehelp==1.0.8 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-devhelp==1.0.6 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-htmlhelp==2.0.5 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-qthelp==1.0.7 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-serializinghtml==1.1.10 ; python_version >= "3.9" and python_version < "4.0"
tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11"
typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "4.0"
urllib3==2.2.2 ; python_version >= "3.9" and python_version < "4.0"
zipp==3.19.2 ; python_version >= "3.9" and python_version < "3.10"
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
project = "pyBL"
copyright = "2023, KilinWei"
author = "KilinWei"
release = "0.0.1"
release = "1.0.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand All @@ -37,5 +37,5 @@

master_doc = "index"

html_theme = "furo"
html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]
13 changes: 0 additions & 13 deletions examples/5Y_1_Theta.csv

This file was deleted.

Binary file modified examples/data.zip
Binary file not shown.
Loading

0 comments on commit df3e5e7

Please sign in to comment.