-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ess swap 2418 #20
Ess swap 2418 #20
Conversation
Thanks for the PR. I agree that consistent naming is necessary. I am a little worried about changing them PR by PR given that people are using the package already. But if we have to, I guess it's fine. Part of the problem here is that SciCat has several endpoints with several names for essentially the same thing. Take Dataset loading, for example. To create a new dataset, you can choose a variety of endpoints and methods:
To replace an existing dataset:
We have similar issues with finding datasets. At the same time, we need to be aware of the changes in new backend, which does not currently support the upsert. The new version is less loopbacky and more RESTful. I think I agree that CRUD naming is good, but it's not quite enough, not capturing search or upsert. How about the following methods for each data type, taking Datasets as an example:
If we decide on a consistent pattern that can be applied to both versions of the backend, then we can thing about refactoring the client into multiple modules, on per root data type (datasets, proposals, samples, etc) What do you thing, @nitrosx ? |
@dylanmcreynolds I like your idea with a slight change!!! Using
If you agree, I will make the changes to my PR. |
I am still also trying to keep in mind the idea that you put forth of merging methods into data types, so trying to take the noun out of the function name, how about:
|
@dylanmcreynolds Deal!!!
How do you feel about this? ...or would you like to use:
This version confuses me with singular and plural. |
@dylanmcreynolds Can you confirm that the following changes are inline with what you have in mind?
Once this PR is in, we can review and make the functionalities consistent |
PR #24 superseeds this PR |
This pull request will integrates the new functionalities added at ESS.
I also renamed functions according to the CRUD paradigm and mongodb functionalities (Regarding upsert)
Functionalities are still accessible with the all name, for backward compatibility.
I also added few new tests.