Repository navigation
Releases: simonvanlierde/citesync
Releases · simonvanlierde/citesync
Release list
v0.3.0
Added
- Generate citation files in the browser playground from an existing metadata file or basic project details, with live previews, input detection and editable author names. Export CITATION.cff, CodeMeta, Zenodo metadata, BibTeX and CSL-JSON; Python, Rust and npm outputs are labelled as incomplete package templates (guide).
- Import Python PKG-INFO/METADATA, R DESCRIPTION and Julia Project.toml/JuliaProject.toml in the CLI and playground without executing package code. Imported files remain read-only; unsupported or omitted values are reported (supported files).
- Create a missing .zenodo.json with
citesync writewhenfileslists it. Setzenodo-contributor-typeto supply a default for new contributors; existing types are preserved (configuration, writing). - Use the contribution handoff guide for linked CodeMeta people and roles from CRediT Matrix, and the Pandoc guide for software citations from CSL-JSON or BibTeX.
- A Matrix consumer check runs the published Credit Matrix 0.10.0 CLI through citesync write/check, including linked roles, local identities and explicit Zenodo contributor types.
Changed
- The field mapping uses codemeta-drift 0.4.0, with original crosswalk cells and its schema 1.3 contract. Field paths remain unchanged.
- The playground uses larger text for file previews, code snippets, hints and footer links.
Fixed
- CodeMeta person identifiers that are not ORCIDs no longer overwrite ORCIDs in other files. Writes preserve these identifiers and refuse to remove a person if that would discard them. Both
id/@idandtype/@typespellings are supported (contribution guide). citesync writepreserves a byte order mark at the start of CITATION.cff (writing).
v0.2.0
To upgrade from 0.1.0:
citesync checkhas five new error rules:contributor-mismatch,date-mismatch,swhid-mismatch,zenodo-license-listandfile-missing. To turn any of them off for now, list it underignore(docs/rules.md).codemeta-versionno longer defaults to 3.0. To keep checking codemeta.json's@contextas before, setcodemeta-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-manifeststakes onlyversion,author,contributor,license,codeRepositoryandkeywords, the fields a manifest holds. Take any other field off the list.- The text output changed: each finding starts with
file:line:coland has ahelp:line under it, a failing check ends with anN fixableline, andcitesync writeends withN fixed, M left in K files. In GitHub output, each annotation ends with itshelp:line and the::notice::line gives write's new count, so scripts should read--format jsoninstead (docs/output.md).
Added
citesync initwrites a CITATION.cff from codemeta.json, .zenodo.json and the package manifests when a repo has none. It passescitesync checkwhen those files already agree, andcitesync writefixes 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 writefixes them (swhid-mismatch, docs/check.md). version-behind-tagwarns when the source's version is older than the repo's newest git tag.--format sarifprints a SARIF log that GitHub code scanning can upload.citesync writecreates codemeta.json when thefilessetting lists it and it doesn't exist yet.citesync --helplists the exit codes and where config is read from.citesyncwith no command prints the help.- Two rules for repos where Zenodo reads CITATION.cff:
zenodo-license-listandzenodo-drops-field. - A keyword that differs from another file's only in hyphens, underscores or spaces is named as such, and
citesync writegives it the source's spelling.keywords-ignore-separators = truetreats such keywords as equal. - A failing
citesync checksays how many findingscitesync writewould fix, andcitesync writehow many it fixed and left (docs/check.md). -vnames each manifest check left out, and why (manifest-skipped).citesync configprints the repo root in use.--color auto|always|neversets colour whateverNO_COLORandFORCE_COLORsay, and-Vis 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,
--formatvalue orwrite-manifestsfield gets a "did you mean" suggestion. On Python before 3.14, option values get none.
Changed
- Breaking:
codemeta-versionhas no default. When it's unset, any CodeMeta version passes andcitesync writeleaves@contextalone. - Breaking: a file listed in the
filessetting that doesn't exist is afile-missingerror. 0.1.0 skipped it. - The field mapping comes from codemeta-drift 0.3.0, which adds contributors, release dates and SWHIDs.
citesync checkstarts 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
--rootmust be a directory. - A bad
ignoreentry is named in the error, and an unquotedcodemeta-version = 3.0says to write it as a string (docs/config.md). - The warning about an unused
ignoreentry is quiet under-q.
Fixed
citesync writedropped 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 writewrote a CITATION.cff entity (an author with only a name) to codemeta.json as aPerson. It's now anOrganization.citesync writereformatted the existing entries of a JSON author list when it added an author.python -m citesyncfailed with "No module namedcitesync.__main__".- With
doi: ""in CITATION.cff, the DOI underidentifierswas ignored. - codemeta.json entries written with
typeandidinstead of@typeand@idwere ignored. - A name in one string, such as codemeta.json
name, written family name first (Tu Youyou,屠呦呦) was anauthor-mismatchagainst CITATION.cff's given and family names, andcitesync writerewrote it. - A title with an accent typed two different ways didn't match itself.
citesync writefolded an author'sname-particleandname-suffixintofamily-nameswhen 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
writecould change it. It's nowunreadable. - 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 checkrun 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 writedropped 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 writenow leaves that list for a hand edit and says why. citesync writeturned 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).
v0.1.0
Added
citesync check: compares title/name, version, authors with ORCID, licence, DOI, repository URL, description and keywords across CITATION.cff, codemeta.json, .zenodo.json, pyproject.toml, Cargo.toml and package.json, with any of them as the source. Exit 0 when they agree, 1 on an error finding, 2 when citesync couldn't run (a bad config or option, a missing source file, an internal error).- Each finding names its rule, such as
version-mismatchorkeywords-not-subset, and has a severity.citesync ruleslists the rules andcitesync explain <rule>describes one; docs/rules.md has them all. - A file citesync can't read or parse is an
unreadablefinding, with the parser's line and column when it gives them, and the other files are still checked against each other. - Output as text, JSON (
--format jsonor--json) or GitHub workflow annotations (--format github). Text is coloured on a terminal (NO_COLORandFORCE_COLORare honoured) and ends with a summary line;--quietprints only errors. JSON is one document with aversion, the tool, a summary and the findings, each with its rule, severity, help, a link to the rule's docs and its position when known. GitHub output ends with a notice that counts the findings. JSON always lists every finding, whatever-qor-vsay. - A JSON compatibility policy: a minor release may add rule ids and optional fields, so ignore what you don't know; removing or retyping a field bumps the report's
version, in a major release. citesync --version.- Without
--root, citesync walks up from the current directory to the nearest directory with a citation file or a citesync config, stopping at the git root. - A
role-danglingwarning for a CodeMetaRolein codemeta.json'sauthororcontributorlist, such as a CRediT role from credit-matrix, whoseschema:authorORCID no listed person has.writekeeps Roles as they are. - A pre-commit hook,
citesync, for prek or pre-commit. It runscitesync checkwhen a commit changes a citation file, a package manifest or citesync's config, at any depth, and fails the commit on an error finding. - A manual-stage hook,
citesync-write, that runscitesync writewhen you ask for it. ignorein the config drops the findings of the rules it lists, and warns about an entry that matched nothing.citesync config, and config discovery fromcitesync.toml,.citesync.toml, pyproject.toml, Cargo.toml or package.json. Config keys are kebab-case, such ascodemeta-version.- The field mapping, vendored from codemeta-drift 0.1.0 with its JSON Schema.
- An author with only a name, such as an organization, compares as a family name in CITATION.cff, codemeta.json and .zenodo.json, and write keeps it.
- Keywords compare case-insensitively, as author names do, so
LCAmatcheslca. Setkeywords-case-sensitive = truein the config to compare them by case. codemeta.json may give them as one comma-separated string, as schema.org allows. - Repository URLs compare by the repository they name:
http://www.github.com/Owner/Repo/tree/v1.0matcheshttps://github.com/owner/repo. Branch, tag and file pages count on GitHub, GitLab, Codeberg, Gitea and Bitbucket; paths ignore case on GitHub only. Findings show the URLs as written. - A codemeta.json
identifiergiven as a schema.org PropertyValue is read as a DOI when itspropertyIDisDOIor itsvalueorurlis a DOI. Other PropertyValues, such as a SWHID or a ROR id, are skipped. - Versions compare as PEP 440 versions, so
v1.2.3matches1.2.3,1.0matches1.0.0and0.3.1-rc.1matches0.3.1rc1. A version that isn't PEP 440, such asunreleased, must match exactly. citesync write: rewrites the citation files that disagree with the source, and the manifest fields listed inwrite-manifests, keeping comments, key order, formatting and CRLF line ends, and writing through symlinks. Fields a file leaves out stay out. A value a file can't hold without losing something is left for you, with the reason: a compound licence in .zenodo.json, anANDlicence in CITATION.cff or codemeta.json, a version semver can't spell in Cargo.toml or package.json, a version that isn't PEP 440 in pyproject.toml, or a renamed author whose old entry holds an email or affiliation. It reports the findings left ascheckdoes, each saying what to do, and never writes an ignored finding or an unreadable file. Exit 0 when the files agree afterwards, 1 when an error finding remains, 2 when it couldn't run and wrote nothing.citesync write --diffprints the edits write would make as a unified diff and writes nothing. Exit 0 when there is nothing to change, 1 when there is or when a file can't be read (listed on stderr), asruff format --diffdoes.