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

Implement S3 class & utilities for modifying the codemeta object #2

Open
cboettig opened this issue Mar 31, 2017 · 5 comments
Open

Comments

@cboettig
Copy link
Member

codemeta includes fields that don't exist in DESCRIPTION (e.g. author ORCIDs). Currently the interface just writes out a codemeta.json file directly, rather than providing an intermediate R object and utility functions for modifying (or extracting) metadata from it.

Ideally create_codemeta() would return an S3 object that could be modified with appropriate helper functions for adding these additional fields. A clever implementation could include the ability to infer some of these fields from sources other than the DESCRIPTION file (e.g. one could image querying GitHub for a list of contributors, and helping add these contributors to the codemeta.json (and optionally, to the DESCRIPTION?) with appropriate flags (e.g. some GitHub contributors might be mustBeCited = FALSE).

@cboettig cboettig modified the milestone: 0.2.0 release Jun 29, 2017
@maelle
Copy link
Member

maelle commented Apr 11, 2018

What fields would have their place here rather than in usethis/desc? 🤔

I like the idea of querying contributors fro GitHub to add them to DESCRIPTION 😍

@maelle
Copy link
Member

maelle commented Apr 25, 2018

Related to #85

But I think create_codemeta should be a wrapper around all operations?

Now ORCID can live in DESCRIPTION.

Related to infer contributors from GitHub and adding them to DESCRIPTION see my gist https://gist.github.com/maelle/75261a0b6793d18cfdd02734d2e3f243 mentioned in #95 That said I'm not sure that code using ghrecipes/any GH API code & desc should live in codemetar? I'm a bit biased but I was imagining such a helper living in rodev unless you think it'd be a general need for developers. Some developers refuse PR before people add themselves as contributors after all.

@maelle
Copy link
Member

maelle commented Apr 25, 2018

The reason why I think create_codemeta should be a wrapper around operations is that otherwise the update workflow of codemeta.json will be a pain.

@cboettig
Copy link
Member Author

Yeah, I think I see what you mean, but I'm worried about fully automating look ups that might not be fully reliable -- I think this really needs user confirmation that the name is correct. (After all, if we could fully automate identifying authors from the existing metadata we wouldn't need ORCID ids to disambiguate authors, right?)

I agree about better to have the GH API stuff in rodev rather then here.

Re S3 class issue, I'm not sure we need it; I guess we still have a bit of an open question whether it makes sense to have a native R object representation of the whole 'codemeta.json' file and whether it makes sense to be able to add stuff directly to said file "on the fly" so to speak, rather than requiring that all such metadata live somewhere on disk already (i.e. DESCRIPTION, README).

@maelle
Copy link
Member

maelle commented Apr 25, 2018

Ah sorry I mean the lookup would help creating a file of some sort manually and for once, and that file would be used automatically

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

No branches or pull requests

2 participants