-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ea31e9
commit c9b5d35
Showing
15 changed files
with
1,340 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish Docs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
directory: | ||
description: 'Build docs' | ||
default: 'build it now' | ||
required: false | ||
|
||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10 | ||
- name: Setup Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: 1.3.2 | ||
- name: Install Packages | ||
run: poetry install --with docs | ||
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Deploy | ||
run: poetry run mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build and Publish Package to Pypi | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
python-version: [3.9,3.10] | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: 1.3.2 | ||
- name: Install Packages | ||
run: poetry install --with docs,test | ||
- name: Build coverage file | ||
run: | | ||
pytest --cache-clear --cov=app tests/ > pytest-coverage.txt | ||
- name: Comment coverage | ||
uses: coroo/[email protected] | ||
build-n-publish: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10 | ||
# - name: Generate dist | ||
# run: python setup.py sdist | ||
# - name: Publish package | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Test Code with Pip | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
- "!gh-pages" | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: 'Test It' | ||
required: false | ||
default: 'I Just wanna test it' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
python-version: [3.9, 3.10] | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: 1.3.2 | ||
- name: Install Packages | ||
run: poetry install --with docs | ||
- name: Build coverage file | ||
run: | | ||
poetry run pytest --cache-clear --cov=app tests/ > pytest-coverage.txt | ||
- name: Comment coverage | ||
uses: coroo/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
exclude: "^notebooks/|^notes/" | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.960 | ||
hooks: | ||
- id: mypy | ||
args: [--no-strict-optional, --ignore-missing-imports] | ||
files: ^(hamiltonian_flow/|tests/) | ||
- repo: https://github.com/ambv/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
language: python | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: ["--multi-line", "3", "--profile", "black"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include README.md | ||
include pyproject.toml | ||
include LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# hamiltonian_flow | ||
|
||
Dataset of simple physical systems. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# hamiltonian_flow Changelog | ||
|
||
## 2024-02-18, 0.0.1 | ||
|
||
Setting up repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Documentation for `hamiltonian_flow` | ||
|
||
Generating dataset for physical systems. | ||
|
||
## Development | ||
|
||
We use `poetry` to manage our python environment. Use | ||
|
||
```sh | ||
poetry install | ||
``` | ||
|
||
to install the requirements. Or run | ||
|
||
```sh | ||
poetry install --with test | ||
``` | ||
|
||
to install the base environment and test environment for development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# References | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Tutorials |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# mkdocs.yml | ||
site_name: "Hamiltonian Flow" | ||
site_author: "" | ||
site_description: "Dataset of simple physical systems." | ||
site_url: "https://kausalflow.github.io/hamiltonian_flow" | ||
repo_url: "https://github.com/kausalflow/hamiltonian_flow" | ||
edit_uri: "blob/main/docs/" | ||
repo_name: "kausalflow/hamiltonian_flow" | ||
|
||
|
||
theme: | ||
name: "material" | ||
# Don't include MkDocs' JavaScript | ||
include_search_page: false | ||
search_index_only: true | ||
|
||
# Default values, taken from mkdocs_theme.yml | ||
language: en | ||
features: | ||
# - navigation.instant | ||
- navigation.sections | ||
- navigation.tabs | ||
palette: | ||
- scheme: default | ||
primary: indigo | ||
accent: indigo | ||
toggle: | ||
icon: material/toggle-switch-off-outline | ||
name: Switch to dark mode | ||
- scheme: slate | ||
primary: red | ||
accent: red | ||
toggle: | ||
icon: material/toggle-switch | ||
name: Switch to light mode | ||
font: | ||
text: Roboto | ||
code: Roboto Mono | ||
# favicon: assets/logo.png | ||
# logo: assets/logo_transparent.png | ||
|
||
|
||
|
||
markdown_extensions: | ||
- admonition | ||
- pymdownx.details | ||
- pymdownx.emoji | ||
- pymdownx.magiclink | ||
- pymdownx.snippets: | ||
check_paths: true | ||
- pymdownx.superfences | ||
- pymdownx.tabbed | ||
- pymdownx.tasklist | ||
- pymdownx.arithmatex: | ||
generic: true | ||
- toc: | ||
permalink: "¤" | ||
|
||
plugins: | ||
- autorefs | ||
- search | ||
- mkdocstrings: | ||
handlers: | ||
python: | ||
selection: | ||
docstring_style: sphinx | ||
watch: | ||
- docs | ||
|
||
extra_javascript: | ||
- javascripts/mathjax.js | ||
- https://polyfill.io/v3/polyfill.min.js?features=es6 | ||
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js | ||
|
||
nav: | ||
- "Home": index.md | ||
- "Tutorials": | ||
- "Introduction": tutorials/index.md | ||
- References: | ||
- "Introduction": references/index.md | ||
- "Changelog": changelog.md |
Oops, something went wrong.