Skip to content

Merge DataEntry definitions - #184

Merged
mattwthompson merged 16 commits into
mainfrom
merge-target-classes
Oct 14, 2026
Merged

mattwthompson merged 16 commits into
mainfrom
merge-target-classes

Conversation

@mattwthompson

@mattwthompson mattwthompson commented Oct 7, 2026 •

Copy link
Copy Markdown
Member
  • Move from smiles_a, etc. to smiles and x being lists (maybe necessary for for Add functionality to parse osmotic coefficients #15)
  • Use tag instead of shadowing built-in type
  • Update tests
  • Merge duplicate DataEntry definitions
  • Re-export DataEntry into older code path
  • Leave in SMILES-mapping side-effect?

@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.71429% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.44%. Comparing base (bfd1933) to head (5bc0f52).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tyff/converters/openff/nonbonded.py 0.00% 1 Missing ⚠️
tyff/converters/openmm/nonbonded.py 75.00% 1 Missing ⚠️
tyff/utils/reporting.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
- Coverage   83.57%   83.44%   -0.13%     
==========================================
  Files          58       58              
  Lines        5205     5177      -28     
==========================================
- Hits         4350     4320      -30     
- Misses        855      857       +2     

☔ View full report in Codecov by Harness.
📢 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.

This comment was marked as outdated.

@mattwthompson
mattwthompson marked this pull request as ready for review October 13, 2026 16:45
@mattwthompson
mattwthompson requested a balanced review from Copilot October 13, 2026 16:45

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.

🟡 Changes recommended

create_dataset discards its deep copies and mutates caller input in place, and a test assertion was flipped to match that buggy behavior rather than fixing it.

4 open findings

🧠 Review effort: Balanced

# since the test data is not mapped, but the stored data is mapped
# Revisit if DataEntry is changed to store mapped SMILES
assert row["smiles"] != entry["smiles"]
assert row["smiles"] == entry["smiles"]
Comment thread tyff/targets/thermo.py
Comment thread tyff/targets/thermo.py
Comment on lines +145 to +150
copied_entries = [copy.deepcopy(entry) for entry in entries]

Returns:
The created dataset.
"""

for row in rows:
row["smiles_a"] = tyff.utils.molecule.map_smiles(row["smiles_a"])
copied_entries = [entry for entry in entries]

if row["smiles_b"] is None:
continue
for copied_entry in copied_entries:
copied_entry["smiles"] = [tyff.utils.molecule.map_smiles(value) for value in copied_entry["smiles"]]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

See #189 for discussion on whether or not we want this side effect

@lilyminium lilyminium left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks Matt, LGTM from a quick skim -- just a comment on the ThermoML choices. There's also a copilot comment that seems worth resolving to me.

Comment thread tyff/targets/thermo.py
if entry["tag"] == "density":
value = _predict_density(entry, observables["bulk"][keys["bulk"]])
elif entry["type"] == "hvap":
elif entry["tag"] == "hvap":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I remember for the ThermoML dataset code in dimsim we had used longer type names eg enthalpy_of_vaporization. Could you please check those are consistent?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bit of a hornet's nest here - you remember correctly but this code may not be used in MVP at all. I'm kicking this down the road for now instead of removing or refactoring this now

mattwthompson and others added 3 commits October 14, 2026 14:52
Fix function signature and improve docstring format.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mattwthompson

Copy link
Copy Markdown
Member Author

Thanks @lilyminium!

@mattwthompson
mattwthompson merged commit a8ca593 into main Oct 14, 2026
5 checks passed
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.

4 participants