Skip to content

Conversation

@mikemhenry
Copy link
Contributor

@mikemhenry mikemhenry commented Oct 16, 2025

Checklist

  • Added a news entry

Developers certificate of origin

Fixes #1499

@mikemhenry mikemhenry changed the title do we test this at all? Add logging control Oct 16, 2025
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 99.29078% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.00%. Comparing base (3648154) to head (1989f58).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
openfe/tests/utils/test_log_control.py 99.56% 1 Missing ⚠️
openfe/utils/logging_control.py 97.61% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1585      +/-   ##
==========================================
- Coverage   95.33%   93.00%   -2.34%     
==========================================
  Files         183      184       +1     
  Lines       15770    16033     +263     
==========================================
- Hits        15035    14911     -124     
- Misses        735     1122     +387     
Flag Coverage Δ
fast-tests 93.00% <99.29%> (?)
slow-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mikemhenry
Copy link
Contributor Author

pre-commit.ci autofix

@mikemhenry
Copy link
Contributor Author

pre-commit.ci autofix

@mikemhenry
Copy link
Contributor Author

pre-commit.ci autofix

@mikemhenry
Copy link
Contributor Author

didn't fix the build:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/ext/autosummary/generate.py", line 503, in generate_autosummary_docs
    name, obj, parent, modname = import_by_name(entry.name)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 655, in import_by_name
    raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
sphinx.ext.autosummary.ImportExceptionGroup: no module named openfe.AlchemicalNetwork
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/events.py", line 97, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 814, in process_generate_options
    generate_autosummary_docs(genfiles, suffix=suffix, base_path=app.srcdir,
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/ext/autosummary/generate.py", line 508, in generate_autosummary_docs
    name, obj, parent, modname = import_ivar_by_name(entry.name)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 712, in import_ivar_by_name
    real_name, obj, parent, modname = import_by_name(name, prefixes)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 655, in import_by_name
    raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
sphinx.ext.autosummary.ImportExceptionGroup: no module named openfe
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/cmd/build.py", line 293, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/application.py", line 272, in __init__
    self._init_builder()
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/application.py", line 343, in _init_builder
    self.events.emit('builder-inited')
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/1585/lib/python3.11/site-packages/sphinx/events.py", line 108, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function process_generate_options at 0x77d92c224680> for event 'builder-inited' threw an exception (exception: no module named openfe)
Extension error (sphinx.ext.autosummary):
Handler <function process_generate_options at 0x77d92c224680> for event 'builder-inited' threw an exception (exception: no module named openfe)

I'll investigate this more once I get the FAQ doc finished

@mikemhenry
Copy link
Contributor Author

This is what it looks like:
image

@mikemhenry mikemhenry marked this pull request as ready for review November 20, 2025 19:55
@mikemhenry
Copy link
Contributor Author

Not sure if we need a news entry or not

@mikemhenry
Copy link
Contributor Author

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

This looks good to me, but please let @atravitz have a look before merging.

@mikemhenry
Copy link
Contributor Author

Do we want to prefix these classes with a _ to keep them private? Do we want this control in the public API?

@atravitz
Copy link
Contributor

Not sure if we need a news entry or not

I'm in favor of a news entry that points to the new docs, since people have been raising this as a bug and might look for it in a CHANGELOG.

mikemhenry and others added 3 commits November 20, 2025 13:37
@mikemhenry
Copy link
Contributor Author

mikemhenry commented Nov 20, 2025

hmm, @atravitz ruff wants to change this:

-from . import custom_typing
-from . import logging_control
+from . import custom_typing, logging_control

Maybe b/c its relative it is being weird, but I would rather have these on separate lines or

from . import (
    custom_typing, 
    logging_control,
)

so that the diff will be clean if we want to add more (or remove one)

@mikemhenry
Copy link
Contributor Author

It looks like it was happy when I manually did it in this style:

from . import (
    custom_typing,
    logging_control,
)

not sure if we can automate that or not

@mikemhenry mikemhenry requested a review from atravitz November 20, 2025 20:44
@mikemhenry
Copy link
Contributor Author

need to add the news bit still

@atravitz
Copy link
Contributor

It looks like it was happy when I manually did it in this style:

from . import (
    custom_typing,
    logging_control,
)

not sure if we can automate that or not

I don't have a super strong opinion about this, the way you have it here is good though.

@atravitz
Copy link
Contributor

Do we want to prefix these classes with a _ to keep them private? Do we want this control in the public API?

I like the idea of having it user facing at some point (could be helpful for colab headaches?). But let's make them private for now - we can always make them public in a follow-up PR.

@github-actions
Copy link

No API break detected ✅

@mikemhenry
Copy link
Contributor Author

@atravitz Sounds good! Renamed everything

Copy link
Contributor

@atravitz atravitz left a comment

Choose a reason for hiding this comment

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

looks great!

@atravitz atravitz merged commit b0789ff into main Nov 21, 2025
13 checks passed
@atravitz atravitz deleted the feat/logging-control branch November 21, 2025 15:30
@atravitz atravitz mentioned this pull request Dec 4, 2025
7 tasks
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.

add jaxlib error explanation in FAQ

4 participants