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

New recommended API #173

Merged
merged 1 commit into from
Nov 22, 2023
Merged

New recommended API #173

merged 1 commit into from
Nov 22, 2023

Conversation

michaeldeistler
Copy link
Contributor

I accidentally overrode #169 so this reimplements it:

New API:

comp = nx.Compartment()
branch = nx.Branch(comp, nseg=4)
cell = nx.Cell(branch, parents=[-1, 0, 0])

Also possible is:

comp1 = nx.Compartment()
comp2 = nx.Compartment()
branch1 = nx.Branch([comp1, comp2])
branch2 = nx.Branch([comp1, comp2])
cell = nx.Cell([branch1, branch2], parents=[-1, 0, 0])

Therefore, the old API does not break. It is simply no longer the recommended way to do things.

@michaeldeistler michaeldeistler merged commit 14e6f7d into main Nov 22, 2023
1 check passed
@michaeldeistler michaeldeistler deleted the api branch November 22, 2023 08:38
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.

1 participant