Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
37 changes: 37 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Docs to GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[docs]

- name: Build docs
run: mkdocs build --site-dir site

- name: Deploy to GitHub Pages
# Uncomment the following line to deploy only from the main branch
# if: github.ref == 'refs/heads/main'

uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
7 changes: 7 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* [data](docs/api/jitr/data.md)
* [optical_potentials](docs/api/jitr/optical_potentials/index.md)
* [reactions](docs/api/jitr/reactions/index.md)
* [utils](docs/api/jitr/utils/index.md)
* [quadrature](docs/api/jitr/quadrature/index.md)
* [xs](docs/api/jitr/xs/index.md)
* [rmatrix](docs/api/jitr/rmatrix/index.md)
7 changes: 7 additions & 0 deletions api/compute/compute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jitr.compute

::: jitr.compute
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
7 changes: 7 additions & 0 deletions api/configuration/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jitr.config

::: jitr.config
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
7 changes: 7 additions & 0 deletions api/data/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jitr.data

::: jitr.data
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
8 changes: 8 additions & 0 deletions api/jitr/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# `jitr.data`

::: jitr.data
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
9 changes: 9 additions & 0 deletions api/jitr/optical_potentials/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.optical_potentials`

::: jitr.optical_potentials
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions api/jitr/quadrature/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.quadrature`

::: jitr.quadrature
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions api/jitr/reactions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.reactions`

::: jitr.reactions
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions api/jitr/rmatrix/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.rmatrix`

::: jitr.rmatrix
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions api/jitr/utils/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.utils`

::: jitr.utils
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions api/jitr/xs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.xs`

::: jitr.xs
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
7 changes: 7 additions & 0 deletions api/reaction/elastic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jitr.xs.elastic

::: jitr.xs.elastic
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
7 changes: 7 additions & 0 deletions api/reaction/quasielastic_pn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jitr.xs.quasielastic_pn

::: jitr.xs.quasielastic_pn
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
7 changes: 7 additions & 0 deletions api/visualization/visualize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jitr.visualize

::: jitr.visualize
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
8 changes: 8 additions & 0 deletions docs/api/jitr/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# `jitr.data`

::: jitr.data
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
9 changes: 9 additions & 0 deletions docs/api/jitr/optical_potentials/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.optical_potentials`

::: jitr.optical_potentials
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions docs/api/jitr/quadrature/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.quadrature`

::: jitr.quadrature
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions docs/api/jitr/reactions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.reactions`

::: jitr.reactions
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions docs/api/jitr/rmatrix/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.rmatrix`

::: jitr.rmatrix
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions docs/api/jitr/utils/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.utils`

::: jitr.utils
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
9 changes: 9 additions & 0 deletions docs/api/jitr/xs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `jitr.xs`

::: jitr.xs
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
heading_level: 2
show_submodules: true
15 changes: 15 additions & 0 deletions docs/api/reaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Reaction Modules

## `jitr.xs.elastic`
::: jitr.xs.elastic
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false

## `jitr.xs.quasielastic_pn`
::: jitr.xs.quasielastic_pn
options:
show_root_heading: true
show_root_toc_entry: true
show_root_full_path: false
Binary file added docs/assets/jitr_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Contributing to jitr

We welcome contributions! Here's how to get started:

## Development Setup

1. Clone the repository:
```bash
git clone git@github.com:beykyle/jitr.git
```

2. Install dependencies:
```bash
pip install -r requirements.txt
```

3. Install jitr in editable mode:
```bash
pip install -e .
```

## Running Tests

Execute the test suite with:
```bash
pytest jitr
```

## Contribution Guidelines

- Fork the repository and create a new branch for your feature or fix
- Add tests for any new functionality
- Ensure all tests pass and code meets quality standards
- Submit a pull request with a clear description of changes

## Report Issues

Open an issue on GitHub if you encounter any problems or have suggestions.
21 changes: 21 additions & 0 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Examples & Tutorials

Explore practical implementations of jitr through these interactive notebooks:

| Notebook | Description | Key Topics |
|----------|-------------|------------|
| [Built-in OMPs UQ](notebooks/builtin_omps_uq.ipynb) | Uncertainty quantification for optical model potentials | OMP parameters, uncertainty propagation, sensitivity analysis |
| [Reaction Modeling](notebooks/reaction.ipynb) | Modeling nuclear reactions with R-matrix formalism | Cross section calculation, resonance analysis, channel coupling |
| [How to Define Your Interaction](notebooks/how_to_define_your_interaction.ipynb) | Creating custom nuclear potentials | Potential definition, parameterization, validation |
| [Mass Exploration](notebooks/mass_exploration.ipynb) | Exploring nuclear mass models | Mass tables, systematics, model comparison |
| [Validation Studies](notebooks/chex_jitr_validation.ipynb) | Validating jitr against experimental data | Data comparison, uncertainty analysis, model accuracy |
| [Comparison to Runge Kutta](notebooks/Comparison_to_Runge_Kutta.ipynb) | Numerical method comparisons | Solver accuracy, performance benchmarking |
| [Integration Techniques](notebooks/integration.ipynb) | Advanced integration methods | Numerical integration, mesh optimization |

## Running Examples Locally
1. Install jitr: `pip install jitr`
2. Launch Jupyter: `jupyter notebook`
3. Navigate to `examples/notebooks/`
4. Open and run any notebook

> Note: Some notebooks may require additional data files from the `data/` directory
File renamed without changes.
56 changes: 56 additions & 0 deletions docs/gen_api_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import os
import mkdocs_gen_files
from pathlib import Path

nav = mkdocs_gen_files.Nav()

# Base package name
package = "jitr"

# Get all Python modules and subpackages
src_path = Path("src") / package
modules = []
subpackages = []

for item in src_path.iterdir():
if item.is_file() and item.suffix == ".py" and not item.name.startswith("__"):
modules.append(f"{package}.{item.stem}")
elif item.is_dir() and not item.name.startswith("__"):
subpackages.append(f"{package}.{item.name}")

# Generate API documentation for modules
for module in modules:
doc_path = f"docs/api/{module.replace('.', '/')}.md"
os.makedirs(os.path.dirname(doc_path), exist_ok=True)
with open(doc_path, "w") as f:
f.write(f"# `{module}`\n\n")
f.write(f"::: {module}\n")
f.write(" options:\n")
f.write(" show_root_heading: true\n")
f.write(" show_root_toc_entry: true\n")
f.write(" show_root_full_path: false\n")
f.write(" heading_level: 2\n")

nav[module.split(".")[-1]] = doc_path

# Generate API documentation for subpackages
for subpackage in subpackages:
doc_path = f"docs/api/{subpackage.replace('.', '/')}/index.md"
os.makedirs(os.path.dirname(doc_path), exist_ok=True)
with open(doc_path, "w") as f:
f.write(f"# `{subpackage}`\n\n")
f.write(f"::: {subpackage}\n")
f.write(" options:\n")
f.write(" show_root_heading: true\n")
f.write(" show_root_toc_entry: true\n")
f.write(" show_root_full_path: false\n")
f.write(" heading_level: 2\n")
f.write(" show_submodules: true\n")

nav[subpackage.split(".")[-1]] = doc_path

# Write navigation file
with open("SUMMARY.md", "w") as nav_file:
nav_file.writelines(nav.build_literate_nav())

print("API documentation generated successfully!")
Loading
Loading