Feature: Refactor tree.py (organize, reformat) and add missing getters/setters - #3079
Open
WhoBrokeTheBuild wants to merge 4 commits into
Open
Feature: Refactor tree.py (organize, reformat) and add missing getters/setters#3079WhoBrokeTheBuild wants to merge 4 commits into
WhoBrokeTheBuild wants to merge 4 commits into
Conversation
Reformat functions with broken/confusing formatting Organize similar functions together Change all NCI Derived Property functions to call getters/setters, rather than the other way around Group all DBI related things into these sections, ordered by their position in the property section * DBI Properties * DBI Properties getters/setters Group all NCI related things into these sections, ordered by their position in the flags/properties sections * NCI Flags e.g. `.no_write_model` * NCI Flags getters/setters e.g. `.isNoWriteModel()` * NCI Properties e.g. `.brother` * NCI Properties getters/setters e.g. `.getBrother() * NCI Derived Properties e.g. `.descendants`, `.on`, `.local_path` * NCI Derived Properties getters/setters e.g. `.getDescendants()`, `.isOn()`, `.getLocalPath()` Add getters for Tree: * index -> getIndex() * number_opened -> getNumOpened() * max_open -> getMaxOpen() * dispatch_table -> hasDispatchTable() Add getters for TreeNode: * mclass -> getClassID() * dtype -> getDtypeID() * data_in_nci -> isDataInNci() * rfa -> getRFA() * compression_method -> getCompressionMethodID() Add aliases for TreeNode properties: * conglomerate_elt = conglomerate_element_index * number_of_elts = number_of_conglomerate_elements * getConglomerateElt() = getConglomerateElementIndex() * getConglomerateNodes() = getConglomerateElements() * getNumElts = getNumElements This is the first in a series of PRs to cleanup and improve the python package, and include some of the features originally written for mdsthin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reformat functions with broken/confusing formatting
Organize similar functions together
Change all NCI Derived Property functions to call getters/setters, rather than the other way around
Remove erroneous
def compression_methodwhich overshadowedcompression_method = Nci._nciProp...Set a default
= Truefor all flag setters so thatnode.setWriteOnce()works, rather than having to saynode.setWriteOnce(True)Group all DBI related things into these sections, ordered by their position in the property section
Group all NCI related things into these sections, ordered by their position in the flags/properties sections
.no_write_model.isNoWriteModel().brother.descendants,.on,.local_path.getDescendants(),.isOn(),.getLocalPath()Add missing getters for Tree:
index->getIndex()number_opened->getNumOpened()max_open->getMaxOpen()dispatch_table->hasDispatchTable()Add missing getters for TreeNode:
mclass->getClassID()dtype->getDtypeID()data_in_nci->isDataInNci()rfa ->getRFA()`flags->getFlags()error_on_put->hadErrorOnPut()cached->isCached()data_in_nci->isDataInNci()compression_method->getCompressionMethodID()compression_method_str->getCompressionMethod()subtree->isSubtree()Add missing setters for TreeNode:
disabled->setDisabled()parent_disabled->setParentDisabled()Add aliases for TreeNode properties:
conglomerate_elt=conglomerate_element_indexnumber_of_elts=number_of_conglomerate_elementsgetConglomerateElt()=getConglomerateElementIndex()getConglomerateNodes()=getConglomerateElements()getNumElts()=getNumElements()This is the first in a series of PRs to cleanup and improve the python package, and include some of the features originally written for mdsthin
Apologies for the effort that will be required to review this, reordering functions makes for a terrible diff