cjvanlissa / worcs

Rstudio project template and convenience functions for the Workflow for Open Reproducible Code in Science (WORCS)
https://cjvanlissa.github.io/worcs/
GNU General Public License v3.0
76 stars 11 forks source link

preregistration (and other info?) pushed to OSF via osfr #99

Closed aschetti closed 3 years ago

aschetti commented 3 years ago

During the awesome WORCShop at the Open Science Community Rotterdam, I noted that the preregistration created within worcs is pushed to GitHub but not to the Open Science Framework. It may be a good idea to allow users to optionally push there as well: researchers in several social science disciplines are actively using the OSF Registries as preferred prereg service, because it can be connected to a companion OSF project with data, code, and materials.

One possibility could be to push the preregistration created within worcs to a specific OSF component (e.g., called preregistration) within a project, which would then be linked to the OSF Registries. The R package osfr already offers a nice entry-point to the OSF, so perhaps a worcs-osfr integration could be useful.

Once the connection to the OSF is established the user can decide whether to push only the preregistration or also something else, e.g., data that are too big for GitHub.

What do you think?

cjvanlissa commented 3 years ago

@aschetti looking into this now, and I remember why I didn't follow up on this earlier: Because users need to make a PAT, which is a substantial bottleneck (cf: the GitHub authorization is currently the largest bottleneck for users). https://docs.ropensci.org/osfr/articles/auth

Do you have any thoughts on this?

aschetti commented 3 years ago

Yes, I can imagine that a PAT could be a bottleneck for inexperienced users. I can't think of a way to automate the token creation on the OSF but, once it's available, perhaps worcs could automatically authenticate users at the beginning of each session or, better, generate a .Renviron file in the project directory that defines OSF_PAT. During the first initialization of the worcs project, the user could be asked whether they want to connect to the OSF (yes/no), whether they already have a token (yes/no, with a link to instructions on how to do it), and paste the token. Having a dedicated function could also allow users to connect to the OSF at a later point in time, only if necessary (e.g., because data are too big for GitHub).

cjvanlissa commented 3 years ago

This is a really good idea, thank you for brainstorming it!

cjvanlissa commented 3 years ago

@aschetti I've been investigating this, but now leaning towards not supporting it.

Reasons:

1) My students found some non-reproducible code, which failed because functions in osfr were not deprecated properly 2) Our workflow recommends hosting the files on GitHub - not on OSF storage. This is because GitHub offers the advantages of version control, easy updates from the console, online editability, and collaboration. The main function of osfr is currently to interface with OSF storage, so if we're not using that - the package is not very useful 3) osfr does not allow you to add preprints to an OSF project, currently.

aschetti commented 3 years ago

@cjvanlissa I completely understand! After all, osfr can still be used in combination with worcs, you don't necessarily need to facilitate its usage if it doesn't fit well with the philosophy behind your package. Thanks anyway for the nice brainstorming!