data-models icon indicating copy to clipboard operation
data-models copied to clipboard

Functionality unclear with regards to properties and attributes in pysmartdatamodels

Open auphofBSF opened this issue 3 years ago • 1 comments

I imagine there is a plan for attributes and properties as shown in https://github.com/smart-data-models/data-models/blob/df304f80d691750d8bd9d50d1be4bf96590b3c88/pysmartdatamodels/pysmartdatamodels.py#L77

I would like to retrieve the RepoLink as defined in official_list_data_models.json for the moment I have implemented the following,

is there an alternative and what is the intended properties ?

def datamodels_subject(subject: str, names_only=True):
    """List the names or full record of the entities defined in the data models.
    Parameters:
        subject: name of the subject
        names_only: (default True)  output only the list of data models for a subject
                    else output the full JSON object as in `official_list_data_models.json` 
    Returns:
       if subject is found
         if names_only
            array of strings: data models' names belonging to the subject
         else
            dict of properties(full JSON object as in `official_list_data_models.json` )  about the subject
       if subject is not found
         False
    """

I will be happy to use suggestions or push this as a PR?

auphofBSF avatar Sep 27 '22 22:09 auphofBSF

What you mean is something that is also on the debate. Should we include the official list of data models? I would say yes. Then why is it not here? Because we were creating the package and more important because we do not have feedback requesting that. Your feedback is important and therefore I guess that we should include it. Additionally other of my main concerns about the package is how to maintain the connections with the official list and repository because it is 'continuously' (2-3 days) being updated.

albertoabellagarcia avatar Oct 06 '22 11:10 albertoabellagarcia

this link is the official list pointing to the repositories

albertoabellagarcia avatar Nov 22 '22 12:11 albertoabellagarcia

We have just published the pysmartdatamodels with two new functions inspired by your requests to get the repo of a data model and the repo of a subject. The source code is released as well. thanks

albertoabellagarcia avatar Jan 27 '23 01:01 albertoabellagarcia