Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 22:03
· 33 commits to main since this release
v0.2.0
0847ad9

To upgrade from 0.1.0:

  • citesync check has five new error rules: contributor-mismatch, date-mismatch, swhid-mismatch, zenodo-license-list and file-missing. To turn any of them off for now, list it under ignore (docs/rules.md).
  • codemeta-version no longer defaults to 3.0. To keep checking codemeta.json's @context as before, set codemeta-version = "3.0".
  • Use citesync through its command line or the pre-commit hook. Its Python modules are internal and may change in any release.
  • write-manifests takes only version, author, contributor, license, codeRepository and keywords, the fields a manifest holds. Take any other field off the list.
  • The text output changed: each finding starts with file:line:col and has a help: line under it, a failing check ends with an N fixable line, and citesync write ends with N fixed, M left in K files. In GitHub output, each annotation ends with its help: line and the ::notice:: line gives write's new count, so scripts should read --format json instead (docs/output.md).

Added

  • citesync init writes a CITATION.cff from codemeta.json, .zenodo.json and the package manifests when a repo has none. It passes citesync check when those files already agree, and citesync write fixes the rest (docs/init.md).
  • Contributors are compared across codemeta.json, .zenodo.json and package.json, the same way as authors (contributor-mismatch).
  • Release dates are compared across CITATION.cff, codemeta.json and .zenodo.json (date-mismatch).
  • Software Heritage identifiers (SWHIDs) are compared across CITATION.cff, codemeta.json and .zenodo.json, and citesync write fixes them (swhid-mismatch, docs/check.md).
  • version-behind-tag warns when the source's version is older than the repo's newest git tag.
  • --format sarif prints a SARIF log that GitHub code scanning can upload.
  • citesync write creates codemeta.json when the files setting lists it and it doesn't exist yet.
  • citesync --help lists the exit codes and where config is read from. citesync with no command prints the help.
  • Two rules for repos where Zenodo reads CITATION.cff: zenodo-license-list and zenodo-drops-field.
  • A keyword that differs from another file's only in hyphens, underscores or spaces is named as such, and citesync write gives it the source's spelling. keywords-ignore-separators = true treats such keywords as equal.
  • A failing citesync check says how many findings citesync write would fix, and citesync write how many it fixed and left (docs/check.md).
  • -v names each manifest check left out, and why (manifest-skipped). citesync config prints the repo root in use.
  • --color auto|always|never sets colour whatever NO_COLOR and FORCE_COLOR say, and -V is short for --version.
  • Each finding on a key gives the key's line and column, so an editor or code scanning can jump to it (docs/output.md).
  • A mistyped rule id, --format value or write-manifests field gets a "did you mean" suggestion. On Python before 3.14, option values get none.

Changed

  • Breaking: codemeta-version has no default. When it's unset, any CodeMeta version passes and citesync write leaves @context alone.
  • Breaking: a file listed in the files setting that doesn't exist is a file-missing error. 0.1.0 skipped it.
  • The field mapping comes from codemeta-drift 0.3.0, which adds contributors, release dates and SWHIDs.
  • citesync check starts about a third faster.
  • Breaking: write-manifests = "all" means the six manifest fields, and naming any other field is a config error.
  • A keyword finding between citation files lists the missing and extra words, not both files' lists.
  • A missing source file names the directory citesync looked in. Run outside any citation files, citesync uses the git root, and --root must be a directory.
  • A bad ignore entry is named in the error, and an unquoted codemeta-version = 3.0 says to write it as a string (docs/config.md).
  • The warning about an unused ignore entry is quiet under -q.

Fixed

  • citesync write dropped an author's ORCID when the source renamed them and had no ORCID for them. It now leaves that file's authors for you to edit (docs/write.md).
  • citesync write wrote a CITATION.cff entity (an author with only a name) to codemeta.json as a Person. It's now an Organization.
  • citesync write reformatted the existing entries of a JSON author list when it added an author.
  • python -m citesync failed with "No module named citesync.__main__".
  • With doi: "" in CITATION.cff, the DOI under identifiers was ignored.
  • codemeta.json entries written with type and id instead of @type and @id were ignored.
  • A name in one string, such as codemeta.json name, written family name first (Tu Youyou, 屠呦呦) was an author-mismatch against CITATION.cff's given and family names, and citesync write rewrote it.
  • A title with an accent typed two different ways didn't match itself.
  • citesync write folded an author's name-particle and name-suffix into family-names when it changed the given name.
  • GitHub annotations didn't attach to their files when the root was a subdirectory of the git repo.
  • codemeta.json keywords given as one string weren't split on full-width (,) or ideographic (、) commas.
  • A manifest or .zenodo.json that starts with a byte order mark gave a confusing parser error.
  • A file behind a symlink that points out of the repo was read, and write could change it. It's now unreadable.
  • Control characters in a file could retitle the terminal or hide lines. They now print as \xNN.
  • Printing non-ASCII text to a stdout that isn't UTF-8, such as a Windows pipe, crashed.
  • Some inputs made citesync check run for minutes, such as an author string with a long run of spaces or a keyword list thousands long.
  • A repository URL with whitespace before a trailing slash, such as https://example.org/r /, kept that whitespace when read.
  • citesync write dropped the comments above a --- line at the top of CITATION.cff.
  • An author with an ORCID and no name was written to pyproject.toml, Cargo.toml or package.json as an empty entry, one more on each run. citesync write now leaves that list for a hand edit and says why.
  • citesync write turned every line end of a file with both LF and CRLF line ends into CRLF, even when it changed nothing else. It now keeps the more common one (docs/write.md).