Skip to content

Default console logging to stdout instead of stderr - #331

Open
tomaskontrimas wants to merge 1 commit into
dr2v2from
logging
Open

Default console logging to stdout instead of stderr#331
tomaskontrimas wants to merge 1 commit into
dr2v2from
logging

Conversation

@tomaskontrimas

Copy link
Copy Markdown
Collaborator

Fixes #326

@tomaskontrimas tomaskontrimas self-assigned this Aug 24, 2026
Copilot AI lite review requested due to automatic review settings August 24, 2026 12:08
@tomaskontrimas
tomaskontrimas changed the base branch from master to dr2v2 August 24, 2026 12:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates SkyLLH’s logging configuration so console output defaults to stdout (instead of stderr), aligning with issue #326. It also includes a broad set of Ruff-driven refactors and a dataset-registry update that changes how IceTracks-DR2 is resolved.

Changes:

  • Default console logging stream switched from sys.stderr to sys.stdout.
  • Dataset sample registry updated so 'IceTracks-DR2' points to the 14-year v2.0 release (with explicit -v1/-v2 aliases), and deprecated sample-name support is removed.
  • Repo-wide style/cleanup refactors (dict/list literals, exception narrowing, small loop simplifications) + CI/pre-commit Ruff version updates and documentation updates.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/publicdata_ps/test_time_integrated_ps_dr2.py Adds DR2 (14-year) integration-style analysis tests via skyllh.create_datasets('IceTracks-DR2').
tests/publicdata_ps/test_time_integrated_ps_dr1.py Minor test tweak (full_output=True).
tests/core/test_weights.py Refactor: dict(){}.
tests/core/test_storage.py Refactor dict literals; simplify __str__ test.
tests/core/test_signal_generator.py Narrows expected exception in uninitialized-generator test.
tests/core/test_logging.py Refactor handler flush suppression; comment updated (stderr → stream).
tests/core/test_dataset.py Removes deprecated sample-name behavior tests and related imports.
skyllh/scripting/argparser.py Refactor: dict(){}.
skyllh/i3/pdfratio.py Refactor: dict(){}.
skyllh/i3/pdf.py Refactor: return empty dict {}.
skyllh/i3/detsigyield.py Refactor: dict literals + dict(){}.
skyllh/i3/dataset.py Refactor: dict(){}.
skyllh/i3/backgroundpdf.py Refactor: return empty dict {}.
skyllh/datasets/i3/TestData.py Refactor dict literals for version qualifiers and kwargs.
skyllh/datasets/i3/PublicData_14y_ps.py Refactor dict literals for version qualifiers and kwargs.
skyllh/datasets/i3/PublicData_14y_ps_v2.py New DR2 v2.0 dataset module; repoints origin to Dataverse version 2.0.
skyllh/datasets/i3/PublicData_10y_ps.py Refactor dict literals for version qualifiers and kwargs.
skyllh/datasets/i3/init.py Replaces deprecation-aware registry with plain dict; adds DR2 v2 mapping + aliases.
skyllh/datasets/datasets.py Removes deprecation-aware registry; create_datasets no longer remaps deprecated names.
skyllh/core/utils/trials.py Refactor dict literal construction.
skyllh/core/utils/multidimgridpdf.py Refactor: dict comprehension.
skyllh/core/utils/analysis.py Tightens optional dependency import handling (except ImportError).
skyllh/core/trialdata.py Refactor: iterate dict .values() instead of .items() throwaway key.
skyllh/core/times.py Removes redundant pass from abstract method body (docstring-only body remains).
skyllh/core/test_statistic.py Removes redundant pass from abstract method body (docstring-only body remains).
skyllh/core/storage.py Refactors registry/dict comprehensions; micro-optimizes row fill loop.
skyllh/core/source_hypo_grouping.py Refactor: list()[].
skyllh/core/smoothing.py Removes redundant pass from abstract method body (docstring-only body remains).
skyllh/core/signalpdf.py Refactor: return empty dict {}; refactor empty grads dict.
skyllh/core/signal_generator.py Refactor dict literals; keeps default list-of-dicts initialization pattern.
skyllh/core/signal_generation.py Removes redundant pass from abstract method bodies (docstring-only bodies remain).
skyllh/core/services.py Refactor: dict(){}.
skyllh/core/scrambling.py Removes redundant pass from abstract method body (docstring-only body remains).
skyllh/core/pdfratio.py Removes redundant pass from abstract method bodies (docstring-only bodies remain).
skyllh/core/pdf.py Refactor: empty dict returns; list/range simplifications; empty grads dict.
skyllh/core/parameters.py Refactor dict comprehensions and initializations.
skyllh/core/minimizers/iminuit.py Refactor: tuple()/dict()()/{} defaults.
skyllh/core/minimizer.py Refactor: tuple()/dict()()/{} defaults; removes redundant pass in abstract methods.
skyllh/core/math.py Removes redundant pass from abstract method body (docstring-only body remains).
skyllh/core/logging.py Behavior change: default console stream now sys.stdout; docstring updated accordingly.
skyllh/core/llhratio.py Removes redundant pass from abstract method bodies (docstring-only bodies remain).
skyllh/core/interpolate.py Removes redundant pass from abstract method body (docstring-only body remains).
skyllh/core/flux_model.py Removes redundant pass from abstract method bodies (docstring-only bodies remain); small max() simplification.
skyllh/core/event_selection.py return None → bare return (still returns None); removes redundant pass in abstract method.
skyllh/core/detsigyield.py Removes redundant pass from abstract methods; return None → bare return (still None).
skyllh/core/dataset.py Removes redundant pass in exception classes; narrows except to OSError; refactors dict/list initializations and iterations.
skyllh/core/backgroundpdf.py Refactor: empty grads dict.
skyllh/core/background_generator.py Removes redundant pass from abstract method bodies; refactor default kwargs dict.
skyllh/core/background_generation.py Removes redundant pass from abstract method bodies.
skyllh/core/analysis.py Refactor default kwargs dicts; removes redundant pass from abstract methods.
skyllh/analyses/i3/publicdata_ps/utils.py Corrects exception type: ValueErrorTypeError for invalid flux argument type.
skyllh/analyses/i3/publicdata_ps/time_dependent_ps.py Refactor argument tuple/dict construction.
skyllh/analyses/i3/publicdata_ps/signalpdf.py Refactor: empty grads dict.
skyllh/analyses/i3/publicdata_ps/signal_generator.py Refactor: dict comprehension for record-array construction.
skyllh/analyses/i3/publicdata_ps/scripts/mceq_atm_bkg.py Refactor: dict(){}.
skyllh/analyses/i3/publicdata_ps/backgroundpdf.py Corrects exception type: ValueErrorTypeError; improves docstring; refactor empty grads dict.
skyllh/init.py Narrows exception for multiprocessing start method; uses module logger instead of root warning.
pyproject.toml Adds ruff>=0.16 to dev extras; adds per-file ignores for dataset-module naming rule.
doc/sphinx/tutorials/index.rst Documents that 'IceTracks-DR2' now refers to DR2 v2.0; adds explicit v1/v2 naming note.
doc/sphinx/conf.py Modernizes year calculation (timezone-aware) and simplifies autodoc exclude-members formatting.
.pre-commit-config.yaml Updates Ruff pre-commit hook version to v0.16.3.
.github/workflows/ci.yml Pins pip install "ruff>=0.16"; bumps repository cache key to v2.
Suppressed comments (1)

tests/core/test_logging.py:64

  • The PR changes the default console stream from stderr to stdout, but test_console_handlers currently overwrites handler streams before making any assertion about the default. Adding an assertion that the installed StreamHandler targets sys.stdout would make this change regression-tested.
        # Redirect current console stream to test stream.
        for logger_name in ('skyllh', self.user_logger_name):
            lg = logging.getLogger(logger_name)
            for handler in lg.handlers:
                if isinstance(handler, logging.StreamHandler):

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logging should stream to stdout by default, not stderr

2 participants