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

Idea: group class properties together #44

Open
stolarczyk opened this issue Nov 17, 2020 · 0 comments
Open

Idea: group class properties together #44

stolarczyk opened this issue Nov 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@stolarczyk
Copy link
Member

It would be easier to follow the API docs if object properties were grouped together in a separate section just as Python's help(<obj>) does it:

help(PipestatManager) 
Help on class PipestatManager in module pipestat.pipestat:

class PipestatManager(attmap.attmap.AttMap)
 |  Class that provides methods for a standardized reporting of pipeline
 |  statistics. It formalizes a way for pipeline developers and downstream
 |  tools developers to communicate -- results produced by a pipeline can
 |  easily and reliably become an input for downstream analyses.
 |  
 |  Method resolution order:
 |      PipestatManager
 |      attmap.attmap.AttMap
 |      attmap._att_map_like.AttMapLike
 |      collections.abc.MutableMapping
 |      collections.abc.Mapping
 |      collections.abc.Collection
 |      collections.abc.Sized
 |      collections.abc.Iterable
 |      collections.abc.Container
 |      builtins.object
 |  
 |  Methods defined here:
 |  
 |  __init__(self, name, schema_path, results_file=None, database_config=None)
 |      Initialize the object
 |      
 |      :param str name: namespace to report into. This will be the DB table
 |          name if using DB as the object back-end
 |      :param str schema_path: path to the output schema that formalizes
 |          the results structure
 |      :param str results_file: YAML file to report into, if file is used as
 |          the object back-end
 |      :param str database_config: DB login credentials to report into, 
 |      if DB is
 |          used as the object back-end

...
 |  report(self, record_identifier, result_identifier, value, force_overwrite=False)
 |      Report a result.
 |      
 |      :param str record_identifier: unique identifier of the record, value to
 |          in 'record_identifier' column to look for to determine if the record
 |          already exists
 |      :param any value: value to be reported
 |      :param str result_identifier: name of the result to be reported
 |      :param bool force_overwrite: whether to overwrite the existing record
 |      :return bool: whether the result has been reported
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  data
 |      Data object
 |      
 |      :return yacman.YacAttMap: the object that stores the reported data
 |  
 |  db_cursor
 |      Establish connection and get a PostgreSQL database cursor,
 |      commit and close the connection afterwards
 |      
 |      :return LoggingCursor: Database cursor object
 |  
 |  file
 |      File path that the object is reporting the results into
 |      
 |      :return str: file path that the object is reporting the results into
 |  
 |  name
 |      Namespace the object writes the results to
 |      
 |      :return str: Namespace the object writes the results to
 |  
 |  schema
 |      Schema mapping
 |      
 |      :return dict: schema that formalizes the results structure

@stolarczyk stolarczyk added the enhancement New feature or request label Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant