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 LeafNode class #292

Open
khaledsulayman opened this issue Sep 30, 2024 · 2 comments
Open

Add LeafNode class #292

khaledsulayman opened this issue Sep 30, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@khaledsulayman
Copy link
Member

Currently, leaf node objects are being passed around as a list of dictionaries, but there seems to be a very clear outline in code for what a schema would look like for a LeafNode class.

@khaledsulayman khaledsulayman added the good first issue Good for newcomers label Sep 30, 2024
@bbrowning
Copy link
Contributor

Yes, this is a great chance to add standard Python classes or even Pydantic models to stop passing around these dicts everywhere.

@bbrowning
Copy link
Contributor

An excellent candidate to live on this new leaf node class is code like leaf_node_path = leaf_node[0]["taxonomy_path"].replace("->", "_") - we have more than one place that needs this path, and this would be great as a method on the leaf node instance objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants