citesync 0.5.0__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {citesync-0.5.0 → citesync-0.7.0}/PKG-INFO +36 -18
- {citesync-0.5.0 → citesync-0.7.0}/README.md +33 -16
- {citesync-0.5.0 → citesync-0.7.0}/pyproject.toml +50 -8
- {citesync-0.5.0 → citesync-0.7.0}/pyproject.toml.orig +70 -28
- citesync-0.7.0/src/citesync/MAPPING_SOURCE +7 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/check.py +133 -11
- citesync-0.7.0/src/citesync/cite.py +95 -0
- citesync-0.7.0/src/citesync/cite_evidence.py +112 -0
- citesync-0.7.0/src/citesync/cite_http.py +200 -0
- citesync-0.7.0/src/citesync/cite_sources.py +463 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/cli.py +213 -49
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/codecs.py +22 -4
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/config.py +140 -9
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/export.py +93 -23
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/formats.py +186 -20
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/jsonsplice.py +26 -1
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/mapping-4.0.json +4259 -2525
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/mapping-local.json +4119 -2387
- citesync-0.7.0/src/citesync/mapping-vectors.json +2060 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/mapping.py +12 -5
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/mapping.schema.json +6 -2
- citesync-0.7.0/src/citesync/maven.py +104 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/playground.py +10 -3
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/positions.py +6 -2
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/rules.py +22 -1
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/write.py +254 -39
- citesync-0.5.0/src/citesync/MAPPING_SOURCE +0 -7
- citesync-0.5.0/src/citesync/mapping-vectors.json +0 -1358
- {citesync-0.5.0 → citesync-0.7.0}/LICENSE +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/NOTICE +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/__init__.py +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/__main__.py +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/core_metadata.py +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/errors.py +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/playground_exports.py +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/py.typed +0 -0
- {citesync-0.5.0 → citesync-0.7.0}/src/citesync/research_metadata.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: citesync
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Generate and synchronize software citation files from package metadata. CLI, pre-commit hook and browser playground.
|
|
5
5
|
Keywords: citation,CITATION.cff,codemeta,zenodo,software-metadata,pre-commit
|
|
6
6
|
Author: Simon van Lierde
|
|
@@ -22,9 +22,10 @@ Requires-Dist: ruamel-yaml>=0.19
|
|
|
22
22
|
Requires-Dist: tomlkit>=0.15.2
|
|
23
23
|
Requires-Python: >=3.13
|
|
24
24
|
Project-URL: Homepage, https://simonvanlierde.com/citesync/
|
|
25
|
+
Project-URL: Documentation, https://simonvanlierde.com/citesync/docs/
|
|
25
26
|
Project-URL: Source, https://github.com/simonvanlierde/citesync
|
|
26
27
|
Project-URL: Issues, https://github.com/simonvanlierde/citesync/issues
|
|
27
|
-
Project-URL: Changelog, https://
|
|
28
|
+
Project-URL: Changelog, https://simonvanlierde.com/citesync/docs/changelog/
|
|
28
29
|
Description-Content-Type: text/markdown
|
|
29
30
|
|
|
30
31
|
# citesync
|
|
@@ -39,7 +40,7 @@ Description-Content-Type: text/markdown
|
|
|
39
40
|
|
|
40
41
|
Status: experimental. It may change in ways that break your code, without notice.
|
|
41
42
|
|
|
42
|
-
Questions and bugs: see [
|
|
43
|
+
Questions and bugs: see [contributing guide](.github/CONTRIBUTING.md).
|
|
43
44
|
|
|
44
45
|
Generate software citation files from package metadata, then keep them in sync across CITATION.cff, codemeta.json, .zenodo.json and package manifests, including [Typst and Quarto plugin manifests](docs/formats.md#plugin-manifests). Use the CLI, a pre-commit hook or the [browser playground](https://simonvanlierde.com/citesync/). Field mappings come from CodeMeta's crosswalks, as exported by [codemeta-drift](https://github.com/simonvanlierde/codemeta-drift).
|
|
45
46
|
|
|
@@ -55,6 +56,7 @@ citesync write --diff # print what write would change, and change
|
|
|
55
56
|
citesync write # rewrite the other files to agree with the source
|
|
56
57
|
citesync init # write a CITATION.cff from codemeta.json, .zenodo.json and the manifests
|
|
57
58
|
citesync export --format apa # print a citation: apa, bibtex, csl-json, jsonld, datacite, ris, endnote, cff, codemeta or zenodo
|
|
59
|
+
citesync cite 10.7717/peerj.4375 --format ris # resolve public metadata and print a citation
|
|
58
60
|
citesync explain version-mismatch # what a rule checks and how to fix it
|
|
59
61
|
citesync config # the config in use, and the file it came from
|
|
60
62
|
```
|
|
@@ -68,22 +70,25 @@ codemeta.json:3:3: error[version-mismatch] version: '2.0.0', CITATION.cff has '1
|
|
|
68
70
|
|
|
69
71
|
A config is optional. A one-line `citesync.toml` is `ignore = ["description-mismatch"]`.
|
|
70
72
|
|
|
71
|
-
`citesync --help` lists every command and option.
|
|
73
|
+
`citesync --help` lists every command and option. Read the [documentation](https://simonvanlierde.com/citesync/docs/):
|
|
72
74
|
|
|
73
|
-
- [How check works](https://
|
|
74
|
-
- [How write works](https://
|
|
75
|
-
- [Supported files](https://
|
|
76
|
-
- [How init works](https://
|
|
77
|
-
- [
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
80
|
-
- [
|
|
81
|
-
- [
|
|
82
|
-
- [
|
|
75
|
+
- [How check works](https://simonvanlierde.com/citesync/docs/check/): the fields, files, options and exit codes.
|
|
76
|
+
- [How write works](https://simonvanlierde.com/citesync/docs/write/): what it changes and what it leaves alone.
|
|
77
|
+
- [Supported files](https://simonvanlierde.com/citesync/docs/formats/): which files citesync reads, updates and creates, including read-only Python distribution, R, Julia, Composer and Maven metadata, and the RO-Crate and Croissant files sourceledger makes.
|
|
78
|
+
- [How init works](https://simonvanlierde.com/citesync/docs/init/): where a new CITATION.cff takes each field from.
|
|
79
|
+
- [Cite a DOI, arXiv ID or GitHub repository](https://simonvanlierde.com/citesync/docs/cite/): print its citation, or save the provider responses to replay offline.
|
|
80
|
+
- [Citation exports](https://simonvanlierde.com/citesync/docs/export/): BibTeX, CSL-JSON, APA, schema.org JSON-LD, DataCite XML, RIS and EndNote files kept in step with the source.
|
|
81
|
+
- [Rules](https://simonvanlierde.com/citesync/docs/rules/): each rule id, what it checks and how to fix it.
|
|
82
|
+
- [Configuration](https://simonvanlierde.com/citesync/docs/config/): where config goes, and every key.
|
|
83
|
+
- [Use citation exports with Pandoc](https://simonvanlierde.com/citesync/docs/pandoc/): cite software from the CSL-JSON or BibTeX files `citesync export` or the playground makes.
|
|
84
|
+
- [Output formats](https://simonvanlierde.com/citesync/docs/output/): JSON, GitHub annotations and SARIF.
|
|
85
|
+
- [Tested on real repositories](https://simonvanlierde.com/citesync/docs/tested-repositories/): what citesync reports on five public repositories.
|
|
86
|
+
|
|
87
|
+
See [Architecture and security](https://simonvanlierde.com/citesync/docs/assurance/) and [release verification](https://simonvanlierde.com/citesync/docs/getting-started/#verify-a-release-download).
|
|
83
88
|
|
|
84
89
|
## Browser playground
|
|
85
90
|
|
|
86
|
-
Generate citation files from existing metadata or basic project details, without installing Python. [Open the playground](https://simonvanlierde.com/citesync/) or [
|
|
91
|
+
Generate citation files from existing metadata or basic project details, without installing Python. [Open the playground](https://simonvanlierde.com/citesync/) or [read the playground guide](playground/README.md). Files are processed in the browser; downloading the converter requires a network connection.
|
|
87
92
|
|
|
88
93
|
## Pre-commit hook
|
|
89
94
|
|
|
@@ -92,13 +97,26 @@ For [prek](https://prek.j178.dev) or [pre-commit](https://pre-commit.com), in `.
|
|
|
92
97
|
```yaml
|
|
93
98
|
repos:
|
|
94
99
|
- repo: https://github.com/simonvanlierde/citesync
|
|
95
|
-
rev: v0.
|
|
100
|
+
rev: v0.7.0
|
|
96
101
|
hooks:
|
|
97
102
|
- id: citesync
|
|
98
103
|
- id: citesync-write
|
|
99
104
|
```
|
|
100
105
|
|
|
101
|
-
The `citesync` hook runs when a commit changes a supported metadata file, a citesync config or a file with an export suffix (`.bib`, `.csl.json`, `.apa.txt`, `.jsonld`, `.datacite.xml`, `.ris`, `.enw`), at any depth. It checks every file, not only the staged ones, and fails the commit on an error finding (exit 1) or when citesync can't run (exit 3), such as on a bad config. The [exit codes](https://
|
|
106
|
+
The `citesync` hook runs when a commit changes a supported metadata file, a citesync config or a file with an export suffix (`.bib`, `.csl.json`, `.apa.txt`, `.jsonld`, `.datacite.xml`, `.ris`, `.enw`), at any depth. It checks every file, not only the staged ones, and fails the commit on an error finding (exit 1) or when citesync can't run (exit 3), such as on a bad config. The [exit codes](https://simonvanlierde.com/citesync/docs/check/#findings-and-exit-codes) are the same as on the command line. The `citesync-write` hook runs only when you ask for it: `prek run citesync-write --stage manual --all-files`. Both hooks need Python 3.13 or newer.
|
|
107
|
+
|
|
108
|
+
For a dataset file with a custom name, set `always_run: true` on each citesync hook. This checks all configured paths on every commit or manual run, even when the default filename filter would skip the changed file.
|
|
109
|
+
|
|
110
|
+
## Social card
|
|
111
|
+
|
|
112
|
+
[`playground/og.png`](playground/og.png) is the 1200x630 card shown when the link is shared. It is rendered from
|
|
113
|
+
[`docs/og-card.html`](docs/og-card.html), whose example is `tests/fixtures/synthetic-agree/pyproject.toml` run through `citesync init`. Edit the HTML, then from the repo root:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
just og-card
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Both builds use the same card. The site includes its image hash so sharing services fetch the current version.
|
|
102
120
|
|
|
103
121
|
## Development
|
|
104
122
|
|
|
@@ -121,7 +139,7 @@ just hooks # the git hooks, as the checks workflow runs them
|
|
|
121
139
|
|
|
122
140
|
`just mutation` mutation-tests the modules `only_mutate` lists under `[tool.mutmut]` in `pyproject.toml`. CI runs it weekly, on Mondays ([`mutation.yml`](.github/workflows/mutation.yml)). It fails when the tests miss a change that `tests/mutation-baseline.txt` doesn't list. A change that can't alter behaviour goes in that file, with the reason. It also fails when the tests now catch a listed change, so drop that line.
|
|
123
141
|
|
|
124
|
-
uv locks only releases at least a week old.
|
|
142
|
+
uv locks only releases at least a week old. For a newer security fix, pin the source archive at an exact commit, then return to the registry version after a week ([how](https://github.com/simonvanlierde/project-templates/blob/main/docs/tooling.md#dependencies)).
|
|
125
143
|
|
|
126
144
|
## Licence
|
|
127
145
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
Status: experimental. It may change in ways that break your code, without notice.
|
|
12
12
|
|
|
13
|
-
Questions and bugs: see [
|
|
13
|
+
Questions and bugs: see [contributing guide](.github/CONTRIBUTING.md).
|
|
14
14
|
|
|
15
15
|
Generate software citation files from package metadata, then keep them in sync across CITATION.cff, codemeta.json, .zenodo.json and package manifests, including [Typst and Quarto plugin manifests](docs/formats.md#plugin-manifests). Use the CLI, a pre-commit hook or the [browser playground](https://simonvanlierde.com/citesync/). Field mappings come from CodeMeta's crosswalks, as exported by [codemeta-drift](https://github.com/simonvanlierde/codemeta-drift).
|
|
16
16
|
|
|
@@ -26,6 +26,7 @@ citesync write --diff # print what write would change, and change
|
|
|
26
26
|
citesync write # rewrite the other files to agree with the source
|
|
27
27
|
citesync init # write a CITATION.cff from codemeta.json, .zenodo.json and the manifests
|
|
28
28
|
citesync export --format apa # print a citation: apa, bibtex, csl-json, jsonld, datacite, ris, endnote, cff, codemeta or zenodo
|
|
29
|
+
citesync cite 10.7717/peerj.4375 --format ris # resolve public metadata and print a citation
|
|
29
30
|
citesync explain version-mismatch # what a rule checks and how to fix it
|
|
30
31
|
citesync config # the config in use, and the file it came from
|
|
31
32
|
```
|
|
@@ -39,22 +40,25 @@ codemeta.json:3:3: error[version-mismatch] version: '2.0.0', CITATION.cff has '1
|
|
|
39
40
|
|
|
40
41
|
A config is optional. A one-line `citesync.toml` is `ignore = ["description-mismatch"]`.
|
|
41
42
|
|
|
42
|
-
`citesync --help` lists every command and option.
|
|
43
|
+
`citesync --help` lists every command and option. Read the [documentation](https://simonvanlierde.com/citesync/docs/):
|
|
43
44
|
|
|
44
|
-
- [How check works](https://
|
|
45
|
-
- [How write works](https://
|
|
46
|
-
- [Supported files](https://
|
|
47
|
-
- [How init works](https://
|
|
48
|
-
- [
|
|
49
|
-
- [
|
|
50
|
-
- [
|
|
51
|
-
- [
|
|
52
|
-
- [
|
|
53
|
-
- [
|
|
45
|
+
- [How check works](https://simonvanlierde.com/citesync/docs/check/): the fields, files, options and exit codes.
|
|
46
|
+
- [How write works](https://simonvanlierde.com/citesync/docs/write/): what it changes and what it leaves alone.
|
|
47
|
+
- [Supported files](https://simonvanlierde.com/citesync/docs/formats/): which files citesync reads, updates and creates, including read-only Python distribution, R, Julia, Composer and Maven metadata, and the RO-Crate and Croissant files sourceledger makes.
|
|
48
|
+
- [How init works](https://simonvanlierde.com/citesync/docs/init/): where a new CITATION.cff takes each field from.
|
|
49
|
+
- [Cite a DOI, arXiv ID or GitHub repository](https://simonvanlierde.com/citesync/docs/cite/): print its citation, or save the provider responses to replay offline.
|
|
50
|
+
- [Citation exports](https://simonvanlierde.com/citesync/docs/export/): BibTeX, CSL-JSON, APA, schema.org JSON-LD, DataCite XML, RIS and EndNote files kept in step with the source.
|
|
51
|
+
- [Rules](https://simonvanlierde.com/citesync/docs/rules/): each rule id, what it checks and how to fix it.
|
|
52
|
+
- [Configuration](https://simonvanlierde.com/citesync/docs/config/): where config goes, and every key.
|
|
53
|
+
- [Use citation exports with Pandoc](https://simonvanlierde.com/citesync/docs/pandoc/): cite software from the CSL-JSON or BibTeX files `citesync export` or the playground makes.
|
|
54
|
+
- [Output formats](https://simonvanlierde.com/citesync/docs/output/): JSON, GitHub annotations and SARIF.
|
|
55
|
+
- [Tested on real repositories](https://simonvanlierde.com/citesync/docs/tested-repositories/): what citesync reports on five public repositories.
|
|
56
|
+
|
|
57
|
+
See [Architecture and security](https://simonvanlierde.com/citesync/docs/assurance/) and [release verification](https://simonvanlierde.com/citesync/docs/getting-started/#verify-a-release-download).
|
|
54
58
|
|
|
55
59
|
## Browser playground
|
|
56
60
|
|
|
57
|
-
Generate citation files from existing metadata or basic project details, without installing Python. [Open the playground](https://simonvanlierde.com/citesync/) or [
|
|
61
|
+
Generate citation files from existing metadata or basic project details, without installing Python. [Open the playground](https://simonvanlierde.com/citesync/) or [read the playground guide](playground/README.md). Files are processed in the browser; downloading the converter requires a network connection.
|
|
58
62
|
|
|
59
63
|
## Pre-commit hook
|
|
60
64
|
|
|
@@ -63,13 +67,26 @@ For [prek](https://prek.j178.dev) or [pre-commit](https://pre-commit.com), in `.
|
|
|
63
67
|
```yaml
|
|
64
68
|
repos:
|
|
65
69
|
- repo: https://github.com/simonvanlierde/citesync
|
|
66
|
-
rev: v0.
|
|
70
|
+
rev: v0.7.0
|
|
67
71
|
hooks:
|
|
68
72
|
- id: citesync
|
|
69
73
|
- id: citesync-write
|
|
70
74
|
```
|
|
71
75
|
|
|
72
|
-
The `citesync` hook runs when a commit changes a supported metadata file, a citesync config or a file with an export suffix (`.bib`, `.csl.json`, `.apa.txt`, `.jsonld`, `.datacite.xml`, `.ris`, `.enw`), at any depth. It checks every file, not only the staged ones, and fails the commit on an error finding (exit 1) or when citesync can't run (exit 3), such as on a bad config. The [exit codes](https://
|
|
76
|
+
The `citesync` hook runs when a commit changes a supported metadata file, a citesync config or a file with an export suffix (`.bib`, `.csl.json`, `.apa.txt`, `.jsonld`, `.datacite.xml`, `.ris`, `.enw`), at any depth. It checks every file, not only the staged ones, and fails the commit on an error finding (exit 1) or when citesync can't run (exit 3), such as on a bad config. The [exit codes](https://simonvanlierde.com/citesync/docs/check/#findings-and-exit-codes) are the same as on the command line. The `citesync-write` hook runs only when you ask for it: `prek run citesync-write --stage manual --all-files`. Both hooks need Python 3.13 or newer.
|
|
77
|
+
|
|
78
|
+
For a dataset file with a custom name, set `always_run: true` on each citesync hook. This checks all configured paths on every commit or manual run, even when the default filename filter would skip the changed file.
|
|
79
|
+
|
|
80
|
+
## Social card
|
|
81
|
+
|
|
82
|
+
[`playground/og.png`](playground/og.png) is the 1200x630 card shown when the link is shared. It is rendered from
|
|
83
|
+
[`docs/og-card.html`](docs/og-card.html), whose example is `tests/fixtures/synthetic-agree/pyproject.toml` run through `citesync init`. Edit the HTML, then from the repo root:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
just og-card
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Both builds use the same card. The site includes its image hash so sharing services fetch the current version.
|
|
73
90
|
|
|
74
91
|
## Development
|
|
75
92
|
|
|
@@ -92,7 +109,7 @@ just hooks # the git hooks, as the checks workflow runs them
|
|
|
92
109
|
|
|
93
110
|
`just mutation` mutation-tests the modules `only_mutate` lists under `[tool.mutmut]` in `pyproject.toml`. CI runs it weekly, on Mondays ([`mutation.yml`](.github/workflows/mutation.yml)). It fails when the tests miss a change that `tests/mutation-baseline.txt` doesn't list. A change that can't alter behaviour goes in that file, with the reason. It also fails when the tests now catch a listed change, so drop that line.
|
|
94
111
|
|
|
95
|
-
uv locks only releases at least a week old.
|
|
112
|
+
uv locks only releases at least a week old. For a newer security fix, pin the source archive at an exact commit, then return to the registry version after a week ([how](https://github.com/simonvanlierde/project-templates/blob/main/docs/tooling.md#dependencies)).
|
|
96
113
|
|
|
97
114
|
## Licence
|
|
98
115
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "citesync"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.7.0"
|
|
4
4
|
description = "Generate and synchronize software citation files from package metadata. CLI, pre-commit hook and browser playground."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -43,24 +43,27 @@ citesync = "citesync.cli:entry"
|
|
|
43
43
|
|
|
44
44
|
[project.urls]
|
|
45
45
|
Homepage = "https://simonvanlierde.com/citesync/"
|
|
46
|
+
Documentation = "https://simonvanlierde.com/citesync/docs/"
|
|
46
47
|
Source = "https://github.com/simonvanlierde/citesync"
|
|
47
48
|
Issues = "https://github.com/simonvanlierde/citesync/issues"
|
|
48
|
-
Changelog = "https://
|
|
49
|
+
Changelog = "https://simonvanlierde.com/citesync/docs/changelog/"
|
|
49
50
|
|
|
50
51
|
[dependency-groups]
|
|
51
52
|
dev = [
|
|
52
53
|
"hypothesis>=6.140",
|
|
53
54
|
"jsonschema>=4.25",
|
|
55
|
+
"markdown-it-py>=4.2.0",
|
|
54
56
|
"memray>=1.20.0 ; sys_platform != 'win32'",
|
|
55
57
|
"mutmut==3.8.1",
|
|
56
58
|
"pybtex>=0.25",
|
|
57
59
|
"pyinstrument>=5.1.3",
|
|
58
|
-
"pytest>=9.
|
|
60
|
+
"pytest>=9.2.0",
|
|
59
61
|
"pytest-cov>=7.1.0",
|
|
60
|
-
"ruff>=0.17.
|
|
61
|
-
"ty>=0.0.
|
|
62
|
+
"ruff>=0.17.3",
|
|
63
|
+
"ty>=0.0.93",
|
|
62
64
|
"xmlschema>=4.3.2",
|
|
63
65
|
]
|
|
66
|
+
fuzz = ["atheris==3.1.0 ; sys_platform == 'linux' and platform_machine == 'x86_64' and python_version < '3.15'"]
|
|
64
67
|
|
|
65
68
|
[build-system]
|
|
66
69
|
requires = ["uv_build>=0.12.19,<0.14.0"]
|
|
@@ -72,6 +75,22 @@ exclude-newer = "1 week"
|
|
|
72
75
|
[tool.uv.build-backend]
|
|
73
76
|
module-name = "citesync"
|
|
74
77
|
|
|
78
|
+
[tool.citesync.required-fields]
|
|
79
|
+
"CITATION.cff" = [
|
|
80
|
+
"name",
|
|
81
|
+
"version",
|
|
82
|
+
"author",
|
|
83
|
+
"license",
|
|
84
|
+
"identifier",
|
|
85
|
+
]
|
|
86
|
+
"codemeta.json" = [
|
|
87
|
+
"name",
|
|
88
|
+
"version",
|
|
89
|
+
"author",
|
|
90
|
+
"license",
|
|
91
|
+
"identifier",
|
|
92
|
+
]
|
|
93
|
+
|
|
75
94
|
[tool.ruff]
|
|
76
95
|
line-length = 120
|
|
77
96
|
|
|
@@ -113,14 +132,16 @@ max-args = 10
|
|
|
113
132
|
[tool.ty.terminal]
|
|
114
133
|
error-on-warning = false
|
|
115
134
|
|
|
116
|
-
[tool.pytest
|
|
135
|
+
[tool.pytest]
|
|
136
|
+
minversion = "9.0"
|
|
117
137
|
addopts = [
|
|
118
138
|
"-ra",
|
|
119
|
-
"--strict-config",
|
|
120
|
-
"--strict-markers",
|
|
121
139
|
"--import-mode=importlib",
|
|
122
140
|
]
|
|
123
141
|
testpaths = ["tests"]
|
|
142
|
+
strict = true
|
|
143
|
+
filterwarnings = ["error"]
|
|
144
|
+
log_level = "INFO"
|
|
124
145
|
|
|
125
146
|
[tool.mutmut]
|
|
126
147
|
source_paths = ["src/citesync"]
|
|
@@ -133,6 +154,16 @@ only_mutate = [
|
|
|
133
154
|
pytest_add_cli_args_test_selection = ["tests"]
|
|
134
155
|
also_copy = [
|
|
135
156
|
"docs",
|
|
157
|
+
"playground",
|
|
158
|
+
"README.md",
|
|
159
|
+
"CHANGELOG.md",
|
|
160
|
+
"CITATION.cff",
|
|
161
|
+
"codemeta.json",
|
|
162
|
+
".github",
|
|
163
|
+
"GOVERNANCE.md",
|
|
164
|
+
"LICENSE",
|
|
165
|
+
"committed.toml",
|
|
166
|
+
".pre-commit-config.yaml",
|
|
136
167
|
".pre-commit-hooks.yaml",
|
|
137
168
|
]
|
|
138
169
|
|
|
@@ -146,3 +177,14 @@ exclude_also = [
|
|
|
146
177
|
"if TYPE_CHECKING:",
|
|
147
178
|
"raise NotImplementedError",
|
|
148
179
|
]
|
|
180
|
+
|
|
181
|
+
[tool.repo-review.ignore]
|
|
182
|
+
PY007 = "just is the task runner: `just check` runs what CI runs"
|
|
183
|
+
PC110 = "ruff format runs as a local hook from the venv, the same ruff CI runs"
|
|
184
|
+
PC140 = "ty runs as a local hook from the venv"
|
|
185
|
+
PC170 = "no reStructuredText: rumdl checks the Markdown docs"
|
|
186
|
+
PC190 = "ruff check runs as a local hook from the venv"
|
|
187
|
+
PC901 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
|
|
188
|
+
PC902 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
|
|
189
|
+
PC903 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
|
|
190
|
+
GH200 = "Renovate updates the actions and hook revs (renovate.json5)"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "citesync"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.7.0"
|
|
4
4
|
description = "Generate and synchronize software citation files from package metadata. CLI, pre-commit hook and browser playground."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -9,20 +9,20 @@ license = "Apache-2.0"
|
|
|
9
9
|
license-files = ["LICENSE", "NOTICE"]
|
|
10
10
|
keywords = ["citation", "CITATION.cff", "codemeta", "zenodo", "software-metadata", "pre-commit"]
|
|
11
11
|
classifiers = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
"Development Status :: 3 - Alpha",
|
|
13
|
+
"Environment :: Console",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Intended Audience :: Science/Research",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Programming Language :: Python :: 3.14",
|
|
19
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
20
|
+
"Typing :: Typed",
|
|
21
21
|
]
|
|
22
22
|
dependencies = [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"packaging>=26.3",
|
|
24
|
+
"ruamel-yaml>=0.19",
|
|
25
|
+
"tomlkit>=0.15.2",
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.scripts]
|
|
@@ -30,24 +30,29 @@ citesync = "citesync.cli:entry"
|
|
|
30
30
|
|
|
31
31
|
[project.urls]
|
|
32
32
|
Homepage = "https://simonvanlierde.com/citesync/"
|
|
33
|
+
Documentation = "https://simonvanlierde.com/citesync/docs/"
|
|
33
34
|
Source = "https://github.com/simonvanlierde/citesync"
|
|
34
35
|
Issues = "https://github.com/simonvanlierde/citesync/issues"
|
|
35
|
-
Changelog = "https://
|
|
36
|
+
Changelog = "https://simonvanlierde.com/citesync/docs/changelog/"
|
|
36
37
|
|
|
37
38
|
[dependency-groups]
|
|
38
39
|
dev = [
|
|
39
40
|
"hypothesis>=6.140",
|
|
40
41
|
"jsonschema>=4.25",
|
|
42
|
+
"markdown-it-py>=4.2.0",
|
|
41
43
|
"memray>=1.20.0 ; sys_platform != 'win32'",
|
|
42
44
|
"mutmut==3.8.1",
|
|
43
45
|
"pybtex>=0.25",
|
|
44
46
|
"pyinstrument>=5.1.3",
|
|
45
|
-
"pytest>=9.
|
|
47
|
+
"pytest>=9.2.0",
|
|
46
48
|
"pytest-cov>=7.1.0",
|
|
47
|
-
"ruff>=0.17.
|
|
48
|
-
"ty>=0.0.
|
|
49
|
+
"ruff>=0.17.3",
|
|
50
|
+
"ty>=0.0.93",
|
|
49
51
|
"xmlschema>=4.3.2",
|
|
50
52
|
]
|
|
53
|
+
fuzz = [
|
|
54
|
+
"atheris==3.1.0 ; sys_platform == 'linux' and platform_machine == 'x86_64' and python_version < '3.15'",
|
|
55
|
+
]
|
|
51
56
|
|
|
52
57
|
[build-system]
|
|
53
58
|
requires = ["uv_build>=0.12.19,<0.14.0"]
|
|
@@ -64,6 +69,10 @@ exclude-newer = "1 week"
|
|
|
64
69
|
[tool.uv.build-backend]
|
|
65
70
|
module-name = "citesync"
|
|
66
71
|
|
|
72
|
+
[tool.citesync.required-fields]
|
|
73
|
+
"CITATION.cff" = ["name", "version", "author", "license", "identifier"]
|
|
74
|
+
"codemeta.json" = ["name", "version", "author", "license", "identifier"]
|
|
75
|
+
|
|
67
76
|
# NOTE: self-contained ruff config, deliberately not extended from any shared base.
|
|
68
77
|
# No target-version: ruff derives it from requires-python above.
|
|
69
78
|
[tool.ruff]
|
|
@@ -75,11 +84,11 @@ docstring-code-format = true
|
|
|
75
84
|
[tool.ruff.lint]
|
|
76
85
|
select = ["ALL"]
|
|
77
86
|
ignore = [
|
|
78
|
-
"ANN204",
|
|
79
|
-
"COM812",
|
|
80
|
-
"CPY001",
|
|
81
|
-
"D105",
|
|
82
|
-
"D107",
|
|
87
|
+
"ANN204", # missing-return-type-special-method
|
|
88
|
+
"COM812", # trailing-comma-missing: conflicts with the formatter
|
|
89
|
+
"CPY001", # missing copyright notice
|
|
90
|
+
"D105", # undocumented-magic-method
|
|
91
|
+
"D107", # undocumented-public-init
|
|
83
92
|
"TD002", # missing-todo-author: a plain `# TODO:` is enough
|
|
84
93
|
"TD003", # missing-todo-link
|
|
85
94
|
]
|
|
@@ -103,19 +112,39 @@ max-args = 10
|
|
|
103
112
|
[tool.ty.terminal]
|
|
104
113
|
error-on-warning = false
|
|
105
114
|
|
|
106
|
-
|
|
107
|
-
|
|
115
|
+
# pytest 9's native table. strict turns unknown config keys, unknown markers and
|
|
116
|
+
# an xfail test that passes into errors, and filterwarnings turns warnings into
|
|
117
|
+
# failures, so a deprecation shows up in CI, not after the upgrade that removes it.
|
|
118
|
+
[tool.pytest]
|
|
119
|
+
minversion = "9.0"
|
|
120
|
+
addopts = ["-ra", "--import-mode=importlib"]
|
|
108
121
|
testpaths = ["tests"]
|
|
122
|
+
strict = true
|
|
123
|
+
filterwarnings = ["error"]
|
|
124
|
+
log_level = "INFO"
|
|
109
125
|
|
|
110
126
|
# Coverage is opt-in via `pytest --cov` (`just py-cov`), not addopts, because it
|
|
111
|
-
# slows every plain test run.
|
|
112
|
-
#
|
|
113
|
-
#
|
|
127
|
+
# slows every plain test run. CI enables coverage and requires 80%.
|
|
128
|
+
# Mutation testing covers check, codecs, write and jsonsplice via `just mutation`
|
|
129
|
+
# and the weekly or manually triggered workflow.
|
|
114
130
|
[tool.mutmut]
|
|
115
131
|
source_paths = ["src/citesync"]
|
|
116
132
|
only_mutate = ["src/citesync/check.py", "src/citesync/codecs.py", "src/citesync/write.py", "src/citesync/jsonsplice.py"]
|
|
117
133
|
pytest_add_cli_args_test_selection = ["tests"]
|
|
118
|
-
also_copy = [
|
|
134
|
+
also_copy = [
|
|
135
|
+
"docs",
|
|
136
|
+
"playground",
|
|
137
|
+
"README.md",
|
|
138
|
+
"CHANGELOG.md",
|
|
139
|
+
"CITATION.cff",
|
|
140
|
+
"codemeta.json",
|
|
141
|
+
".github",
|
|
142
|
+
"GOVERNANCE.md",
|
|
143
|
+
"LICENSE",
|
|
144
|
+
"committed.toml",
|
|
145
|
+
".pre-commit-config.yaml",
|
|
146
|
+
".pre-commit-hooks.yaml",
|
|
147
|
+
]
|
|
119
148
|
|
|
120
149
|
[tool.coverage.run]
|
|
121
150
|
source = ["src"]
|
|
@@ -124,3 +153,16 @@ branch = true
|
|
|
124
153
|
[tool.coverage.report]
|
|
125
154
|
show_missing = true
|
|
126
155
|
exclude_also = ["if TYPE_CHECKING:", "raise NotImplementedError"]
|
|
156
|
+
|
|
157
|
+
# Checks from Scientific Python's repo-review (the sp-repo-review git hook) that this
|
|
158
|
+
# project skips on purpose. `prek run sp-repo-review --all-files` runs the rest.
|
|
159
|
+
[tool.repo-review.ignore]
|
|
160
|
+
PY007 = "just is the task runner: `just check` runs what CI runs"
|
|
161
|
+
PC110 = "ruff format runs as a local hook from the venv, the same ruff CI runs"
|
|
162
|
+
PC140 = "ty runs as a local hook from the venv"
|
|
163
|
+
PC170 = "no reStructuredText: rumdl checks the Markdown docs"
|
|
164
|
+
PC190 = "ruff check runs as a local hook from the venv"
|
|
165
|
+
PC901 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
|
|
166
|
+
PC902 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
|
|
167
|
+
PC903 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
|
|
168
|
+
GH200 = "Renovate updates the actions and hook revs (renovate.json5)"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Vendored from simonvanlierde/codemeta-drift; tests/test_mapping.py checks the sha256 lines.
|
|
2
|
+
tag v0.10.0
|
|
3
|
+
commit 41f844072ecee081e76a9480cf0e4f137e7253f9
|
|
4
|
+
sha256 68b431dd7a65d25978fa94a99b4722aab097b9f2af862c77d6d74b5d58648760 mapping-local.json examples/mapping-3.1.json
|
|
5
|
+
sha256 82147f5b40e3a8cf92b4a0160013eafb56ac556749971f41e144bd007f08eede mapping-4.0.json examples/mapping-4.0.json
|
|
6
|
+
sha256 006d990ef30f82a0df22e1beffc68071ad27ecf118a594be6157abc9d2ce4cd9 mapping.schema.json src/codemeta_drift/mapping.schema.json
|
|
7
|
+
sha256 35d58f8afa99663d5309d170924335c4c07f3241416c7119d1dc7a3f4024b87c mapping-vectors.json src/codemeta_drift/mapping-vectors.json
|