Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
597f677
docs: rewrite README and add codebase audit
bgriffen Jul 27, 2026
4863680
chore: add .gitignore
bgriffen Jul 27, 2026
de8d599
docs: add MIT license
bgriffen Jul 27, 2026
62810ac
refactor: port to Python 3
bgriffen Jul 27, 2026
769e6ef
refactor: migrate off the retired enthought.* Traits namespace
bgriffen Jul 27, 2026
764de4a
refactor: move modules into a src/cme package
bgriffen Jul 27, 2026
1e3f50a
refactor: extract the path conventions into cme.naming
bgriffen Jul 27, 2026
3911c05
refactor: extract named cosmologies into cme.cosmology
bgriffen Jul 27, 2026
784a13e
refactor: extract the configuration writers into cme.writers
bgriffen Jul 27, 2026
b97ab6a
refactor: extract candidate selection into cme.science.candidates
bgriffen Jul 27, 2026
636b0ad
perf: hoist loop-invariant parent snapshot reads out of the nrvir loop
bgriffen Jul 27, 2026
0f30c6b
fix: correct typo'd trait assignments that silently disabled features
bgriffen Jul 27, 2026
4010574
fix: correct wrong coordinates, unbound locals and dead control flow
bgriffen Jul 27, 2026
21b918e
refactor: run external commands without a shell
bgriffen Jul 27, 2026
4e182b2
feat: load cluster profiles from clusters.toml
bgriffen Jul 27, 2026
6d8c6ab
chore: remove dead code, close file handles, add CI
bgriffen Jul 27, 2026
d68cbfc
docs: update README and AUDIT for the reorganised codebase
bgriffen Jul 27, 2026
cfd24ce
fix: source the Gadget tab's cosmology defaults from cme.cosmology
bgriffen Jul 27, 2026
adb3e1f
chore: replace personal contact details with a role address
bgriffen Jul 27, 2026
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
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

# Only the display-free modules are installed and tested. The GUI extra
# needs wxPython, Mayavi and a display, and the tabs additionally import
# the `modules` simulation-I/O package, which is not distributed with this
# repository -- see README.md.
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

- name: Test
run: python -m pytest tests/ -v

- name: Doctests
run: |
python -m pytest --doctest-modules \
src/cme/naming.py \
src/cme/cosmology.py \
src/cme/config.py \
src/cme/writers/music.py \
src/cme/writers/gadget.py \
src/cme/writers/submit.py \
src/cme/science/candidates.py

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install ruff
run: python -m pip install ruff

- name: Lint
run: ruff check .

# Scoped to the display-free modules and the tests. The TraitsUI tabs are
# not yet formatted: reflowing those nested view declarations would bury
# the behavioural changes in this branch under whitespace.
- name: Format check
run: |
ruff format --check \
src/cme/naming.py \
src/cme/cosmology.py \
src/cme/shell.py \
src/cme/config.py \
src/cme/writers/ \
src/cme/science/ \
tests/

syntax:
# The GUI modules cannot be imported without a display or the `modules`
# package, but they must at least parse on every supported version.
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Compile all modules
run: python -m compileall -q src/
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Byte-compiled / cache
__pycache__/
*.py[cod]
*$py.class

# Packaging / distribution
build/
dist/
*.egg-info/
.eggs/

# Virtual environments
.venv/
venv/
env/

# Test and lint caches
.pytest_cache/
.ruff_cache/
.coverage
htmlcov/

# Editor / OS cruft
.DS_Store
*.swp
.idea/
.vscode/

# Generated simulation artifacts.
# The Gadget tab writes its driver script into the working directory
# (see cme/ui/gadget.py), and MUSIC leaves noise and scratch files behind.
rungadget.sh
wnoise_*
temp_*
ics.[0-9]*
ExpansionList*

# Generated configuration. These are outputs of the Initial Conditions and
# Gadget tabs, reproducible from the GUI state, and belong with the run
# directory rather than in version control.
*.conf
param.txt
param_sub.txt
Config.sh
Config_sub.sh
runscript
runscript_sub

# Run outputs
outputs/
OUTPUT
ERROR
OUTPUTsub
ERRORsub
*.o[0-9]*
*.e[0-9]*
425 changes: 425 additions & 0 deletions AUDIT.md

Large diffs are not rendered by default.

71 changes: 0 additions & 71 deletions Common.py

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2014-2026 Brendan Griffen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading