Skip to content

Commit

Permalink
Merge pull request #11 from cacoco/cacoco/v3
Browse files Browse the repository at this point in the history
[codemetagenerator] Update to CodeMeta v3
  • Loading branch information
cacoco authored Feb 5, 2024
2 parents 7c4c934 + 93d0f95 commit 6981445
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 36 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Set up Git Config
run: |
git config user.name "goreleaserbot"
git config user.email "<bot@goreleaser.com>"
- name: Install jj
uses: jaxxstorm/action-install-gh-release@v1.10.0
with: # Grab the latest version
repo: tidwall/jj
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -30,3 +38,9 @@ jobs:
# need to push to cacoco/homebrew-tap; use CACOCO_TOKEN instead of default GITHUB_TOKEN
GITHUB_TOKEN: ${{ secrets.CACOCO_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
- name: Update codemeta.json version
if: ${{ success() }}
run: |
jj -i codemeta.json -v 0.47.3 version -o codemeta.json
git commit -am "Update codemeta.json version"
git push origin main
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,19 @@ The syntax follows the `sjson` ([https://github.com/tidwall/sjson](https://githu


## CodeMeta
[CodeMeta](https://codemeta.github.io) is a [JSON-LD](https://json-ld.org/) file format used to describe software projects. See a [full example](https://github.com/ropensci/codemetar/blob/main/codemeta.json).
[CodeMeta](https://codemeta.github.io) is a [JSON-LD](https://json-ld.org/) file format used to describe software projects.

### CodeMeta Metadata Usage

A CodeMeta instance file describes the metadata of a software object using [JSON-LD](https://json-ld.org/) notation. An instance file is typically located at the root of your repository and can contain any of the properties described on the [CodeMeta terms page](https://codemeta.github.io/terms/). The instance file is generally named, `codemeta.json`.

JSON-LD uses a [context](https://niem.github.io/json/reference/json-ld/context/) file to associate JSON names with IRIs ([Internationalized Resource Identifier](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)). The JSON names then serve as abbreviated, local names for the IRIs that are universally unique identifiers for concepts from widely used schemas such as [schema.org](https://schema.org/).

The context file [codemeta.jsonld](https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld) contains the complete set of JSON properties adopted by the CodeMeta project.

### Example

A full example can be seen in the [ropensci/codemeter](https://github.com/ropensci/codemetar) GitHub project page: [https://github.com/ropensci/codemetar/blob/main/codemeta.json](https://github.com/ropensci/codemetar/blob/main/codemeta.json).

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Expand Down
14 changes: 5 additions & 9 deletions codemeta.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@context": "https://w3id.org/codemeta/3.0",
"@type": "SoftwareSourceCode",
"codeRepository": "https://github.com/cacoco/codemetagenerator",
"description": "Interactive generator to create a CodeMeta SoftwareSourceCode description.",
"developmentStatus": "Active",
"identifier": "codemetagenerator",
"keywords": [
"codemeta",
"codemeta-generator",
"go",
"golang"
],
"keywords": ["codemeta", "codemeta-generator", "go", "golang"],
"license": "https://spdx.org/licenses/Apache-2.0.html",
"maintainer": {
"@id": "https://orcid.org/0009-0002-8232-1782",
Expand All @@ -27,5 +22,6 @@
},
"readme": "https://github.com/cacoco/codemetagenerator/blob/main/README.md",
"runtimePlatform": "go version go1.21.6",
"version": "0.47.2"
}
"version": "0.47.3",
"url": "https://angstrom.io/codemetagenerator"
}
52 changes: 26 additions & 26 deletions internal/model/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ package model

const (
// Default Supported JSON Keys
Type = "@type"
Id = "@id"
Context = "@context"
Identifier = "identifier"
GivenName = "givenName"
FamilyName = "familyName"
Email = "email"
Name = "name"
Description = "description"
RelatedLink = "relatedLink"
CodeRepository = "codeRepository"
IssueTracker = "issueTracker"
License = "license"
Version = "version"
ProgrammingLanguage = "programmingLanguage"
RuntimePlatform = "runtimePlatform"
Maintainer = "maintainer"
Author = "author"
Contributor = "contributor"
ReleaseNotes = "releaseNotes"
Keywords = "keywords"
Readme = "readme"
ContIntegration = "contIntegration"
DevelopmentStatus = "developmentStatus"
URL = "url"
Type = "@type"
Id = "@id"
Context = "@context"
Identifier = "identifier"
GivenName = "givenName"
FamilyName = "familyName"
Email = "email"
Name = "name"
Description = "description"
RelatedLink = "relatedLink"
CodeRepository = "codeRepository"
IssueTracker = "issueTracker"
License = "license"
Version = "version"
ProgrammingLanguage = "programmingLanguage"
RuntimePlatform = "runtimePlatform"
Maintainer = "maintainer"
Author = "author"
Contributor = "contributor"
ReleaseNotes = "releaseNotes"
Keywords = "keywords"
Readme = "readme"
ContinuousIntegration = "continuousIntegration"
DevelopmentStatus = "developmentStatus"
URL = "url"
// Implementation Values
DefaultContext = "https://doi.org/10.5063/schema/codemeta-2.0"
DefaultContext = "https://w3id.org/codemeta/3.0"
PersonType = "Person"
OrganizationType = "Organization"
SoftwareSourceCodeType = "SoftwareSourceCode"
Expand Down

0 comments on commit 6981445

Please sign in to comment.