Skip to content

Conversation

AntitheticalElysium
Copy link
Contributor

PR for issue #195: Refactors method names for improved clarity:

  • Dataset.from_tabularDataset.add_features_from_tabular
  • Dataset.from_features_identifierDataset.extract_dataset_from_identifier
  • Sample.from_features_identifierSample.extract_sample_from_identifier

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)
* Renamed Dataset/Sample methods:
  - from_tabular → add_features_from_tabular
  - from_features_identifier → extract_dataset_from_identifier
  - from_features_identifier → extract_sample_from_identifier
@AntitheticalElysium AntitheticalElysium requested a review from a team as a code owner September 16, 2025 13:24
Copy link

gitnotebooks bot commented Sep 16, 2025

Review these changes at https://app.gitnotebooks.com/PLAID-lib/plaid/pull/205

Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 96.72131% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/plaid/containers/dataset.py 90.90% 1 Missing ⚠️
src/plaid/containers/sample.py 97.72% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AntitheticalElysium
Copy link
Contributor Author

Hmm, strange

@xroynard
Copy link
Contributor

I don't understand, was the PR closed by mistake?

@AntitheticalElysium
Copy link
Contributor Author

No sorry, seems like there was an issue with the branches and I diverged from #191 instead of main. I'll try the PR again, it should work now.

@xroynard
Copy link
Contributor

Yes, we just merged a big PR that modifies plaid/containers/sample.py, sorry about that

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.

2 participants