rcsb / py-rcsb_db

RCSB Python Database Utility Classes
Other
11 stars 5 forks source link

Fix list variable names in DocumentDefinitionHelper #45

Open piehld opened 2 years ago

piehld commented 2 years ago

Notice the incorrect naming of the includeL and excludeL variables in DocumentDefinitionHelper (here). The names should be flip-flopped between the two methods:

    def getExcluded(self, collectionName):
        """For input collection, return the list of excluded schema identifiers."""
        includeL = []
        try:
            includeL = [tS.upper() for tS in self.__cfgD["document_collection_content_filters"][collectionName]["EXCLUDE"]]
        except Exception as e:
            logger.debug("Collection %s failing with %s", collectionName, str(e))
        return includeL

    def getIncluded(self, collectionName):
        """For input collection, return the list of included schema identifiers."""
        excludeL = []
        try:
            excludeL = [tS.upper() for tS in self.__cfgD["document_collection_content_filters"][collectionName]["INCLUDE"]]
        except Exception as e:
            logger.debug("Collection %s failing with %s", collectionName, str(e))
        return excludeL