Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
c98ebd7
Starting Refactor: weac_2
pillowbeast Jun 5, 2025
bfeb9da
Refactor: slab/scenario -> now system_model solve.
pillowbeast Jun 6, 2025
2e681a6
Refactor: SystemModel + Eigensystem + Constants + Cached_Properties
pillowbeast Jun 10, 2025
2ec1e91
Refactor: Start with SlabTouchdown
pillowbeast Jun 11, 2025
68e43e5
Refactor: Touchdown Implementation
pillowbeast Jun 13, 2025
d9a12bc
Refactor: Functional + Tested until Unknown Constants
pillowbeast Jun 17, 2025
220df3c
Minor: l -> length
pillowbeast Jun 17, 2025
60cc766
minor
pillowbeast Jun 17, 2025
5465a2e
Ruff Formating + Default ModelInput
pillowbeast Jun 18, 2025
71a4eec
Refactor: Analysis Implementation.
pillowbeast Jun 19, 2025
de54d82
Refactor: Plot + Config + Analyzer
pillowbeast Jun 20, 2025
0689f08
Refactor: Coupled Criterion
pillowbeast Jun 24, 2025
442b006
Refactor: CriteriaEvaluator
pillowbeast Jun 25, 2025
8cd9398
StreamLit: Implementation
pillowbeast Jun 27, 2025
884a439
Proper Slab Deformed Plot
pillowbeast Jun 28, 2025
8cf4c16
Demo + Streamlit + Integration Tests
pillowbeast Jul 1, 2025
ac4ad1b
Minor: Test modification
pillowbeast Jul 1, 2025
3524dca
Profiling: Analyzer
pillowbeast Jul 1, 2025
1ada3a2
Plotting: Envelopes
pillowbeast Jul 2, 2025
750acd7
Plotting + Streamlit Analysis
pillowbeast Jul 3, 2025
724d050
minor
pillowbeast Jul 4, 2025
9b40fef
Backup: Misc Data
pillowbeast Jul 4, 2025
f463313
Minor: Cleanup
pillowbeast Jul 8, 2025
0627e7c
Plotting: Criteria for Scenarios
pillowbeast Jul 8, 2025
c5947a3
Streamlit: Structural changes
pillowbeast Jul 9, 2025
ba03bf3
Visualization: Concept
pillowbeast Jul 9, 2025
24ddd95
Streamlit: Analyzer Extended & Minor: Logging changes
pillowbeast Jul 10, 2025
fc6287b
.gitignore updates
pillowbeast Jul 14, 2025
a6ab257
Streamlit UI: for non-technical user
pillowbeast Jul 14, 2025
285f3f4
Touchdown: Calculation also without PST for DERR calculations
pillowbeast Jul 15, 2025
9706c58
Validation: between weac and weac_2
pillowbeast Jul 15, 2025
4937272
Formatting: Cleanup via Ruff
pillowbeast Jul 15, 2025
45efc5f
Streamlit: Simple Traffic Light Feedback
pillowbeast Jul 15, 2025
3551d16
Rename: crack_l to crack_length (for coherency)
pillowbeast Jul 15, 2025
c700024
Streamlit: Steady-State ERR
pillowbeast Jul 15, 2025
3704c56
Attribute Change: Collapse Factor -> Collapsed Height
pillowbeast Jul 16, 2025
a172247
Mamba: Provide Environment
pillowbeast Jul 16, 2025
856b1df
Streamlit: Touchdown Distance as Traffic Light for Propagation Potential
pillowbeast Jul 16, 2025
eea110d
CleanUp: Formatting + Utils Folder + RM API Folder (un-used code: fas…
pillowbeast Jul 18, 2025
df91a2a
Bug Fix: Forgotten change for last commit
pillowbeast Jul 18, 2025
6684369
Bug Fix: Forgotten change from last commit
pillowbeast Jul 18, 2025
e92517c
CleanUp: minor
pillowbeast Jul 18, 2025
4eba23e
CAAML: Parser from CAAML using snowpylot to Weac Objects
pillowbeast Jul 18, 2025
c9fab76
Attribute Change: Collapse Height calculation based on A.Herwijnen da…
pillowbeast Jul 18, 2025
9a79f15
Minor: Rename snowpilot_parser
pillowbeast Jul 18, 2025
f347486
minor: print statement removal / pydantic validation removal for weak…
pillowbeast Jul 23, 2025
eda1256
feature: snowpilot_parser implementation from caaml to weac objects v…
pillowbeast Jul 23, 2025
41b9f40
constant: changed rho_ice from 917 to 916.7 to align with new impleme…
pillowbeast Jul 24, 2025
9dff7cc
tests: changed directory structure to mimic weac_2 structure / tests …
pillowbeast Jul 24, 2025
25ea693
feat: read out density measurements from snowpilot files / test: writ…
pillowbeast Jul 24, 2025
76d5037
feat: extended layers with grain information
pillowbeast Jul 24, 2025
7593047
admin: clean-up
pillowbeast Jul 24, 2025
38815fd
bugfix: robustify geldsetzer
pillowbeast Jul 24, 2025
9996111
bugfix: hand_hardness,grain_type,grain_size can be None / feat: let l…
pillowbeast Jul 25, 2025
1f0612f
feat: hand_hardness to density / grain_type to density <- based on ge…
pillowbeast Jul 25, 2025
b9b1d20
work_in_progress: snowpilot_parser with new geldsetzer relations
pillowbeast Jul 25, 2025
4c44018
feat/bugfix: evaluate PSTs and fit distributions & plots
pillowbeast Jul 28, 2025
dab381a
update: TODO
pillowbeast Jul 28, 2025
33a89b9
feat: change default values
pillowbeast Jul 29, 2025
5c2fb71
analysis: pst + weac_layer spaced
pillowbeast Jul 29, 2025
c872f5c
feat: eval weak layer every 50 mm
pillowbeast Jul 30, 2025
bdcba88
attri: match crack_height calcualtion between old and new
pillowbeast Jul 31, 2025
ad58824
feat: SSERR & TD calculation / proper root search (brentq) for find_m…
pillowbeast Jul 31, 2025
a9d1cb8
application: weac layer analysis with TD + SSERR & plotting
pillowbeast Jul 31, 2025
191d96d
Bug Fix: Fix collapse Height according to: collapse height is the hei…
pillowbeast Aug 4, 2025
79da639
Minor: cosmetics, rm commented section
pillowbeast Aug 4, 2025
0722ac4
feat: old_weac also output steady-state energy release rate (SSERR/Gd…
pillowbeast Aug 4, 2025
1592a3a
Plotting: Updates for weac layer evaluation
pillowbeast Aug 4, 2025
434f6d5
Minor: comment out parser functions + print_call_stats flag addition
pillowbeast Aug 5, 2025
1c44326
Analysis: LayerWise + Avalanche / Plotting: LayerWise
pillowbeast Aug 5, 2025
eb0aab2
ReStructure: Moving Applications to LayerWise / App-Hub + Exclude: Da…
pillowbeast Aug 6, 2025
082c51e
Minor: Typing fixes
pillowbeast Aug 6, 2025
3bd868a
Mv: image
pillowbeast Aug 6, 2025
f110112
Rm: Data -> Data Hub Submodule
pillowbeast Aug 6, 2025
81ed469
Add: data via Data Hub + Gitmodules
pillowbeast Aug 6, 2025
058fcfe
Update: README
pillowbeast Aug 6, 2025
deeee4e
Ruff: Formatting
pillowbeast Aug 11, 2025
4cb61d6
CleanUp/Readability/ErrorCatching
pillowbeast Aug 11, 2025
3f6ffb6
Tests: Comprehensive Test Suite -> everything except for regression test
pillowbeast Aug 11, 2025
f42b550
Minor/Logging
pillowbeast Aug 11, 2025
864b6bb
Tests: Regression Tests
pillowbeast Aug 11, 2025
4a1f7bb
RENAME: weac -> old_weac & weac_2 -> weac
pillowbeast Aug 11, 2025
4220069
RENAME: old script -> old_ / combined scripts -> test_comparison_
pillowbeast Aug 11, 2025
8bfdf04
Move: demo to demo folder
pillowbeast Aug 11, 2025
f99c991
REMOVE: old Weac
pillowbeast Aug 11, 2025
8fdc466
REMOVE: old criterion check
pillowbeast Aug 11, 2025
13caa5e
Minor: Bug Fixes
pillowbeast Aug 11, 2025
dd88b80
Dependency Update: provide requirements for venv / environment for Ma…
pillowbeast Aug 11, 2025
ee78cbc
Update .cursorignore
zacczakk Aug 11, 2025
4f53977
Update .gitignore
zacczakk Aug 11, 2025
d5f90ab
Fix typo
zacczakk Aug 11, 2025
1478bcd
Fix typo
zacczakk Aug 12, 2025
d41c39f
Remove unused import
zacczakk Aug 12, 2025
342f180
Remove unused variable assignment
zacczakk Aug 12, 2025
04d7ef2
Fix typo in error message
zacczakk Aug 12, 2025
23b2799
Remove unused import
zacczakk Aug 12, 2025
1b2d7fb
Remove unused import
zacczakk Aug 12, 2025
cb56039
Remove unused imports
zacczakk Aug 12, 2025
e005f95
Fix indentation and ensure pip is installed
zacczakk Aug 12, 2025
dfbc87e
Remove unnecessary f-string prefix
zacczakk Aug 12, 2025
f1fb215
Remove unused import
zacczakk Aug 12, 2025
3dea82d
Fix typo
zacczakk Aug 12, 2025
2c63795
Bug Fix and Remove np.array wrapping around mass
pillowbeast Aug 12, 2025
04c9ab9
Add Snowpylot dependency / logger instead of print
pillowbeast Aug 12, 2025
9ded51a
Submodules Shallow + Track Main Branch
pillowbeast Aug 13, 2025
a4057df
Catch unwanted modification of layers
zacczakk Aug 13, 2025
42c9d1b
Refactor snow types: Replace Literal types with Enum classes for Grai…
zacczakk Aug 13, 2025
48341f3
Update type hints: Change Tuple to built-in tuple and specify return …
zacczakk Aug 13, 2025
2dc99ea
Remove environment.yml and requirements.txt; update optional dependen…
zacczakk Aug 13, 2025
94a3951
Refactor SKIP_VALUE: Replace hardcoded string with a constant for bet…
zacczakk Aug 13, 2025
e4fdc8c
Enhance error handling in UnknownConstantsSolver: Add detailed diagno…
zacczakk Aug 13, 2025
580aee1
CodeRabbit Convos
pillowbeast Aug 13, 2025
3cfa6e9
Refactor constants and improve slab calculations: Change ROMBERG_TOL …
zacczakk Aug 13, 2025
bb6d71c
Improve documentation in Segment class: Clarify argument descriptions…
zacczakk Aug 13, 2025
8845f28
Refactor slab parameter calculations: Remove redundant variable and o…
zacczakk Aug 13, 2025
f71329d
Refactor: make sure update_from_config also updates crack_length
zacczakk Aug 13, 2025
79739ea
Part2: CodeRabbit Convos
pillowbeast Aug 13, 2025
b2fb8a6
Docstring
pillowbeast Aug 13, 2025
2214642
Name Change: crack_length -> cut_length regarding scenario/scenario_c…
pillowbeast Aug 13, 2025
52c0280
Print -> Logger / Recursion Stop Logic / Bug Description + Error Hand…
pillowbeast Aug 13, 2025
2755e46
CodeRabbit Convos
pillowbeast Aug 13, 2025
b4a8988
Refactor imports and update type hint for iterations in FindMinimumFo…
zacczakk Aug 13, 2025
ea2052f
Refactor criteria evaluation calculations: Introduce local results ar…
zacczakk Aug 13, 2025
d05ea99
Refactor tests to utilize isolated weac environment: Introduce weac_r…
zacczakk Aug 13, 2025
d2e80f6
Update .cursorignore and .gitignore for improved file management; enh…
zacczakk Aug 13, 2025
bafb439
Modification to be able to import weac version for integration tests
pillowbeast Aug 13, 2025
fa0e568
Update reference version in tests to weac==2.6.2 for consistency acro…
zacczakk Aug 13, 2025
dd7b322
CodeRabbit Review #2
pillowbeast Aug 13, 2025
a412801
Testing Dev/Interactive Environment
pillowbeast Aug 13, 2025
7ffe440
feat: Run tests against weac v2.6.3
zacczakk Aug 14, 2025
4b1d362
Add: other tests
pillowbeast Aug 14, 2025
9065998
chore: Update default WEAC reference version to 2.6.4 in weac_referen…
zacczakk Aug 14, 2025
a1a65a9
Tests: Comparison of Z instead of C because C can dependent on the sy…
pillowbeast Aug 14, 2025
4ff489b
Minor
pillowbeast Aug 15, 2025
7982298
Tests: Extension of Comparison Test to physical properties Sxx/Szz/Tx…
pillowbeast Aug 15, 2025
a5d50f6
Demo: Clean-up
pillowbeast Aug 15, 2025
ab92559
Plotter: Minor
pillowbeast Aug 15, 2025
eff630a
README: Overhaul
pillowbeast Aug 15, 2025
64b1851
chore: Update pylint configuration to disable naming convention warnings
zacczakk Aug 15, 2025
4449033
Ruff: formatted
pillowbeast Aug 15, 2025
b7ddeb9
chore: ruff & pylint
zacczakk Aug 15, 2025
d52b05d
Merge branch 'feat/researcher-focus' of https://github.com/2phi/weac …
zacczakk Aug 15, 2025
bdfc4a5
chore: Remove push triggers from workflow files for formatting, linti…
zacczakk Aug 15, 2025
cd8050d
Docstrings: dummy docstrings at Top of Files
pillowbeast Aug 15, 2025
e0a3f5d
chore: Ruff format
zacczakk Aug 15, 2025
10644c5
chore: Ignore import statement lint messages in tests
zacczakk Aug 15, 2025
b9a4577
Docstrings: Concise Class Docstrings
pillowbeast Aug 15, 2025
b098597
Pylint: Errors
pillowbeast Aug 15, 2025
d16a4d0
Pylint: Fixing
pillowbeast Aug 15, 2025
afae46f
Final Pylint Resolve & Ignore
pillowbeast Aug 18, 2025
ff4d093
chore: Update GitHub Actions to trigger on specific pull request even…
zacczakk Aug 18, 2025
35c9c4e
chore: Improve GitHub Actions with manual triggers and correct format…
zacczakk Aug 18, 2025
e9e33b0
rm: unused imports
pillowbeast Aug 18, 2025
40645ad
Use Pyproject.toml to ignore certain errors.
pillowbeast Aug 18, 2025
883aa89
Ruff: Comments
pillowbeast Aug 18, 2025
9c6c465
Raise Error if Old Weac unavilable
pillowbeast Aug 18, 2025
cb42561
Install Venv for CI Test
pillowbeast Aug 18, 2025
c3ff760
Figure out wihy workflow fails.
pillowbeast Aug 18, 2025
34bfa91
UnitTest Error fix
pillowbeast Aug 18, 2025
770af47
Coderabbit Comments
pillowbeast Aug 18, 2025
b9d8ba0
Remove installation step for Python 3.12 venv in GitHub Action
zacczakk Aug 19, 2025
4d9d3ca
Enhance GitHub Actions workflow by adding pip caching and updating Py…
zacczakk Aug 19, 2025
4f4b33a
doc: Update requirements
zacczakk Aug 19, 2025
08378f4
chore: Update pylint configuration to use pyproject.toml for comprehe…
zacczakk Aug 19, 2025
b153761
Merge branch 'main' into feat/researcher-focus
zacczakk Aug 19, 2025
be7c760
fix: Version number
zacczakk Aug 19, 2025
9ffb31f
fix: Remove unnecessary rcfile option from pylint command in GitHub A…
zacczakk Aug 19, 2025
32ff41e
doc: Fix typos and improve clarity in README.md
zacczakk Aug 19, 2025
803ca37
doc: Enhance README.md with updated version details and improved code…
zacczakk Aug 19, 2025
2a13014
chore: Remove unused import
zacczakk Aug 19, 2025
42f349a
docs: add Sphinx config; set version/release as strings and drop depr…
zacczakk Aug 19, 2025
cf0b44d
chore: Ruff
zacczakk Aug 19, 2025
a72b6d9
refactor: Remove main.py and validation_cc.py scripts to clean up pro…
zacczakk Aug 19, 2025
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
6 changes: 6 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/docs/
/.venv/
/data/
/img/
/demo/
/LICENSE
32 changes: 16 additions & 16 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Make sure code is ruff-formatted 🐶

on:
"on":
# Run format checks on pull_request events
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
Expand All @@ -14,21 +14,21 @@ jobs:
name: Make sure code is ruff-formatted 🐶
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
python -m pip install ruff
python -m pip install -e ".[dev]"
- name: Install dependencies
run: |
# Setup pip
python -m pip install --upgrade pip
# Install dependencies including ruff
python -m pip install -e ".[dev]"

- name: Check formatting with ruff
run: |
python -m ruff format . --check
python -m ruff check .
- name: Check formatting with ruff
run: |
ruff format . --check
ruff check .
75 changes: 49 additions & 26 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Static code analysis 🔎

on:
"on":
# Run static code analysis on pull_request events
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
Expand All @@ -14,31 +14,54 @@ jobs:
name: Static code analysis 🔎
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pylint
python -m pip install -e ".[dev]"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

- name: Run pylint analysis
# Using .pylintrc with comprehensive configuration for scientific code
run: |
python -m pylint --output-format=parseable --output=pylint-report.txt weac/ tests/
echo
echo 'Error type counts:'
grep -oP '[A-Z]\d+\([a-z\-]+\)' pylint-report.txt | sort | uniq -c | sort -nr
echo
echo 'Errors per file:'
grep -oP '^[\w\-\/]+\.py' pylint-report.txt | sort | uniq -c | sort -nr
echo
echo 'Total errors:'
grep -oP '^[\w\-\/]+\.py' pylint-report.txt | wc -l
echo
grep 'Your code' pylint-report.txt
- name: Run pylint analysis
# Using repository pylint config (pyproject.toml) with comprehensive settings for scientific code
run: |
exit_code=0
python -m pylint --output-format=parseable --output=pylint-report.txt weac/ tests/ || exit_code=$?
echo "Pylint finished with exit code $exit_code."
echo
echo "Pylint exit code meaning:"
if [ $exit_code -eq 0 ]; then echo "-> No issues found"; fi
if [ $((exit_code & 1)) -ne 0 ]; then echo "-> Fatal message issued"; fi
if [ $((exit_code & 2)) -ne 0 ]; then echo "-> Error message issued"; fi
if [ $((exit_code & 4)) -ne 0 ]; then echo "-> Warning message issued"; fi
if [ $((exit_code & 8)) -ne 0 ]; then echo "-> Refactor message issued"; fi
if [ $((exit_code & 16)) -ne 0 ]; then echo "-> Convention message issued"; fi
if [ $((exit_code & 32)) -ne 0 ]; then echo "-> Usage error"; fi
echo

echo 'Error type counts:'
grep -oP '[A-Z]\d+\([a-z\-]+\)' pylint-report.txt | sort | uniq -c | sort -nr
echo
echo 'Errors per file:'
grep -oP '^[\w\-\/]+\.py' pylint-report.txt | sort | uniq -c | sort -nr
echo
echo 'Total errors:'
grep -oP '^[\w\-\/]+\.py' pylint-report.txt | wc -l
echo
grep 'Your code' pylint-report.txt || true
Comment on lines +47 to +56
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional: drop grep -P for portability.
GNU grep -P is fine on ubuntu-latest, but can be disabled elsewhere. Consider awk/sed for portability if you reuse locally.

Example replacement for the three grep -oP pipelines:

  • Error types:
    awk '{ if (match($0, /[A-Z][0-9]+([a-z-]+)/, a)) print a[0] }' pylint-report.txt | sort | uniq -c | sort -nr || true
  • Per-file:
    awk -F: 'NF>1 && $1 ~ /.py$/ {print $1}' pylint-report.txt | sort | uniq -c | sort -nr || true
  • Total errors:
    awk -F: 'NF>1 && $1 ~ /.py$/' pylint-report.txt | wc -l || true
🤖 Prompt for AI Agents
In .github/workflows/pylint.yml around lines 47 to 56 the workflow uses grep -P
(Perl regex) which is not portable; replace the three grep -oP pipelines with
POSIX-safe awk (or sed) equivalents that extract the same fields (error type
tokens, filenames, and count of errors), preserve the same sorting/uniq logic
and ensure the pipeline exits zero on no matches (append || true where needed),
and keep the surrounding echo lines and output ordering unchanged.


# Fail on fatal, error, and usage error.
# These are severe and should block PRs.
# Warnings (4), refactors (8), and conventions (16) will not cause a failure.
fail_on_codes=$((1 | 2 | 32))
if [ $((exit_code & fail_on_codes)) -ne 0 ]; then
echo "Failing CI due to fatal/error/usage messages from pylint."
exit 1
else
echo "Pylint check passed. No fatal/error/usage messages."
fi
31 changes: 17 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Run unit tests 🤖

# Trigger conditions for the workflow
on:
# Run tests on pull_request events
"on":
# Run unit tests on pull_request events
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
# Allow this workflow to be called by other workflows
Expand All @@ -15,17 +15,20 @@ jobs:
name: Run unit tests 🤖
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
cache-dependency-path: |
pyproject.toml
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .

- name: Run tests
run: python tests/run_tests.py
- name: Run tests
run: python tests/run_tests.py
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,32 @@ dist/
# IDE setup
.vscode/

# Environments
.venv/
venv/
.python-version
.weac-reference/
.venv*

# Secrets
.env
.env.local
.env.*

# Caches
.ruff_cache/
.pytest_cache/
.mypy_cache/

# Coverage
.coverage
coverage.xml
# misc
*.stats
plots/
test/
scratch/
temp*
old*

.weac-reference/
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[submodule "data"]
path = data
url = https://github.com/2phi/weac-data-hub.git
shallow = true
branch = main
Loading