Skip to content

Commit

Permalink
Fixing error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Jul 17, 2024
1 parent 82d1684 commit c51d002
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ResearchSoftwareMetadata

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://richardreeve.github.io/ResearchSoftwareMetadata.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://richardreeve.github.io/ResearchSoftwareMetadata.jl/dev/)
[![Build Status](https://github.com/richardreeve/ResearchSoftwareMetadata.jl/actions/workflows/testing.yaml/badge.svg?branch=main)](https://github.com/richardreeve/ResearchSoftwareMetadata.jl/actions/workflows/testing.yaml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/richardreeve/ResearchSoftwareMetadata.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/richardreeve/ResearchSoftwareMetadata.jl)
[![PkgEval](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/R/ResearchSoftwareMetadata.svg)](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/R/ResearchSoftwareMetadata.html)
Expand Down Expand Up @@ -30,7 +31,7 @@ built and installed with `add`. For example:

First you need to add a small amount of additional metadata into your `Project.toml` file.

To capture the license you are using and propagate it throughout the metadata files and through your julia code, add an [SPDX identifier](https://spdx.org/licenses/) to the file:
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]
Expand Down
6 changes: 5 additions & 1 deletion src/ResearchSoftwareMetadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ function crosswalk(; category = nothing, keywords = nothing, build = false, upda
cm_platforms = sort(string.(get(codemeta, "operatingSystem", String[])))
if length(platforms) length(cm_platforms) ||
any(platforms .≠ cm_platforms)
@error "codemeta platforms do not match workflows ($cm_platforms$platforms), fixing"
if isempty(cm_platforms)
@info "No platform info in codemeta.json, so filling from workflows ($platforms)"
else
@error "codemeta platforms do not match workflows ($cm_platforms$platforms), fixing"
end
codemeta["operatingSystem"] = platforms
end

Expand Down

0 comments on commit c51d002

Please sign in to comment.