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

Start to add codemeta.json #324

Closed

Conversation

ChristianTackeGSI
Copy link
Member

codemeta.json is becoming a standard format for describing software. Let's start to add it.

This is also starting to get relevant in the context of ESCAPE.

I created the current codemeta.json to match the entry on zenodo as closely as possible. That means, that any issues with the zenodo entry are also issues with the codemeta data.

Notes:

  • zenodo lists the license as other
    github lists it as LGPL-3.0
    I have set it to "LGPL-3.0-or-later".
    If that's correct, please consider updating zenodo.
    If that's wrong, please fix codemeta.json (possibly in a new commit, possibly by letting me git commit --amend), and fix zenodo.

Helpful:


Checklist:

@ChristianTackeGSI
Copy link
Member Author

If you need more details, or have any other questions, you might consider waiting until Monday's Group Meeting. I have allocated a short slot there.

codemeta.json Outdated
"familyName": "Nicolas Winckler",
"affiliation": {
"@type": "Organization",
"name": "Bull-Atos"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this meant to be updated/maintained when someone's affiliation changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I'll take that question to the next ESCAPE meeting. Seems interesting genereally.
  • First quick answer: The same as on zenodo: Find someone to update it. Not very scalable.
  • Also maybe the meaning is "The affiliation that person had, when working on the project"? I'll try to figure that out.
  • One possible way around this: Don't add an affiliation. Just add an ORCID. You can update your own ORCID.

@ChristianTackeGSI
Copy link
Member Author

ChristianTackeGSI commented Dec 14, 2020

@dennisklein
we talked about extracting the version from codemeta.json in cmake (this works, I tested it):

function(get_codemeta_version)
  if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
    file(READ "${CMAKE_SOURCE_DIR}/codemeta.json" codemeta_content)
    string(JSON codemeta_version GET "${codemeta_content}" "version")
    string(REGEX REPLACE "^v" "" codemeta_version "${codemeta_version}")
    set(PROJECT_CODEMETA_VERSION "${codemeta_version}" PARENT_SCOPE)
  endif()
endfunction()

If you're interested, we can improve that code and include it in this PR?

This also works nicely:

-get_git_version()
+get_codemeta_version()
+get_git_version(DEFAULT_VERSION "${PROJECT_CODEMETA_VERSION}")

@dennisklein
Copy link
Member

@ChristianTackeGSI Could you post the list of codemeta keys we discussed last week we want to support, then I can take over from here. Thx!

@ChristianTackeGSI
Copy link
Member Author

I will force-push maybe tomorrow or Wednesday with an updated codemeta.json, a (python based) tool to update codemeta.json from AUTHORS and CONTRIBUTORS (and version). I will also include a bit of cmake to read the version from codemeta.json (for the dist tarballs).

I hope that will be a good point for you to continue then. Let's see.

codemeta.json is becoming a standard format for describing
software. Let's start to add it.

This version represents the old data on zenodo.
These are the fields, that we actually want in there.
All the other fields should be generated by a tool.
This tool can take the data from AUTHORS and CONTRIBUTORS
and merge it into the appropriate codemeta.json sections.
This is really a merge: If things already exist, they will
be updated.
Small tool for release tarballs to read the current version
from the codemeta.json.
@ChristianTackeGSI
Copy link
Member Author

@dennisklein Okay, updated some stuff.

  1. I have left in my original codemeta.json and put the changes to it in a distinct commit. If you want me to squash them together: ping me, I am happy with that as well.
  2. I have started a small python tool:
    • ./codemeta_update.py --set-version 1.4.34
    • It will read AUTHORS and CONTRIBUTORS and merge them into codemeta.json. That way people can put their ORCID in codemeta.json.
    • it will override the version when --set-version is given to it.
    • Everything else is hardcoded for now.
    • No integration with cmake yet.
  3. I have added a bit of cmake code to read the current version from codemeta.json as a fallback for the dist-tarballs. If you don't like it, drop it, or improve it. Do whatever you like.

@dennisklein dennisklein self-assigned this Mar 24, 2021
@dennisklein dennisklein added this to the v1.4 milestone Mar 24, 2021
@dennisklein
Copy link
Member

cherry-picked in #363

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

Successfully merging this pull request may close these issues.

None yet

3 participants