spectraxgk 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spectraxgk-0.0.1/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
- spectraxgk-0.0.1/.github/ISSUE_TEMPLATE/config.yml +6 -0
- spectraxgk-0.0.1/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- spectraxgk-0.0.1/.github/pull_request_template.md +34 -0
- spectraxgk-0.0.1/.github/workflows/ci.yml +45 -0
- spectraxgk-0.0.1/.github/workflows/docs.yml +64 -0
- spectraxgk-0.0.1/.github/workflows/release.yml +29 -0
- spectraxgk-0.0.1/.gitignore +212 -0
- spectraxgk-0.0.1/.pre-commit-config.yaml +39 -0
- spectraxgk-0.0.1/CONTRIBUTING.md +110 -0
- spectraxgk-0.0.1/LICENSE +21 -0
- spectraxgk-0.0.1/MANIFEST.in +2 -0
- spectraxgk-0.0.1/PKG-INFO +301 -0
- spectraxgk-0.0.1/README.md +271 -0
- spectraxgk-0.0.1/docs/api/index.md +31 -0
- spectraxgk-0.0.1/docs/dev_guide.md +98 -0
- spectraxgk-0.0.1/docs/index.md +38 -0
- spectraxgk-0.0.1/docs/inputs.md +121 -0
- spectraxgk-0.0.1/docs/install.md +85 -0
- spectraxgk-0.0.1/docs/javascripts/mathjax-config.js +23 -0
- spectraxgk-0.0.1/docs/outputs.md +95 -0
- spectraxgk-0.0.1/docs/physics.md +107 -0
- spectraxgk-0.0.1/docs/quickstart.md +74 -0
- spectraxgk-0.0.1/docs/requirements.txt +5 -0
- spectraxgk-0.0.1/examples/README.md +81 -0
- spectraxgk-0.0.1/examples/landau_damping.toml +63 -0
- spectraxgk-0.0.1/examples/two_stream.toml +77 -0
- spectraxgk-0.0.1/mkdocs.yml +75 -0
- spectraxgk-0.0.1/old_src/diffraxtemp.py +190 -0
- spectraxgk-0.0.1/old_src/qutemp.py +137 -0
- spectraxgk-0.0.1/old_src/temp.py +311 -0
- spectraxgk-0.0.1/pyproject.toml +109 -0
- spectraxgk-0.0.1/requirements.txt +4 -0
- spectraxgk-0.0.1/setup.cfg +4 -0
- spectraxgk-0.0.1/spectraxgk/__init__.py +8 -0
- spectraxgk-0.0.1/spectraxgk/backends.py +143 -0
- spectraxgk-0.0.1/spectraxgk/cli.py +66 -0
- spectraxgk-0.0.1/spectraxgk/constants.py +7 -0
- spectraxgk-0.0.1/spectraxgk/dg.py +389 -0
- spectraxgk-0.0.1/spectraxgk/diagnostics.py +163 -0
- spectraxgk-0.0.1/spectraxgk/fourier.py +451 -0
- spectraxgk-0.0.1/spectraxgk/hermite_ops.py +61 -0
- spectraxgk-0.0.1/spectraxgk/io_config.py +271 -0
- spectraxgk-0.0.1/spectraxgk/plots.py +386 -0
- spectraxgk-0.0.1/spectraxgk/poisson.py +78 -0
- spectraxgk-0.0.1/spectraxgk/util.py +171 -0
- spectraxgk-0.0.1/spectraxgk.egg-info/PKG-INFO +301 -0
- spectraxgk-0.0.1/spectraxgk.egg-info/SOURCES.txt +58 -0
- spectraxgk-0.0.1/spectraxgk.egg-info/dependency_links.txt +1 -0
- spectraxgk-0.0.1/spectraxgk.egg-info/entry_points.txt +2 -0
- spectraxgk-0.0.1/spectraxgk.egg-info/requires.txt +16 -0
- spectraxgk-0.0.1/spectraxgk.egg-info/top_level.txt +1 -0
- spectraxgk-0.0.1/tests/README.md +83 -0
- spectraxgk-0.0.1/tests/__init__.py +0 -0
- spectraxgk-0.0.1/tests/conftest.py +8 -0
- spectraxgk-0.0.1/tests/test_energy_diag.py +13 -0
- spectraxgk-0.0.1/tests/test_fourier_linear_smoke.py +37 -0
- spectraxgk-0.0.1/tests/test_poisson_and_derivatives.py +12 -0
- spectraxgk-0.0.1/tests/test_units_and_parsing.py +26 -0
- spectraxgk-0.0.1/tests/test_util_kgrid.py +13 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: π Bug report
|
|
3
|
+
about: Something isnβt working as expected
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
A clear and concise description of the bug.
|
|
9
|
+
|
|
10
|
+
## Repro Steps
|
|
11
|
+
1. Command(s) you ran (paste exact input):
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
spectraxgk --input examples/<file>.toml
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
2. What happened vs what you expected?
|
|
18
|
+
|
|
19
|
+
## Logs / Traceback
|
|
20
|
+
<details>
|
|
21
|
+
<summary>Expand to show full logs</summary>
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
# paste the full error here
|
|
26
|
+
|
|
27
|
+
````
|
|
28
|
+
</details>
|
|
29
|
+
|
|
30
|
+
## Environment
|
|
31
|
+
- OS:
|
|
32
|
+
- Python version: `python --version`
|
|
33
|
+
- spectraxgk version: `python -c "import spectraxgk, importlib.metadata as m; print(m.version('spectraxgk'))"`
|
|
34
|
+
- JAX version: `python -c "import jax; print(jax.__version__)"`
|
|
35
|
+
|
|
36
|
+
## Config snippet
|
|
37
|
+
If applicable, paste relevant TOML sections:
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
# minimal input that reproduces the bug
|
|
41
|
+
````
|
|
42
|
+
|
|
43
|
+
## Additional context
|
|
44
|
+
|
|
45
|
+
Anything else we should know?
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: π‘ Feature request
|
|
3
|
+
about: Suggest an idea or enhancement
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
What would you like to add or improve?
|
|
9
|
+
|
|
10
|
+
## Motivation
|
|
11
|
+
Why is this useful (scientific value, UX, performance)?
|
|
12
|
+
|
|
13
|
+
## Proposal
|
|
14
|
+
- High-level description of the change
|
|
15
|
+
- Interfaces affected (CLI/API/TOML), if any
|
|
16
|
+
- Backward compatibility considerations
|
|
17
|
+
|
|
18
|
+
## Alternatives
|
|
19
|
+
What alternative solutions have you considered?
|
|
20
|
+
|
|
21
|
+
## Additional context
|
|
22
|
+
Screenshots, references, or related papers.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
## Summary
|
|
3
|
+
Explain what this PR changes and why.
|
|
4
|
+
|
|
5
|
+
## Type of change
|
|
6
|
+
- [ ] Bug fix
|
|
7
|
+
- [ ] New feature
|
|
8
|
+
- [ ] Refactor / cleanup
|
|
9
|
+
- [ ] Docs only
|
|
10
|
+
- [ ] CI / tooling
|
|
11
|
+
|
|
12
|
+
## How to test
|
|
13
|
+
- Commands / scripts to run:
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
pytest -q
|
|
17
|
+
ruff check .
|
|
18
|
+
ruff format --check .
|
|
19
|
+
mypy
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
- If it touches physics, include a quick before/after plot or metric (e.g., growth rate).
|
|
23
|
+
|
|
24
|
+
## Checklist
|
|
25
|
+
- [ ] Code follows style (Ruff) and types (MyPy)
|
|
26
|
+
- [ ] Tests added or updated
|
|
27
|
+
- [ ] Docs updated (README / examples / docstrings)
|
|
28
|
+
- [ ] Backwards compatible (or migration noted)
|
|
29
|
+
|
|
30
|
+
## Related issues
|
|
31
|
+
Closes #<issue-number> (if applicable)
|
|
32
|
+
|
|
33
|
+
## Notes for reviewers
|
|
34
|
+
Anything you want reviewers to pay special attention to.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint-type-test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.11"
|
|
19
|
+
|
|
20
|
+
- name: Install build + runtime deps
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade pip
|
|
23
|
+
pip install -e ".[dev,test]" # assumes you defined extras in pyproject
|
|
24
|
+
|
|
25
|
+
- name: Ruff lint (CI)
|
|
26
|
+
run: |
|
|
27
|
+
ruff --version
|
|
28
|
+
# Fail CI if lint errors remain (no --fix in CI):
|
|
29
|
+
ruff check .
|
|
30
|
+
|
|
31
|
+
- name: Ruff format check (CI)
|
|
32
|
+
run: |
|
|
33
|
+
ruff format --check .
|
|
34
|
+
|
|
35
|
+
- name: MyPy (types)
|
|
36
|
+
run: |
|
|
37
|
+
mypy --version
|
|
38
|
+
mypy
|
|
39
|
+
|
|
40
|
+
- name: Pytest
|
|
41
|
+
env:
|
|
42
|
+
MPLBACKEND: Agg # headless tests for matplotlib
|
|
43
|
+
JAX_ENABLE_X64: "true"
|
|
44
|
+
run: |
|
|
45
|
+
pytest -q --maxfail=1 --disable-warnings
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Build and deploy docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
paths:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- 'mkdocs.yml'
|
|
9
|
+
- 'spectraxgk/**'
|
|
10
|
+
- '.github/workflows/docs.yml'
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
# GitHub Pages needs these permissions
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
# Only one Pages deploy at a time
|
|
20
|
+
concurrency:
|
|
21
|
+
group: "pages"
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Setup Python
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: '3.11'
|
|
35
|
+
|
|
36
|
+
- name: Install docs deps
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip install --upgrade pip
|
|
39
|
+
# MkDocs + Material + your plugins
|
|
40
|
+
pip install \
|
|
41
|
+
mkdocs \
|
|
42
|
+
mkdocs-material \
|
|
43
|
+
mkdocstrings[python] \
|
|
44
|
+
mkdocs-autorefs \
|
|
45
|
+
pymdown-extensions
|
|
46
|
+
|
|
47
|
+
- name: Build site
|
|
48
|
+
run: mkdocs build --strict --site-dir site
|
|
49
|
+
|
|
50
|
+
- name: Upload artifact
|
|
51
|
+
uses: actions/upload-pages-artifact@v3
|
|
52
|
+
with:
|
|
53
|
+
path: site
|
|
54
|
+
|
|
55
|
+
deploy:
|
|
56
|
+
environment:
|
|
57
|
+
name: github-pages
|
|
58
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
needs: build
|
|
61
|
+
steps:
|
|
62
|
+
- name: Deploy to GitHub Pages
|
|
63
|
+
id: deployment
|
|
64
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-and-publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
|
|
23
|
+
- name: Build artifacts (sdist + wheel)
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip build
|
|
26
|
+
python -m build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# Manually added
|
|
210
|
+
*.mp4
|
|
211
|
+
.gitignore
|
|
212
|
+
.DS_Store
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
# --- Core hygiene ---
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v4.6.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: trailing-whitespace
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-toml
|
|
10
|
+
- id: check-json
|
|
11
|
+
|
|
12
|
+
# --- Ruff: lint + import sort + pyupgrade etc. ---
|
|
13
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
14
|
+
rev: v0.6.8
|
|
15
|
+
hooks:
|
|
16
|
+
- id: ruff
|
|
17
|
+
args: [--fix] # autofix lint issues where safe
|
|
18
|
+
- id: ruff-format # use Ruff as the code formatter
|
|
19
|
+
|
|
20
|
+
# --- MyPy (type checking) ---
|
|
21
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
22
|
+
rev: v1.11.2
|
|
23
|
+
hooks:
|
|
24
|
+
- id: mypy
|
|
25
|
+
additional_dependencies:
|
|
26
|
+
- types-setuptools
|
|
27
|
+
- types-PyYAML
|
|
28
|
+
# Keep mypy fast: only check project src + CLI, not venvs or notebooks
|
|
29
|
+
files: ^(spectraxgk/|tests/|examples/|scripts/|cli.py)
|
|
30
|
+
# You can pass custom mypy config file here if non-standard:
|
|
31
|
+
args: ["--config-file=pyproject.toml"]
|
|
32
|
+
|
|
33
|
+
# --- Spelling (optional but nice) ---
|
|
34
|
+
- repo: https://github.com/codespell-project/codespell
|
|
35
|
+
rev: v2.3.0
|
|
36
|
+
hooks:
|
|
37
|
+
- id: codespell
|
|
38
|
+
additional_dependencies: [tomli]
|
|
39
|
+
args: ["-L", "nd,fo"] # allowlist false positives
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Contributing to SPECTRAX-GK
|
|
2
|
+
|
|
3
|
+
We welcome contributions from the community!
|
|
4
|
+
This document explains how to set up your development environment, run tests, and submit changes.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## π Development Setup
|
|
9
|
+
|
|
10
|
+
1. **Fork and clone** the repository:
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/<your-username>/SPECTRAX-GK.git
|
|
13
|
+
cd SPECTRAX-GK
|
|
14
|
+
````
|
|
15
|
+
|
|
16
|
+
2. **Install in editable mode with dev dependencies**:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install -e ".[dev]"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. **Enable pre-commit hooks**:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pre-commit install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## π§ͺ Running Tests
|
|
31
|
+
|
|
32
|
+
We use [pytest](https://docs.pytest.org) for unit and regression tests.
|
|
33
|
+
|
|
34
|
+
Run all tests:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pytest -v
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Run with coverage:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pytest --cov=spectraxgk --cov-report=term-missing
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## π Code Style & Quality
|
|
49
|
+
|
|
50
|
+
* **Linting & formatting**: [Ruff](https://github.com/astral-sh/ruff)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
ruff check .
|
|
54
|
+
ruff format .
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
* **Type checking**: [MyPy](https://mypy.readthedocs.io)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
mypy .
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
* **Pre-commit hooks** automatically enforce these checks before commit.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## π Pull Requests
|
|
68
|
+
|
|
69
|
+
1. Create a feature branch:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git checkout -b feature/my-new-feature
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
2. Commit changes with clear messages:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git commit -m "feat: add DG solver for bump-on-tail"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
3. Push and open a Pull Request:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git push origin feature/my-new-feature
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
PRs are automatically tested via GitHub Actions.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## π§βπ¬ What to Contribute
|
|
92
|
+
|
|
93
|
+
* Bug fixes
|
|
94
|
+
* New physics modules (e.g., collisional operators)
|
|
95
|
+
* Additional diagnostics or visualization tools
|
|
96
|
+
* Documentation improvements
|
|
97
|
+
* Tests for uncovered parts of the code
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## π Resources
|
|
102
|
+
|
|
103
|
+
* [JAX docs](https://jax.readthedocs.io)
|
|
104
|
+
* [Diffrax](https://docs.kidger.site/diffrax/)
|
|
105
|
+
* [pytest](https://docs.pytest.org)
|
|
106
|
+
* [Ruff](https://docs.astral.sh/ruff/)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
Thank you for contributing to **SPECTRAX-GK**!
|
spectraxgk-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 UW Plasma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|