Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
- uses: julia-actions/cache@v3
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
# Run the crosswalk and formatting hygiene checks on one canonical runner
RSMD_CROSSWALK: ${{ (matrix.os == 'ubuntu-latest' && matrix.julia-version == '1') && 'TRUE' || 'FALSE' }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"access_right": "open",
"license": "BSD-2-Clause",
"license": "MIT",
"related_identifiers": [
{
"scheme": "url",
Expand Down
19 changes: 14 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
Copyright (c) 2024-2026 Richard Reeve
MIT License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Copyright (c) 2024-2026 Richard Reeve

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# NEWS

- v0.3.0
- Move the RSMD-specific Project.toml keys (description, keywords, category, development_status, publications and author_details) into a single [rsmd] table, migrating legacy top-level keys there automatically
- Write Project.toml in Pkg's canonical key order, applied recursively to nested tables, so Pkg operations like add and rm no longer reorder the file
- Fix errors and stale examples in the README and documentation, and problem with propagating updates
- Add in demo tests for other packages to adopt and explain how to use them.
- Update license to MIT to make adopting tests in other packages simpler
- v0.2.0
- Include authors without ORCIDs in codemeta.json and .zenodo.json
- Handle missing ORCID and ROR records without crashing
Expand Down
34 changes: 19 additions & 15 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name = "ResearchSoftwareMetadata"
uuid = "58378933-4625-47fa-851e-05ee27d397bd"
license = "BSD-2-Clause"
description = "Research Software metadata crosswalk between Project.toml, codemeta.json, .zenodo.json and LICENSE to provide consistent metadata"
keywords = ["RSMD", "julia", "metadata", "research software"]
category = "metadata"
development_status = "active"
license = "MIT"
version = "0.3.0"
authors = ["Richard Reeve <richard.reeve@glasgow.ac.uk>"]
version = "0.2.0"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand All @@ -23,25 +19,33 @@ Dates = "1.6"
Git = "1"
HTTP = "1,2"
JSON = "1"
JuliaFormatter = "2"
Logging = "1"
TOML = "1"
YAML = "0.4"
julia = "1.10"

[[author_details]]
name = "Richard Reeve"
orcid = "0000-0003-2589-8091"
email = "richard.reeve@glasgow.ac.uk"

[[author_details.affiliation]]
ror = "00vtgdb53"

[extras]
Git = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[rsmd]
keywords = ["RSMD", "julia", "metadata", "research software"]
category = "metadata"
description = "Research Software metadata crosswalk between Project.toml, codemeta.json, .zenodo.json and LICENSE to provide consistent metadata"
development_status = "active"

[[rsmd.author_details]]
name = "Richard Reeve"
email = "richard.reeve@glasgow.ac.uk"
orcid = "0000-0003-2589-8091"

[[rsmd.author_details.affiliation]]
ror = "00vtgdb53"

[targets]
test = ["Test", "Git", "JSON", "Logging", "TOML"]
test = ["Test", "Git", "JSON", "JuliaFormatter", "Logging", "TOML"]
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## Summary

**ResearchSoftwareMetadata** is a [Julia](http://www.julialang.org) package that
provides functionality for to allow a crosswalk between Project.toml, codemeta.json, .zenodo.json and the package LICENSE file to allow a consistent way of providing metadata for research software which allows the Julia General Registry to pick up the same metadata as GitHub and Zenodo while following the Research Software MetaData [guidelines](https://fair-impact.github.io/RSMD-guidelines/).
provides a crosswalk between `Project.toml`, `codemeta.json`, `.zenodo.json` and the package `LICENSE` file, giving a consistent way of providing metadata for research software, so that the Julia General Registry, GitHub and Zenodo all pick up the same metadata, following the Research Software MetaData [guidelines](https://fair-impact.github.io/RSMD-guidelines/).

## Installation

Expand All @@ -21,7 +21,7 @@ built and installed with `add`. For example:
(@v1.12) pkg> add ResearchSoftwareMetadata
Resolving package versions...
Updating `~/.julia/environments/v1.12/Project.toml`
[aea672f4] + ResearchSoftwareMetadata v0.2.0
[58378933] + ResearchSoftwareMetadata v0.3.0
Updating `~/.julia/environments/v1.12/Manifest.toml`

(@v1.12) pkg>
Expand All @@ -37,23 +37,26 @@ To capture the license you are using and propagate it throughout the metadata f
license = "BSD-2-Clause"
```

To supplement the metadata on the authors of the package, add the [ORCID](https://orcid.org) for each author and the [ROR](https://ror.org) for the organisation(s) they are affiliated with. You can add as many authors and as much or as little information as you like about each one by adding additional `[[author_details]]` blocks.
All of the other metadata that this package uses lives in a single `[rsmd]` table. To supplement the metadata on the authors of the package, add the [ORCID](https://orcid.org) for each author and the [ROR](https://ror.org) for the organisation(s) they are affiliated with. You can add as many authors and as much or as little information as you like about each one by adding additional `[[rsmd.author_details]]` blocks.

```toml
[[author_details]]
name = "Richard Reeve"
orcid = "0000-0003-2589-8091"
[rsmd]

[[author_details.affiliation]]
ror = "00vtgdb53"
[[rsmd.author_details]]
name = "Richard Reeve"
orcid = "0000-0003-2589-8091"

[[rsmd.author_details.affiliation]]
ror = "00vtgdb53"
```

You can also optionally add a `description` of the package, `keywords` associated with it, the software `category` it belongs to, its [repostatus.org](https://www.repostatus.org) `development_status`, and the DOIs of any `publications` associated with the package. All of these are propagated into `codemeta.json` and `.zenodo.json`, and any values already in `codemeta.json` but missing from `Project.toml` will be backfilled into it:
You can also optionally add a `description` of the package, `keywords` associated with it, the software `category` it belongs to, its [repostatus.org](https://www.repostatus.org) `development_status`, and the DOIs of any `publications` associated with the package. All of these are propagated into `codemeta.json` and `.zenodo.json`, and any values already in `codemeta.json` but missing from `Project.toml` will be backfilled into it. Any of these keys found at the top level of `Project.toml` (the old layout) are automatically migrated into `[rsmd]`:

```toml
description = "A package that does things"
[rsmd]
keywords = ["julia", "metadata"]
category = "metadata"
description = "A package that does things"
development_status = "active"
publications = ["10.5281/zenodo.12789179"]
```
Expand All @@ -72,7 +75,7 @@ using ResearchSoftwareMetadata
ResearchSoftwareMetadata.crosswalk()
```

If you want to add in some additional metadata (the `category` of the software, or the `keywords` associated with it, or you want to increase the package version during the crosswalk, this is possible as follows:
If you want to pass in some additional metadata (the `category` of the software, or the `keywords` associated with it, both of which are written back into `[rsmd]` in `Project.toml`), or you want to increase the package version during the crosswalk, you can do that as follows:

```julia
# Add in additional metadata
Expand All @@ -93,3 +96,7 @@ using JuliaFormatter
using MyPackage
format(MyPackage)
```

## Automated checking

You can also make your package's own test suite check automatically that the metadata crosswalk is clean and the code is well formatted, by copying a few files from this package's `test/` directory into your own. See [Automated package checks](https://boydorr.github.io/ResearchSoftwareMetadata.jl/stable/testing/) in the documentation for instructions.
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"Linux",
"macOS"
],
"version": "v0.2.0",
"version": "v0.3.0",
"dateModified": "2026-07-09",
"datePublished": "2024-07-18",
"downloadUrl": "https://github.com/boydorr/ResearchSoftwareMetadata.jl/archive/refs/tags/v0.2.0.tar.gz",
"license": "https://spdx.org/licenses/BSD-2-Clause",
"downloadUrl": "https://github.com/boydorr/ResearchSoftwareMetadata.jl/archive/refs/tags/v0.3.0.tar.gz",
"license": "https://spdx.org/licenses/MIT",
"author": [
{
"type": "Person",
Expand Down
9 changes: 5 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-License-Identifier: MIT

using Pkg
"ResearchSoftwareMetadata" ∈ [p.name for p in values(Pkg.dependencies())] &&
Expand All @@ -18,9 +18,10 @@ makedocs(;
format = Documenter.HTML(;
canonical = "https://boydorr.github.io/ResearchSoftwareMetadata.jl",
edit_link = "main",
assets = String[],),
pages = ["Home" => "index.md"],)
assets = String[]),
pages = ["Home" => "index.md",
"Automated package checks" => "testing.md"])

deploydocs(;
repo = "github.com/boydorr/ResearchSoftwareMetadata.jl",
devbranch = "main",)
devbranch = "main")
2 changes: 1 addition & 1 deletion docs/metadata.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-License-Identifier: MIT

using Pkg

Expand Down
54 changes: 35 additions & 19 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ Documentation for [ResearchSoftwareMetadata](https://github.com/boydorr/Research
## Summary

**ResearchSoftwareMetadata** is a [Julia](http://www.julialang.org) package that
provides functionality for to allow a crosswalk between Project.toml, codemeta.json, .zenodo.json and the package LICENSE file to allow a consistent way of providing metadata for research software which allows the Julia General Registry to pick up the same metadata as GitHub and Zenodo while following the Research Software MetaData [guidelines](https://fair-impact.github.io/RSMD-guidelines/).
provides a crosswalk between `Project.toml`, `codemeta.json`, `.zenodo.json` and the package `LICENSE` file, giving a consistent way of providing metadata for research software, so that the Julia General Registry, GitHub and Zenodo all pick up the same metadata, following the Research Software MetaData [guidelines](https://fair-impact.github.io/RSMD-guidelines/).

## Installation

The package is registered in the `General` registry so can be
built and installed with `add`. For example:

```julia
(@v1.10) pkg> add ResearchSoftwareMetadata
(@v1.12) pkg> add ResearchSoftwareMetadata
Resolving package versions...
Updating `~/.julia/environments/v1.10/Project.toml`
[aea672f4] + ResearchSoftwareMetadata v0.1.0
Updating `~/.julia/environments/v1.10/Manifest.toml`
Updating `~/.julia/environments/v1.12/Project.toml`
[58378933] + ResearchSoftwareMetadata v0.3.0
Updating `~/.julia/environments/v1.12/Manifest.toml`

(@v1.10) pkg>
(@v1.12) pkg>
```

## Usage
Expand All @@ -33,19 +33,31 @@ First you need to add a small amount of additional metadata into your `Project.t
To capture the license you are using and propagate it throughout the metadata files and through your julia code, add an [SPDX license identifier](https://spdx.org/licenses/) to the file:

```toml
[license]
SPDX = "BSD-2-Clause"
license = "BSD-2-Clause"
```

To supplement the metadata on the authors of the package, add the [ORCID](https://orcid.org) for each author and the [ROR](https://ror.org) for the organisation(s) they are affiliated with. You can add as many authors and as much or as little information as you like about each one by adding additional `[[author_details]]` blocks.
All of the other metadata that this package uses lives in a single `[rsmd]` table. To supplement the metadata on the authors of the package, add the [ORCID](https://orcid.org) for each author and the [ROR](https://ror.org) for the organisation(s) they are affiliated with. You can add as many authors and as much or as little information as you like about each one by adding additional `[[rsmd.author_details]]` blocks.

```toml
[[author_details]]
name = "Richard Reeve"
orcid = "0000-0003-2589-8091"
[rsmd]

[[author_details.affiliation]]
ror = "00vtgdb53"
[[rsmd.author_details]]
name = "Richard Reeve"
orcid = "0000-0003-2589-8091"

[[rsmd.author_details.affiliation]]
ror = "00vtgdb53"
```

You can also optionally add a `description` of the package, `keywords` associated with it, the software `category` it belongs to, its [repostatus.org](https://www.repostatus.org) `development_status`, and the DOIs of any `publications` associated with the package. All of these are propagated into `codemeta.json` and `.zenodo.json`, and any values already in `codemeta.json` but missing from `Project.toml` will be backfilled into it. Any of these keys found at the top level of `Project.toml` (the old layout) are automatically migrated into `[rsmd]`:

```toml
[rsmd]
keywords = ["julia", "metadata"]
category = "metadata"
description = "A package that does things"
development_status = "active"
publications = ["10.5281/zenodo.12789179"]
```

Then, from the root of your package, you can just run a crosswalk:
Expand All @@ -63,19 +75,19 @@ ResearchSoftwareMetadata.crosswalk()
```


If you want to add in some additional metadata (the `category` of the software, or the `keywords` associated with it, or you want to increase the package version during the crosswalk, this is possible as follows:
If you want to pass in some additional metadata (the `category` of the software, or the `keywords` associated with it, both of which are written back into `[rsmd]` in `Project.toml`), or you want to increase the package version during the crosswalk, you can do that as follows:

```julia
# Add in additional metadata
ResearchSoftwareMetadata.crosswalk(category = "ecology", keywords = ["julia", "metadata", "research software", "RSMD"])
ResearchSoftwareMetadata.crosswalk(category = "metadata", keywords = ["julia", "metadata", "research software", "RSMD"])

# Increase version number during crosswalk
ResearchSoftwareMetadata.increase_patch() # Bump patch version (e.g. 0.4.1 -> 0.4.2)
ResearchSoftwareMetadata.increase_minor() # Bump minor version (e.g. 0.4.1 -> 0.5.0)
ResearchSoftwareMetadata.increase_major() # Bump major version (e.g. 0.4.1 -> 1.0.0)
ResearchSoftwareMetadata.increase_minor() # Bump minor version (e.g. 0.4.2 -> 0.5.0)
ResearchSoftwareMetadata.increase_major() # Bump major version (e.g. 0.5.0 -> 1.0.0)
```

You might also consider reformatting all of your julia code to a consistent format. A `.JuliaJormatter.toml` file in the package root defines what the formatting standard should be.
You might also consider reformatting all of your julia code to a consistent format. A `.JuliaFormatter.toml` file in the package root defines what the formatting standard should be.

```julia
Pkg.add("JuliaFormatter")
Expand All @@ -85,6 +97,10 @@ using MyPackage
format(MyPackage)
```

## Automated checking

You can also make your package's own test suite check automatically that the metadata crosswalk is clean and the code is well formatted, by copying a few files from this package's `test/` directory into your own. See [Automated package checks](testing.md) for instructions.

## Reference guide

```@index
Expand Down
Loading
Loading