Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
d5253b5
Ignoring VSCode settings
tleedegen Jul 11, 2025
33b588d
Refactored fragility/repair figure builder functions
tleedegen Jul 11, 2025
6596564
Initial streamlit testing
tleedegen Jul 11, 2025
7596692
added python virtual enviornment to gitignore
tleedegen Aug 8, 2025
e85bf13
added about page
tleedegen Aug 8, 2025
3cb8e2d
Started search package
tleedegen Aug 8, 2025
e4c442e
adding streamlit to requirements
tleedegen Aug 8, 2025
c2e2318
Added initial search functions
tleedegen Aug 8, 2025
2318ddb
Added streamlit-keyup to requirments for dynamic search functionality
tleedegen Aug 11, 2025
8d83217
Updated git ignore for cached fuzzy index
tleedegen Aug 11, 2025
c528411
Search functionality updated
tleedegen Aug 11, 2025
dfd3026
Updating rapidfuzz to requirments
tleedegen Aug 11, 2025
7cd005b
Streamlit path debugging
tleedegen Aug 11, 2025
04db56f
Adding .cache/ to gitignore
tleedegen Aug 11, 2025
956f153
organizing gitignore
tleedegen Aug 12, 2025
9517a57
Updated requirements for Auth0
tleedegen Aug 12, 2025
d0375e9
Testing Auth0 implementation
tleedegen Aug 12, 2025
f9a046d
Added Dev Container Folder
tleedegen Aug 12, 2025
be271b1
Bug fixing user authentication
tleedegen Aug 12, 2025
8d0cb0b
Merge branch 'streamlit' of https://github.com/tleedegen/DamageAndLos…
tleedegen Aug 12, 2025
d949d27
Auth0 debugging
tleedegen Aug 12, 2025
bf1e47e
Auth0 debugging
tleedegen Aug 12, 2025
57a8bce
Auth0 debugging
tleedegen Aug 12, 2025
008d4f9
Revert "Auth0 debugging"
tleedegen Aug 12, 2025
96c082d
Auth0 debugging
tleedegen Aug 12, 2025
5e8d1dd
UI Updates
tleedegen Oct 15, 2025
d21a71e
Fixed syntax error
tleedegen Oct 15, 2025
0991e65
authorization adjustment
tleedegen Oct 15, 2025
2fa1fbc
page layout adjustments
tleedegen Oct 15, 2025
586bec3
Added dynamic loading of figures and adjusted theme
tleedegen Oct 15, 2025
a900f0f
Added title
tleedegen Oct 15, 2025
00e1f0e
Merge branch 'NHERI-SimCenter:main' into streamlit
tleedegen Feb 27, 2026
201eda6
Enhance fuzzy search UI: add metadata storage and search mode options
theseekingseaker Mar 13, 2026
2a52ae2
Add tree visualization for seismic components and update main page la…
theseekingseaker Mar 27, 2026
1805bfa
feat: Enhance fuzzy search UI with result categorization and conseque…
theseekingseaker Mar 28, 2026
2982d62
style: switch Streamlit theme from dark to light
zsarnoczay Apr 6, 2026
8f975a5
fix: use real fragility parameters and dynamic axis labels in tree view
zsarnoczay Apr 6, 2026
b02bc7d
Added hurricane branch of tree
theseekingseaker Apr 17, 2026
89fb595
Refactor visualizations: Move tree visuals to st_visuals, add consequ…
theseekingseaker May 8, 2026
a7ac64b
feat: Add component management to sidebar with added-components list …
theseekingseaker May 8, 2026
14a803a
feat: Implement render_added_components_list function and update deta…
theseekingseaker May 8, 2026
48dde71
feat: Add download functionality for component quantities with CSV ex…
theseekingseaker May 8, 2026
02bbcf9
feat: Enhance download functionality with fragility and consequence C…
theseekingseaker May 8, 2026
c9dc297
feat: Add httpx to requirements for enhanced HTTP requests handling
theseekingseaker May 8, 2026
a26af2e
feat: Comment out login panel rendering in sidebar
theseekingseaker May 18, 2026
90f9ed7
feat: Refactor ComponentGroups handling to improve label mapping and …
theseekingseaker May 18, 2026
063feb0
feat: Refactor extract_search_metadata to streamline JSON processing …
theseekingseaker May 18, 2026
6095377
feat: Update caching to show execution time for FuzzyIndex and loadin…
theseekingseaker May 18, 2026
2b10581
feat: Update button width settings to 'stretch' for improved layout c…
theseekingseaker May 18, 2026
237120b
feat: Implement fragment-based loading for component details to reduc…
theseekingseaker May 18, 2026
1271197
feat: Add session-state key for opened sub-groups to optimize compone…
theseekingseaker May 18, 2026
842a37b
feat: Implement semantic index for component library search
tleedegen Jun 1, 2026
067a5f9
Add hierarchical tree view for fragility component library
tleedegen Jun 1, 2026
c5a80bc
Merge branch 'streamlit' of https://github.com/tleedegen/DamageAndLos…
tleedegen Jun 1, 2026
d00eb68
Merge search_feature into streamlit for deployment
tleedegen Jun 1, 2026
5e5ac3a
feat: Add clear search button to reset search query in UI
tleedegen Jun 1, 2026
cc8d7a5
feat: Add branding module with contributor logos and integrate into m…
tleedegen Jun 12, 2026
9715a2c
feat: Enhance consequence and loss function handling in visualization…
tleedegen Jun 12, 2026
0344709
docs: add maintainer release-policy note for PyPI transition
zsarnoczay Jun 17, 2026
192d280
feat: package as pip-installable dlml with src layout
zsarnoczay Jun 17, 2026
bd3daf8
feat: add tabular CSV deserializer ported from pelicun
zsarnoczay Jun 17, 2026
707e610
chore: add local CI check script, mypy config, and uv lockfile
zsarnoczay Jun 19, 2026
92eebd5
feat: discover datasets by convention instead of a manifest
zsarnoczay Jun 22, 2026
ef0b108
feat: add public API (datasets, parameters, metadata, validation)
zsarnoczay Jun 23, 2026
c031b90
Add schema validation gates; fix vacuous-if clauses
zsarnoczay Jun 23, 2026
6647aed
Add static import audit for data-tree scripts
zsarnoczay Jun 23, 2026
b2c6dcf
Add canonical demand-type and distribution-family vocabularies
zsarnoczay Jun 24, 2026
0d91a5c
Fix RoundUpToIntegerQuantity typo in SimCenter Wind Comp. Library met…
zsarnoczay Jun 24, 2026
0003ef4
feat: Add optional subtitle to header rendering in main page
tleedegen Jun 29, 2026
e3b7438
feat: Update page title for DLML Explorer in main app and About page
tleedegen Jun 29, 2026
d64237e
Add value validation to the parameter format gates
zsarnoczay Jun 29, 2026
13a62b7
feat: Implement light/dark theme toggle and update UI styling across …
tleedegen Jun 29, 2026
c968c8d
Normalize RoundUpToIntegerQuantity
zsarnoczay Jun 29, 2026
a4c270b
Add metadata schema validation and cross-checks to the format gates
zsarnoczay Jun 29, 2026
a223b9f
test(packaging): add wheel content and size gate
zsarnoczay Jul 10, 2026
696059e
test(equivalence): assert dlml reads data identically to pelicun
zsarnoczay Jul 11, 2026
f9ad245
Merge branch 'streamlit' into v3
zsarnoczay Jul 11, 2026
abfdf9e
chore(web): remove dead modules, dormant auth, and stray files
zsarnoczay Jul 11, 2026
65205c6
refactor(web): move the Streamlit app into src/dlml/web
zsarnoczay Jul 11, 2026
3d37186
refactor(web): discover data from the packaged root, not the CWD
zsarnoczay Jul 11, 2026
470f8d9
feat(cli): add the dlml console script and finalize web packaging
zsarnoczay Jul 12, 2026
fdb7a72
docs(web): update the About page's local-run instructions
zsarnoczay Jul 12, 2026
2a27568
build(deps): split lint/doc extras and pin pelicun for CI
zsarnoczay Jul 12, 2026
a319b8a
ci: add uv-based CI (checks + test matrix + bare install)
zsarnoczay Jul 12, 2026
301826e
ci: add PyPI publish workflow (trusted publishing, freeze-safe)
zsarnoczay Jul 12, 2026
163b756
build: rename the PyPI distribution to simcenter-dlml
zsarnoczay Jul 12, 2026
e117eb0
ci: update the devcontainer for the packaged app
zsarnoczay Jul 12, 2026
6e6d7c8
docs: build the site from the packaged data, drop pelicun
zsarnoczay Jul 12, 2026
d3ebc00
docs: build the site from the packaged data, drop pelicun
zsarnoczay Jul 12, 2026
dc1553c
docs: prepare the 3.0 release documentation
zsarnoczay Jul 12, 2026
71699f3
feat(explorer): UI overhaul — About landing, sticky brand bar, themed…
zsarnoczay Jul 14, 2026
aab2ce3
fix(data): clarify the calibrated Hazus hurricane dataset and P-58 links
zsarnoczay Jul 14, 2026
9b88fdb
chore(release): cut 3.0 — fix __version__ dist name, bump version, sy…
zsarnoczay Jul 14, 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
45 changes: 45 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "DLML Explorer",
// Python 3.11 clears the >=3.10 floor that onnxruntime (via fastembed) needs
// for the `explorer` extra.
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"customizations": {
"codespaces": {
"openFiles": [
"README.md",
"src/dlml/web/app.py"
]
},
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},
// Install the package (editable) with the explorer extra -- this provides the
// `dlml` command and all the app's dependencies. Replaces the old
// requirements.txt + standalone streamlit install.
"updateContentCommand": "pip install -e \".[explorer]\"",
// `dlml explorer` launches Streamlit headless; the first launch downloads the
// ~64 MB search model from HuggingFace. Codespaces serves through a proxy, so
// CORS/XSRF are disabled via containerEnv below (the CLI doesn't expose those
// flags, but Streamlit reads them from the environment).
"postAttachCommand": {
"server": "dlml explorer"
},
"containerEnv": {
"STREAMLIT_SERVER_ENABLE_CORS": "false",
"STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION": "false"
},
"portsAttributes": {
"8501": {
"label": "DLML Explorer",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [
8501
]
}
61 changes: 35 additions & 26 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,56 @@
name: Build and deploy documentation

on:
push:
branches:
- main
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

# Least privilege by default; the job grants itself write for the gh-pages push.
permissions:
contents: write
contents: read

concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true

jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
python -m pip install -r requirements.txt

- name: Compute cache key
python-version: '3.12'
# Installs the package (so the generators can import dlml) plus the Sphinx
# toolchain and the plotting libraries the figure generators need.
- name: Install the package and doc dependencies
run: python -m pip install ".[doc]"
- name: Compute the figure-cache key
id: compute-cache-key
run: |
cd doc/source/_extensions
key=$(python compute_global_hash.py)
cd ../../../
echo "key=$key" >> $GITHUB_OUTPUT

- name: Restore cache
uses: actions/cache@v3
key=$(cd doc/source/_extensions && python compute_global_hash.py)
echo "key=$key" >> "$GITHUB_OUTPUT"
- name: Restore the figure cache
uses: actions/cache@v4
with:
path: doc/cache
key: ${{ steps.compute-cache-key.outputs.key }}

key: docs-cache-${{ steps.compute-cache-key.outputs.key }}
# Fall back to the most recent cache so a data change re-renders only
# the changed figures instead of all of them from a cold cache.
restore-keys: |
docs-cache-
- name: Build docs
run: cd doc && make html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
# Only a push to main deploys; PRs and manual runs build only.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CI

on:
push:
branches: [main, v3]
pull_request:
workflow_dispatch:

# Least privilege: CI only reads the checkout.
permissions:
contents: read

# Cancel superseded runs of the same ref (e.g. rapid pushes to a PR).
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Pin uv so CI matches the committed uv.lock resolver and the local dev version.
UV_VERSION: "0.10.9"

jobs:
checks:
name: Lint, type, spell, tests + coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
python-version: "3.12"
enable-cache: true
- name: Sync the checks environment (test + lint)
run: uv sync --locked --extra test --extra lint
# scripts/check.sh is the single source of truth (also the pre-commit hook):
- name: Run the full gate
run: bash scripts/check.sh
env:
# The env is already synced above; keep check.sh's inner `uv run`
# calls from re-syncing to defaults.
UV_NO_SYNC: "1"

test:
name: Tests (${{ matrix.os }}, py${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, python: "3.9" }
- { os: ubuntu-latest, python: "3.12" }
- { os: ubuntu-latest, python: "3.13" }
- { os: windows-latest, python: "3.12" }
- { os: macos-latest, python: "3.12" }
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python }}
enable-cache: true
- name: Run the test suite
run: uv run --locked --extra test pytest

bare-install:
name: Bare install (core only)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
python-version: "3.12"
enable-cache: true
- name: Build the sdist and wheel
run: uv build
# Install from the SDIST (not the tree) into a clean, extras-free env, so a
# missing data file in the sdist would surface as an empty dataset list.
- name: Install from sdist and smoke-test the core API + CLI
run: |
uv venv /tmp/bare --python 3.12
source /tmp/bare/bin/activate
uv pip install dist/*.tar.gz
python -c "import dlml; ids = dlml.list_datasets(); assert ids, 'no datasets discovered'; print(len(ids), 'datasets')"
dlml list | head -3
FIRST=$(dlml list | head -1 | sed 's/ \[.*//')
dlml info "$FIRST"
if dlml explorer >/dev/null 2>&1; then
echo "ERROR: bare 'dlml explorer' should exit non-zero"; exit 1
fi
echo "bare 'dlml explorer' correctly refused (exit 1)"
11 changes: 0 additions & 11 deletions .github/workflows/format_check.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/lint.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Publish to PyPI

# ┌──────────────────────────────────────────────────────────────────────────┐
# │ FREEZE POLICY (see README, "Release Policy"). This workflow publishes to │
# │ PyPI when a git TAG like `v3.0` is pushed. A pushed git tag is only a │
# │ ref -- it does NOT create a GitHub Release, so `releases/latest` stays │
# │ pinned at v2.1.0 for legacy pelicun (<=3.9) that downloads the data from │
# │ there. Do NOT add an `on: release:` trigger, and do NOT add any step that │
# │ creates a GitHub Release or moves a tag while the freeze is in effect. │
# └──────────────────────────────────────────────────────────────────────────┘

on:
push:
tags:
# v3-v9 majors publish to PyPI; v2.x is deliberately excluded (freeze).
- "v[3-9].*"
# Manual runs build + validate only; the publish job is gated on a tag ref,
# so a dispatch is a safe no-upload dry run (inspect the artifacts afterward).
workflow_dispatch:

permissions:
contents: read

env:
UV_VERSION: "0.10.9"

jobs:
build:
name: Build + validate sdist and wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
python-version: "3.12"
enable-cache: true
- name: Build
run: uv build
# On a tag push, refuse to proceed unless the tag matches the built version
# exactly (tag v3.0 <-> version 3.0). Catches a stray tag and a
# forgotten `.dev0` bump.
- name: Verify tag matches the built version
if: github.ref_type == 'tag'
run: |
version=$(ls dist/*.whl | sed -E 's|.*/simcenter_dlml-([^-]+)-py3.*|\1|')
echo "Built version: $version Tag: $GITHUB_REF_NAME"
if [ "$GITHUB_REF_NAME" != "v$version" ]; then
echo "::error::Tag '$GITHUB_REF_NAME' != built version 'v$version'. Refusing to publish."
exit 1
fi
- name: Check package metadata + README rendering
run: uvx twine check dist/*
- name: Upload the distributions
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
name: Publish to PyPI
needs: build
# Only a real tag push publishes; workflow_dispatch stops after `build`.
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
# The `pypi` environment carries a required-reviewer protection rule, so an
# upload waits for a human approval in the Actions UI even on a correct tag.
environment: pypi
permissions:
contents: read
id-token: write # OIDC for PyPI Trusted Publishing -- no stored token.
steps:
- name: Download the distributions
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish to PyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
15 changes: 0 additions & 15 deletions .github/workflows/spell_check.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,36 @@
/.ropeproject/
/doc/cache/
/doc/source/dl_doc/


#Dev Enviornment
/.vscode/
/.idea/
/.venv/

# Secrets (never commit or package these)
**/secrets.toml
.env

# Session data
*.session
session_store/
/.cache/

# Local scratch data
/DB/

# Packaging build artifacts
/dist/
/build/
*.egg-info/
src/*.egg-info/
__pycache__/

# Test & tooling caches
.coverage
.coverage.*
/htmlcov/
/.pytest_cache/
/.mypy_cache/
/.ruff_cache/
9 changes: 9 additions & 0 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Light is the default theme. The in-app dark toggle (st_ui/theme.py) layers a
# dark palette over this via CSS — Streamlit itself only supports one default.
[theme]
base = "light"
primaryColor = "#C8382E"
backgroundColor = "#F4F6FB"
secondaryBackgroundColor = "#FFFFFF"
textColor = "#171C26"
font = "sans serif"
Loading
Loading