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

exportCohortDefinitionSet() should be called getCohortDefinitionSet() #243

Open
schuemie opened this issue Feb 3, 2022 · 3 comments
Open

Comments

@schuemie
Copy link
Member

schuemie commented Feb 3, 2022

I think the exportCohortDefinitionSet() function should be called getCohortDefinitionSet(), since the function doesn't export anything. It just gets information from WebAPI, similar to for example getCohortDefinition().

@ablack3
Copy link
Collaborator

ablack3 commented Feb 3, 2022

Are there recommendations for the consistent use of generic verbs like "get", "export", "create", "write", "read", "save", "load" across Hades?
For example, "get" implies retrieving records from a database into R.

@schuemie
Copy link
Member Author

schuemie commented Feb 4, 2022

Hmmm, it would be nice if such recommendations existed, but they don't. I was merely pointing out that, in this particular case,
'export' seemed inconsistent with the verbs used in this package itself.

My personal interpretation of verbs:

  • get: retrieve an object or value from somewhere (could be memory, a database, an API, an SFTP server).
  • set: set a value in memory.
  • put: upload a value to an API or SFTP server.
  • insert: upload data to a database.
  • load: load an object from the local file system.
  • save: save an object to the local file system.
  • create: create some object.
  • compute: compute a value.
  • fit: a specific type of compute, where we fit a model to data.
  • plot: create a plot (usually with an option to write it to the local filesystem).
  • run: perform a series of pre-specified steps.
  • is: return a true/false answer about a state.
  • import: get an object from another programming environment. (e.g. import a Python object into R)
  • export: the reverse of 'import'.

I never really use 'read', or 'write' for some reason.

@ablack3
Copy link
Collaborator

ablack3 commented Feb 4, 2022

I like your interpretation. This discussion should perhaps be in a different thread since it is a cross-hades topic. I think the steps would be 1) compile a list of all hades functions 2) look for commonly used verbs 3) identify inconsistencies in how they are used. It might be that there is already clear usage. I know Capr has a lot of create____ functions and I was thinking about the possibility of omitting the create verb in some cases. For example we use data.frame() instead of create.data.frame().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants