Skip to content

Conversation

AntitheticalElysium
Copy link
Contributor

@AntitheticalElysium AntitheticalElysium commented Sep 9, 2025

Summary

This PR refactors Sample and related code to standardize the treemesh naming convention (issue #111):

  • Renames methods, fixtures, and examples to use mesh.
  • Adds deprecation decorators for backward compatibility.
  • Updates tests, notebooks, benchmarks, and examples accordingly.

Checklist

  • Typing enforced
  • Documentation updated
  • Changelog updated
  • Tests and Example updates
  • Coverage should be 100%

* feat(src/plaid/containers/sample.py):
    * Renamed methods: show_tree -> show_mesh, init_tree -> init_mesh, add_tree -> add_mesh, del_tree -> del_mesh, link_tree -> link_mesh
    * Added @deprecated decorators to old methods for backward compatibility
    * Corrected _links and _paths initialization in add_mesh to fix KeyError
* refactor(tests/containers/test_sample.py):
    * Updated method calls (ex: sample.add_tree -> sample.add_mesh)
    * Renamed fixtures (ex: sample_with_tree -> sample_with_mesh, tree -> mesh)
    * Updated fixture usage in test functions
* refactor(tests/containers/test_dataset.py):
    * Updated fixture usage (dataset_with_samples_with_tree -> dataset_with_samples_with_mesh)
* refactor(tests/pipelines/test_sklearn_block_wrappers.py):
    * Updated fixture usage (dataset_with_samples_with_tree_nodes_feat_ids -> dataset_with_samples_with_mesh_nodes_feat_ids)
* refactor(tests/utils/test_cgns_helper.py):
    * Updated fixture usage (sample_with_tree -> sample_with_mesh, tree -> mesh)
* refactor(tests/conftest.py):
    * Renamed fixtures (tree -> mesh, sample_with_tree -> sample_with_mesh, samples_with_tree -> samples_with_mesh, dataset_with_samples_with_tree -> dataset_with_samples_with_mesh)
    * Updated fixture usage (heterogeneous_dataset)
* refactor(tests/utils/test_stats.py):
    * Updated method calls (s.init_tree -> s.init_mesh)
* refactor(examples/):
    * Updated method calls (ex: sample.add_tree -> sample.add_mesh, sample.show_tree -> sample.show_mesh)
* refactor(benchmarks/):
    * Updated method calls (ex: new_sample.add_tree -> new_sample.add_mesh, new_sample.link_tree -> new_sample.link_mesh)
* refactor(docs/notebooks):
    * Updated notebook examples to use mesh instead of tree
* docs(CHANGELOG.md):
    * Added entry for tree → mesh refactor (#111)
@AntitheticalElysium AntitheticalElysium requested a review from a team as a code owner September 9, 2025 13:22
Copy link

gitnotebooks bot commented Sep 9, 2025

Found 4 changed notebooks. Review the changes at https://app.gitnotebooks.com/PLAID-lib/plaid/pull/191

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Member

@casenave casenave left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

Copy link
Contributor

@xroynard xroynard left a comment

Choose a reason for hiding this comment

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

Nice work ! you should just check that notebooks run well in jupyter (saving them without outputs)

Copy link
Contributor

@xroynard xroynard left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@casenave
Copy link
Member

Hello @AntitheticalElysium, sorry for this, but we merged a big PR which intrduced conficts in your own. We can discuss about it if you need help to correct them.

@AntitheticalElysium
Copy link
Contributor Author

@casenave No problem, I'll handle the merge

@casenave casenave added this to the version 0.1.9 milestone Sep 20, 2025
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