Conversation
📝 WalkthroughWalkthroughThe PR comprises widespread code formatting optimizations (collapsing multi-line expressions to single-line forms), adds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
pyproject.toml (1)
116-118: Consider aligning mypypython_versionwith minimum supported Python.The
python_version = "3.13"in mypy config doesn't matchrequires-python = ">=3.11". This means mypy type-checks against Python 3.13 semantics, potentially missing compatibility issues with 3.11/3.12.💡 Suggested change
[tool.mypy] files = ["src", "tests"] -python_version = "3.13" +python_version = "3.11"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` around lines 116 - 118, The mypy configuration currently sets python_version = "3.13" which diverges from the package's minimum supported Python (requires-python = ">=3.11"); update the mypy setting to match the minimum supported interpreter (e.g., change the mypy `python_version` value in the [tool.mypy] section from "3.13" to "3.11") so type-checking uses Python 3.11 semantics and catches compatibility issues for supported versions.src/everwillow/hypotest/upper_limit.py (1)
3-4: Consider whether stringified annotations are needed in re-export modules.While this change is likely safe for function re-exports, adding
from __future__ import annotationsin a public API module means that any downstream code usingtyping.get_type_hints()on the imported functions must pass properlocalns/globalnsparameters to resolve the stringified annotations.Consider whether this module actually benefits from PEP 563, or if it could be omitted here since:
- The implementation module (
_src.inference.hypotest.upper_limit) already has it- Re-export modules typically don't define new types, only import them
- Removes one potential source of annotation resolution issues for users
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/everwillow/hypotest/upper_limit.py` around lines 3 - 4, The re-export module contains "from __future__ import annotations" which stringifies type annotations and can force callers of typing.get_type_hints() to supply localns/globals; remove this future import from src/everwillow/hypotest/upper_limit.py (leaving the implementation module _src.inference.hypotest.upper_limit untouched) so the re-export does not introduce PEP 563 behavior for downstream users who import the re-exported functions/classes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pyproject.toml`:
- Line 12: Update the mypy configuration's python_version to match the package
minimum by changing the mypy key python_version from "3.13" to "3.11" so it
aligns with the project requires-python = ">=3.11"; locate the mypy section in
pyproject.toml and edit the python_version entry (symbol: python_version) to
"3.11" to ensure type checking targets the minimum supported Python version
(referencing requires-python).
In `@src/everwillow/hypotest/toys.py`:
- Around line 3-4: Remove the future stringified-annotation import: delete the
line "from __future__ import annotations" from the re-export module
(src/everwillow/hypotest/toys.py) and from the implementation module where the
type hints must be evaluable (the hypotest toys implementation module), because
Equinox/equinox.Module needs real annotations for PyTree field registration;
ensure no other code relies on postponed evaluation (if needed, replace any
forward-reference strings with actual types or from typing import TYPE_CHECKING
guards) so that field introspection in Equinox works correctly.
---
Nitpick comments:
In `@pyproject.toml`:
- Around line 116-118: The mypy configuration currently sets python_version =
"3.13" which diverges from the package's minimum supported Python
(requires-python = ">=3.11"); update the mypy setting to match the minimum
supported interpreter (e.g., change the mypy `python_version` value in the
[tool.mypy] section from "3.13" to "3.11") so type-checking uses Python 3.11
semantics and catches compatibility issues for supported versions.
In `@src/everwillow/hypotest/upper_limit.py`:
- Around line 3-4: The re-export module contains "from __future__ import
annotations" which stringifies type annotations and can force callers of
typing.get_type_hints() to supply localns/globals; remove this future import
from src/everwillow/hypotest/upper_limit.py (leaving the implementation module
_src.inference.hypotest.upper_limit untouched) so the re-export does not
introduce PEP 563 behavior for downstream users who import the re-exported
functions/classes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e5597c1d-580f-43eb-93a7-0d98277c4331
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (39)
.github/workflows/cd.yml.gitignoredocs/python/test_evermore_example.pydocs/python/test_pyhs3_example.pyexamples/hgg_parametric/hgg_parametric.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/compare.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/compare_ifit.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/evermore_model.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/model_config.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/pyhf_model.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/pyhs3_model.pyexamples/model_1sig_2bkg_1nf_1ss_1ns/utils.pypyproject.tomlsrc/everwillow/_src/inference/fitting.pysrc/everwillow/_src/inference/hypotest/distributions.pysrc/everwillow/_src/inference/hypotest/test_statistics.pysrc/everwillow/_src/inference/hypotest/toys.pysrc/everwillow/_src/inference/hypotest/utils.pysrc/everwillow/_src/inference/uncertainty.pysrc/everwillow/_src/parameters/transforms.pysrc/everwillow/_src/statelib/__init__.pysrc/everwillow/_src/statelib/meta.pysrc/everwillow/_src/statelib/state.pysrc/everwillow/hypotest/toys.pysrc/everwillow/hypotest/upper_limit.pysrc/everwillow/hypotest/utils.pysrc/everwillow/parameters/bounds.pysrc/everwillow/py.typedsrc/everwillow/statelib/__init__.pysrc/everwillow/statelib/state.pysrc/everwillow/statelib/transform.pytests/inference/hypotest/test_distributions.pytests/inference/hypotest/test_results.pytests/inference/hypotest/test_test_statistics.pytests/inference/hypotest/test_upper_limit.pytests/inference/hypotest/test_utils.pytests/inference/test_fitting.pytests/inference/test_uncertainty.pytests/parameters/test_transforms.py
💤 Files with no reviewable changes (1)
- .gitignore
|
@MoAly98 cd.yml and pyproject.toml look good 👍 I don't know why do you want to track uv.lock? |
@pfackeldey I have seen repos distirbuting that for reproducible installs from source |
Summary
Manual setup after merge
everwillow, repoMoAly98/everwillow, workflowcd.yml, environmentpypipypiin repo Settings → Environments