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

Add logging at high-level landmarks or common debug points #86

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

mattwthompson
Copy link
Member

@mattwthompson mattwthompson commented Nov 25, 2024

The goals here are basically to have

  • INFO-level logging at a few key landmarks in a run, the intended use case being normal automation logs
  • DEBUG-level logging at a few more points that are likely to be starting points for debugging

@mattwthompson mattwthompson marked this pull request as ready for review November 25, 2024 18:45
@mattwthompson mattwthompson requested a review from ntBre November 25, 2024 18:45
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

LGTM, minus the typo. I think the coordinates are fine to leave out, just wanted to mention it for your consideration.

@@ -127,9 +134,11 @@ def _minimize_constrained(
except (KeyError, AssertionError):
pass

LOGGER.debug(f"Creating molecule, with conformer, from {input.mapped_smiles=}")
molecule = Molecule.from_mapped_smiles(input.mapped_smiles, allow_undefined_stereo=True)
molecule.add_conformer(Quantity(input.coordinates, "angstrom"))
Copy link
Contributor

Choose a reason for hiding this comment

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

I could see the coordinates themselves being interesting for a super-involved debugging session, but it would also produce a ton of output.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I'm inclined to keep those out of STDOUT unless we really want to include them - currently DEBUG is, I think, large enough to parse through with some skill but not so large it'll fill up disks with log files

yammbs/torsion/_minimize.py Outdated Show resolved Hide resolved
@mattwthompson mattwthompson merged commit 77834f0 into add-torsion-models Nov 25, 2024
7 checks passed
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.10%. Comparing base (e75b1fc) to head (592fffc).
Report is 3 commits behind head on add-torsion-models.

Additional details and impacted files

@mattwthompson mattwthompson deleted the improve-logging branch November 25, 2024 19:45
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.

3 participants