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

Standardize database source column #175

Open
jacksund opened this issue Jun 12, 2022 · 0 comments
Open

Standardize database source column #175

jacksund opened this issue Jun 12, 2022 · 0 comments
Labels
enhancement New feature or request partial fix added A temporary fix has been merged into main

Comments

@jacksund
Copy link
Owner

Expand on the types of sources that may be needed:
IMG_1251

And also add method to the DatabaseTable base class to enable grabbing these different sources:

    def get_source_seed(self):
        """
        WARNING: This is an experimental method.
        
        Attempts to jump back through sources until we find the orginal 'seed'
        source -- that is, a calculation that has some external source such as
        user input or a third-party database.
        """
        
        from simmate.toolkit import Structure
        
        current_source = self.source
        while current_source and "calculation_table" in current_source:
            current_source = Structure.from_database(current_source).calculation.source

        return current_source

    def get_source_children(self):
        """
        WARNING: This is an experimental method.
        
        Attempts to jump back through sources of all tables and find which ones
        point back to this given object as a seed source. It will return all
        child sources that meet this criterion.
        """
        raise NotImplementedError
@jacksund jacksund added the enhancement New feature or request label Jun 12, 2022
@jacksund jacksund added the partial fix added A temporary fix has been merged into main label Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request partial fix added A temporary fix has been merged into main
Projects
None yet
Development

No branches or pull requests

1 participant