Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for post-unblinding data taking #74

Merged
merged 119 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
3284d61
add ann tier
ggmarshall Oct 9, 2024
26d52f2
allow more jobs
ggmarshall Oct 20, 2024
7918e83
pc cleanup
ggmarshall Oct 21, 2024
e9561bd
bump pkg versions
ggmarshall Oct 21, 2024
a3c0dae
add ml packages
ggmarshall Oct 21, 2024
818511d
refactor for new metadata, clean up patterns and some naming
ggmarshall Nov 27, 2024
41c326b
update rules for pattern changes
ggmarshall Nov 27, 2024
1698eb1
add debug mode functionality
ggmarshall Nov 27, 2024
b840444
os to pathlib.Path
ggmarshall Nov 27, 2024
323dd09
debugging
ggmarshall Nov 28, 2024
bbf65e9
move info from readme to docs
ggmarshall Nov 29, 2024
9639200
add ability to specify different file selections and cleanup
ggmarshall Dec 3, 2024
0cb28b6
updates for new meta, switch to detector keying in configs
ggmarshall Dec 3, 2024
3112518
merge ann rules
ggmarshall Dec 3, 2024
4f7e405
debugging
ggmarshall Dec 4, 2024
a2f2d7e
style: pre-commit fixes
pre-commit-ci[bot] Dec 4, 2024
ce2ad85
add isotopes where lines are from
ggmarshall Dec 5, 2024
bd9d596
Merge branch 'meta_refactor' of github.com:legend-exp/legend-dataflow…
ggmarshall Dec 5, 2024
2deac35
choose ctc based on no_ctc energy instead
ggmarshall Dec 5, 2024
97a0f8e
Fix a bunch of docs things
gipert Dec 26, 2024
4c6dffc
update blinding cal to new hpgecal
ggmarshall Dec 26, 2024
08e20e7
Try fixing RTD build
gipert Dec 27, 2024
1b68941
Merge branch 'meta_refactor' of github.com:legend-exp/legend-dataflow…
gipert Dec 27, 2024
603f3ec
Bug fix
gipert Dec 27, 2024
9f4d1c2
Remove unneeded sphinx ext
gipert Dec 27, 2024
1152316
add snakefile to profile
ggmarshall Dec 28, 2024
24fb2ed
add table format to config
ggmarshall Dec 28, 2024
c89b634
update to cal_groupings file
ggmarshall Dec 28, 2024
c5104b9
Merge branch 'meta_refactor' of github.com:legend-exp/legend-dataflow…
ggmarshall Dec 28, 2024
83fc329
add pyproject file
ggmarshall Dec 28, 2024
7cd0273
add logging config and cleanup config loading
ggmarshall Dec 31, 2024
59e273b
add param info to svm rule
ggmarshall Dec 31, 2024
2cc1232
move logging to function
ggmarshall Jan 8, 2025
72140e2
fix svm rules
ggmarshall Jan 8, 2025
5139f18
add dbetto dependency to configs
ggmarshall Jan 8, 2025
4dea274
Fix bugs in complete_run.py
gipert Jan 17, 2025
0c43924
Support using specialized build_raw script depending on DAQ extension
gipert Jan 17, 2025
8eba704
Updates to build_raw Snakefile to support latest dataflow changes
gipert Jan 17, 2025
e565e59
extension="*" does not work as expected, needs to be fixed in some ot…
gipert Jan 17, 2025
0be642f
Renaming, JIT compile daq2lh5 onstart
gipert Jan 18, 2025
4dcd0d2
Several fixes to build_raw.py scripts
gipert Jan 20, 2025
3c2a166
allow filelist globbing for daq fcio/orca files
ggmarshall Jan 20, 2025
378b82d
merges
ggmarshall Jan 20, 2025
1dcd027
have par catalog build support multiple file extensions, split out bu…
ggmarshall Jan 20, 2025
0438539
fix par catalog write
ggmarshall Jan 20, 2025
25a6183
fix daq filelist
ggmarshall Jan 20, 2025
325c920
allow filelist globbing for daq fcio/orca files
ggmarshall Jan 20, 2025
8197a3f
have par catalog build support multiple file extensions, split out bu…
ggmarshall Jan 20, 2025
48b326d
A lot of fixes in complete_run.py
gipert Jan 20, 2025
0b558dd
fix weird filelist len bug by moving to script
ggmarshall Jan 20, 2025
95f1759
Merge pull request #78 from legend-exp/fcio
gipert Jan 20, 2025
a43a9eb
merges
ggmarshall Jan 20, 2025
689164b
fix log import
ggmarshall Jan 20, 2025
2ac84b0
split out filelist write to workaround smk behaviour, cleanup catalog…
ggmarshall Jan 20, 2025
2c47ca9
Remove leftover print statements
gipert Jan 21, 2025
35e8b56
Rename scripts.util to scripts.library
gipert Jan 21, 2025
0bb23df
Replace scripts.library.catalog with dbetto.catalog
gipert Jan 21, 2025
91dbbf9
Merge pull request #83 from legend-exp/rename
gipert Jan 27, 2025
85a2d9d
add threshold extraction
ggmarshall Jan 28, 2025
ef89966
new structure
ggmarshall Jan 28, 2025
054041d
move dsp pars rules to dedicated file, scope rules with _geds
gipert Jan 28, 2025
8f14446
Merge pull request #84 from legend-exp/spms
gipert Jan 28, 2025
caf7b67
merge
ggmarshall Jan 28, 2025
c01cf27
update with prodenv stuff and uv
ggmarshall Jan 28, 2025
0c4b270
add execenv scripts
ggmarshall Jan 28, 2025
88cafa5
add code for metadata checkout subject to release
ggmarshall Jan 28, 2025
93ad1b3
update pre-commit config
gipert Jan 29, 2025
7cf0a1b
Move library to own package and install that
gipert Jan 29, 2025
3eca65d
fix docs
gipert Jan 29, 2025
e4df0d3
pre-commit updates, minor format change in config.pkg_versions
gipert Jan 29, 2025
48a35e0
really fix the RTD build
gipert Jan 29, 2025
2af22db
fix all package imports
gipert Jan 29, 2025
cf9e6bd
update profiles
gipert Jan 29, 2025
f4bbffa
switch to subrocess library
gipert Jan 29, 2025
f7dbc32
remove smk functions
ggmarshall Jan 29, 2025
055a9dd
Merge branch 'prodenv' of github.com:legend-exp/legend-dataflow into …
gipert Jan 30, 2025
4e1cfd5
rewrite execenv functions to use uv. remove setups/l200 prefix in config
gipert Jan 30, 2025
c27b1b1
install uv only if not already available
gipert Jan 30, 2025
6ec902d
improve config-lngs.yaml
gipert Jan 30, 2025
cf093d8
also fix dataprod exec
gipert Jan 30, 2025
a3d34d6
config.execenv can be left unspecified
gipert Jan 30, 2025
a0d6842
move scripts in legenddataflow package and make imports relative
gipert Jan 30, 2025
69b13ab
move package version spec to pyproject.toml and implement --editable
gipert Jan 30, 2025
8e5e4a6
fix pre-commit config
gipert Jan 30, 2025
ae7d470
fix a couple of problems with tests and setup GHA
gipert Jan 30, 2025
385874e
fix docs
gipert Jan 30, 2025
902e248
fix coverage upload in ci
gipert Jan 30, 2025
c07c897
Merge pull request #86 from legend-exp/prodenv
gipert Jan 30, 2025
0dec815
add timestamp to log files and don't remove on completion
ggmarshall Jan 31, 2025
faf9214
setup to config and debug
ggmarshall Feb 3, 2025
813e070
scripts to functions and rename
ggmarshall Feb 3, 2025
b2b5ec6
debugging
ggmarshall Feb 3, 2025
1612884
add channel merge rules
ggmarshall Feb 3, 2025
9be9e09
update to script execs
ggmarshall Feb 4, 2025
16e511b
some renames
ggmarshall Feb 4, 2025
0eab448
add exec scripts
ggmarshall Feb 4, 2025
68ac180
more bugfixes
ggmarshall Feb 4, 2025
e3fe518
config to attrsdict
ggmarshall Feb 4, 2025
d2a881a
fix tests maybe
ggmarshall Feb 4, 2025
14e523e
use channel merge func
ggmarshall Feb 4, 2025
f323190
json to yaml tests
ggmarshall Feb 4, 2025
5002261
fix wildcard constraint
ggmarshall Feb 4, 2025
479acac
split out par rules
ggmarshall Feb 4, 2025
4dcdf97
test try 2
ggmarshall Feb 4, 2025
b58601d
tests v3
ggmarshall Feb 4, 2025
515c028
Merge pull request #87 from legend-exp/func_scripts
ggmarshall Feb 4, 2025
ed1586d
use dashes not underscores in executable names
gipert Feb 4, 2025
16d03a2
replace underscores with dashes in cmdline options
gipert Feb 4, 2025
ccfcbce
rename execenv_smk_py_script to execenv_pyexe
gipert Feb 5, 2025
981f018
Merge pull request #88 from legend-exp/dev
ggmarshall Feb 5, 2025
401814a
improve execenv code and add tests
gipert Feb 5, 2025
084ab10
add another simple execenv test
gipert Feb 5, 2025
1b7de78
Merge pull request #89 from legend-exp/dev
gipert Feb 5, 2025
6ece274
round of fixes
gipert Feb 6, 2025
c289895
Merge pull request #90 from legend-exp/dev
gipert Feb 6, 2025
6966027
fixes for complete_run.py
gipert Feb 6, 2025
aff2370
move common code into own scripts
ggmarshall Feb 6, 2025
afac78c
Merge branch 'meta_refactor' of github.com:legend-exp/legend-dataflow…
ggmarshall Feb 6, 2025
cbb29c8
make table name lazy
ggmarshall Feb 6, 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
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: lgdo

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "releases/**"

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

env:
FORCE_COLOR: 3

jobs:
build-and-test:
name: Test lgdo with Python
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
os: [ubuntu-latest, macos-13]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get dependencies and install legend-dataflow
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade .[test]
- name: Run unit tests
run: |
python -m pytest

test-coverage:
name: Calculate and upload test coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Generate Report
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade .[test]
python -m pytest --cov=legenddataflow --cov-report=xml
- name: Upload Coverage to codecov.io
uses: codecov/codecov-action@v5
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.snakemake
workflow/src/legenddataflow/_version.py

# New additions go at the top!
*.c
.DS_Store
Expand All @@ -10,6 +13,13 @@
*~
*.csv

# uv
uv.lock

#prodenv_stuff
inputs
software
generated

# -------------------- github-generated stuff -------------------
# Byte-compiled / optimized / DLL files
Expand Down Expand Up @@ -77,7 +87,7 @@ instance/
.scrapy

# Sphinx documentation
/docs/build/
/docs/_build/
/docs/source/generated

# PyBuilder
Expand Down Expand Up @@ -113,3 +123,5 @@ venv.bak/

# mypy
.mypy_cache/

docs/source/api
164 changes: 89 additions & 75 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,89 +4,103 @@ ci:
autofix_commit_msg: "style: pre-commit fixes"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-docstring-first
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.19.1"
hooks:
- id: blacken-docs
additional_dependencies: [black==24.*]

- repo: https://github.com/psf/black
rev: "24.10.0"
hooks:
- id: black-jupyter
args: ["--line-length", "99"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-docstring-first
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.6"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.6"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/asottile/setup-cfg-fmt
rev: "v2.7.0"
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.23"
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.14.1"
hooks:
- id: mypy
files: src
stages: [manual]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.30.0"
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/kynan/nbstripout
rev: "0.8.1"
hooks:
- id: nbstripout
args: ["--drop-empty-cells",
"--extra-keys", "metadata.kernelspec metadata.language_info"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.14.1"
hooks:
- id: mypy
files: src
stages: [manual]

- repo: https://github.com/mgedmin/check-manifest
rev: "0.50"
hooks:
- id: check-manifest
stages: [manual]
- repo: https://github.com/kynan/nbstripout
rev: "0.8.1"
hooks:
- id: nbstripout
args:
[
"--drop-empty-cells",
"--extra-keys",
"metadata.kernelspec metadata.language_info",
]

- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
- id: codespell
args: ["-L", "nd,unparseable,compiletime,livetime,fom,puls"]
- repo: https://github.com/mgedmin/check-manifest
rev: "0.50"
hooks:
- id: check-manifest
stages: [manual]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.10.0.1"
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
- id: codespell
args: ["-L", "nd,unparseable,compiletime,livetime,fom,puls"]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.10.0.1"
hooks:
- id: shellcheck

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
types_or: [json]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/snakemake/snakefmt
rev: v0.10.2
hooks:
- id: snakefmt
files: Snakefile*|\.smk
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
types_or: [yaml, markdown, json, toml]

- repo: https://github.com/snakemake/snakefmt
rev: v0.10.2
hooks:
- id: snakefmt
files: Snakefile*|\.smk
exclude: channel_merge.smk
23 changes: 23 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.12"
commands:
# FIXME: dependencies should not be explicitly listed here!
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv
- uv pip install .[docs]
- rm -rf docs/source/api
- .venv/bin/python -m sphinx.ext.apidoc
--private
--module-first
--force
--output-dir docs/source/api
workflow/src
workflow/rules
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D
language=en docs/source $READTHEDOCS_OUTPUT/html
3 changes: 1 addition & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lint.select = [
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
Expand All @@ -29,7 +29,6 @@ lint.extend-ignore = [
"G004", # Logging statement uses f-string
"PLR", # Design related pylint codes
"E501", # Line too long
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
"RET505", # Unnecessary `else` after `return` statement
"E402", # Module level imports at top of file need disable for numba default imports
"NPY201", # Numpy 2 warnings ignore for the moment
Expand Down
9 changes: 5 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
The legend-dataflow-hades package is licensed under the MIT "Expat" License:
The legend-dataflow package is licensed under the MIT "Expat" License:

> Copyright (c) 2021:
>
> Matteo Agostini <[email protected]>
> Oliver Schulz <[email protected]>
> Matteo Agostini <[email protected]>
> Oliver Schulz <[email protected]>
> George Marshall <[email protected]>
> Luigi Pertoldi <[email protected]>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,4 +24,3 @@ The legend-dataflow-hades package is licensed under the MIT "Expat" License:
> 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