citesync 0.5.0__tar.gz → 0.6.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.
Files changed (30) hide show
  1. {citesync-0.5.0 → citesync-0.6.0}/PKG-INFO +33 -18
  2. {citesync-0.5.0 → citesync-0.6.0}/README.md +30 -16
  3. {citesync-0.5.0 → citesync-0.6.0}/pyproject.toml +49 -8
  4. {citesync-0.5.0 → citesync-0.6.0}/pyproject.toml.orig +66 -26
  5. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/check.py +133 -11
  6. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/cli.py +12 -4
  7. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/codecs.py +10 -2
  8. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/config.py +108 -5
  9. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/formats.py +72 -2
  10. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/rules.py +22 -1
  11. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/write.py +47 -16
  12. {citesync-0.5.0 → citesync-0.6.0}/LICENSE +0 -0
  13. {citesync-0.5.0 → citesync-0.6.0}/NOTICE +0 -0
  14. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/MAPPING_SOURCE +0 -0
  15. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/__init__.py +0 -0
  16. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/__main__.py +0 -0
  17. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/core_metadata.py +0 -0
  18. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/errors.py +0 -0
  19. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/export.py +0 -0
  20. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/jsonsplice.py +0 -0
  21. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/mapping-4.0.json +0 -0
  22. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/mapping-local.json +0 -0
  23. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/mapping-vectors.json +0 -0
  24. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/mapping.py +0 -0
  25. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/mapping.schema.json +0 -0
  26. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/playground.py +0 -0
  27. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/playground_exports.py +0 -0
  28. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/positions.py +0 -0
  29. {citesync-0.5.0 → citesync-0.6.0}/src/citesync/py.typed +0 -0
  30. {citesync-0.5.0 → citesync-0.6.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.5.0
3
+ Version: 0.6.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://github.com/simonvanlierde/citesync/blob/main/CHANGELOG.md
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 [CONTRIBUTING.md](https://github.com/simonvanlierde/citesync/blob/main/.github/CONTRIBUTING.md).
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
 
@@ -68,22 +69,22 @@ codemeta.json:3:3: error[version-mismatch] version: '2.0.0', CITATION.cff has '1
68
69
 
69
70
  A config is optional. A one-line `citesync.toml` is `ignore = ["description-mismatch"]`.
70
71
 
71
- `citesync --help` lists every command and option. The reference is in `docs/`:
72
+ `citesync --help` lists every command and option. Read the [documentation](https://simonvanlierde.com/citesync/docs/):
72
73
 
73
- - [How check works](https://github.com/simonvanlierde/citesync/blob/main/docs/check.md): the fields, files, options and exit codes.
74
- - [How write works](https://github.com/simonvanlierde/citesync/blob/main/docs/write.md): what it changes and what it leaves alone.
75
- - [Supported files](https://github.com/simonvanlierde/citesync/blob/main/docs/formats.md): which files citesync reads, updates and creates, including read-only Python distribution, R and Julia metadata, and the RO-Crate and Croissant files sourceledger makes.
76
- - [How init works](https://github.com/simonvanlierde/citesync/blob/main/docs/init.md): where a new CITATION.cff takes each field from.
77
- - [Citation exports](https://github.com/simonvanlierde/citesync/blob/main/docs/export.md): BibTeX, CSL-JSON, APA, schema.org JSON-LD, DataCite XML, RIS and EndNote files kept in step with the source.
78
- - [Rules](https://github.com/simonvanlierde/citesync/blob/main/docs/rules.md): each rule id, what it checks and how to fix it.
79
- - [Configuration](https://github.com/simonvanlierde/citesync/blob/main/docs/config.md): where config goes, and every key.
80
- - [Use citation exports with Pandoc](https://github.com/simonvanlierde/citesync/blob/main/docs/pandoc.md): cite software from the CSL-JSON or BibTeX files `citesync export` or the playground makes.
81
- - [Output formats](https://github.com/simonvanlierde/citesync/blob/main/docs/output.md): JSON, GitHub annotations and SARIF.
82
- - [Tested on real repositories](https://github.com/simonvanlierde/citesync/blob/main/docs/tested-repositories.md): what citesync reports on five public repositories.
74
+ - [How check works](https://simonvanlierde.com/citesync/docs/check/): the fields, files, options and exit codes.
75
+ - [How write works](https://simonvanlierde.com/citesync/docs/write/): what it changes and what it leaves alone.
76
+ - [Supported files](https://simonvanlierde.com/citesync/docs/formats/): which files citesync reads, updates and creates, including read-only Python distribution, R and Julia metadata, and the RO-Crate and Croissant files sourceledger makes.
77
+ - [How init works](https://simonvanlierde.com/citesync/docs/init/): where a new CITATION.cff takes each field from.
78
+ - [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.
79
+ - [Rules](https://simonvanlierde.com/citesync/docs/rules/): each rule id, what it checks and how to fix it.
80
+ - [Configuration](https://simonvanlierde.com/citesync/docs/config/): where config goes, and every key.
81
+ - [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.
82
+ - [Output formats](https://simonvanlierde.com/citesync/docs/output/): JSON, GitHub annotations and SARIF.
83
+ - [Tested on real repositories](https://simonvanlierde.com/citesync/docs/tested-repositories/): what citesync reports on five public repositories.
83
84
 
84
85
  ## Browser playground
85
86
 
86
- Generate citation files from existing metadata or basic project details, without installing Python. [Open the playground](https://simonvanlierde.com/citesync/) or [run it locally](https://github.com/simonvanlierde/citesync/blob/main/playground/README.md). Files are processed in the browser; downloading the converter requires a network connection.
87
+ 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
88
 
88
89
  ## Pre-commit hook
89
90
 
@@ -92,13 +93,27 @@ For [prek](https://prek.j178.dev) or [pre-commit](https://pre-commit.com), in `.
92
93
  ```yaml
93
94
  repos:
94
95
  - repo: https://github.com/simonvanlierde/citesync
95
- rev: v0.5.0
96
+ rev: v0.6.0
96
97
  hooks:
97
98
  - id: citesync
98
99
  - id: citesync-write
99
100
  ```
100
101
 
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://github.com/simonvanlierde/citesync/blob/main/docs/check.md#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.
102
+ 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.
103
+
104
+ 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.
105
+
106
+ ## Social card
107
+
108
+ [`playground/og.png`](playground/og.png) is the 1200x630 card shown when the link is shared. It is rendered from
109
+ [`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:
110
+
111
+ ```sh
112
+ pnpm exec playwright screenshot --browser=chromium --viewport-size=1200,630 \
113
+ file://$PWD/docs/og-card.html playground/og.png
114
+ ```
115
+
116
+ `playground/build.py` copies the card into the built site and adds its hash to the image URL. The playground and every documentation page include sharing tags.
102
117
 
103
118
  ## Development
104
119
 
@@ -121,7 +136,7 @@ just hooks # the git hooks, as the checks workflow runs them
121
136
 
122
137
  `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
138
 
124
- uv locks only releases at least a week old. If `just check` fails on a newer security fix, add the package to `exclude-newer-package` under `[tool.uv]` in `pyproject.toml`, and remove it a week later ([how](https://github.com/simonvanlierde/project-templates/blob/main/docs/tooling.md#dependencies)).
139
+ 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
140
 
126
141
  ## Licence
127
142
 
@@ -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 [CONTRIBUTING.md](https://github.com/simonvanlierde/citesync/blob/main/.github/CONTRIBUTING.md).
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
 
@@ -39,22 +39,22 @@ codemeta.json:3:3: error[version-mismatch] version: '2.0.0', CITATION.cff has '1
39
39
 
40
40
  A config is optional. A one-line `citesync.toml` is `ignore = ["description-mismatch"]`.
41
41
 
42
- `citesync --help` lists every command and option. The reference is in `docs/`:
42
+ `citesync --help` lists every command and option. Read the [documentation](https://simonvanlierde.com/citesync/docs/):
43
43
 
44
- - [How check works](https://github.com/simonvanlierde/citesync/blob/main/docs/check.md): the fields, files, options and exit codes.
45
- - [How write works](https://github.com/simonvanlierde/citesync/blob/main/docs/write.md): what it changes and what it leaves alone.
46
- - [Supported files](https://github.com/simonvanlierde/citesync/blob/main/docs/formats.md): which files citesync reads, updates and creates, including read-only Python distribution, R and Julia metadata, and the RO-Crate and Croissant files sourceledger makes.
47
- - [How init works](https://github.com/simonvanlierde/citesync/blob/main/docs/init.md): where a new CITATION.cff takes each field from.
48
- - [Citation exports](https://github.com/simonvanlierde/citesync/blob/main/docs/export.md): BibTeX, CSL-JSON, APA, schema.org JSON-LD, DataCite XML, RIS and EndNote files kept in step with the source.
49
- - [Rules](https://github.com/simonvanlierde/citesync/blob/main/docs/rules.md): each rule id, what it checks and how to fix it.
50
- - [Configuration](https://github.com/simonvanlierde/citesync/blob/main/docs/config.md): where config goes, and every key.
51
- - [Use citation exports with Pandoc](https://github.com/simonvanlierde/citesync/blob/main/docs/pandoc.md): cite software from the CSL-JSON or BibTeX files `citesync export` or the playground makes.
52
- - [Output formats](https://github.com/simonvanlierde/citesync/blob/main/docs/output.md): JSON, GitHub annotations and SARIF.
53
- - [Tested on real repositories](https://github.com/simonvanlierde/citesync/blob/main/docs/tested-repositories.md): what citesync reports on five public repositories.
44
+ - [How check works](https://simonvanlierde.com/citesync/docs/check/): the fields, files, options and exit codes.
45
+ - [How write works](https://simonvanlierde.com/citesync/docs/write/): what it changes and what it leaves alone.
46
+ - [Supported files](https://simonvanlierde.com/citesync/docs/formats/): which files citesync reads, updates and creates, including read-only Python distribution, R and Julia metadata, and the RO-Crate and Croissant files sourceledger makes.
47
+ - [How init works](https://simonvanlierde.com/citesync/docs/init/): where a new CITATION.cff takes each field from.
48
+ - [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.
49
+ - [Rules](https://simonvanlierde.com/citesync/docs/rules/): each rule id, what it checks and how to fix it.
50
+ - [Configuration](https://simonvanlierde.com/citesync/docs/config/): where config goes, and every key.
51
+ - [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.
52
+ - [Output formats](https://simonvanlierde.com/citesync/docs/output/): JSON, GitHub annotations and SARIF.
53
+ - [Tested on real repositories](https://simonvanlierde.com/citesync/docs/tested-repositories/): what citesync reports on five public repositories.
54
54
 
55
55
  ## Browser playground
56
56
 
57
- Generate citation files from existing metadata or basic project details, without installing Python. [Open the playground](https://simonvanlierde.com/citesync/) or [run it locally](https://github.com/simonvanlierde/citesync/blob/main/playground/README.md). Files are processed in the browser; downloading the converter requires a network connection.
57
+ 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
58
 
59
59
  ## Pre-commit hook
60
60
 
@@ -63,13 +63,27 @@ For [prek](https://prek.j178.dev) or [pre-commit](https://pre-commit.com), in `.
63
63
  ```yaml
64
64
  repos:
65
65
  - repo: https://github.com/simonvanlierde/citesync
66
- rev: v0.5.0
66
+ rev: v0.6.0
67
67
  hooks:
68
68
  - id: citesync
69
69
  - id: citesync-write
70
70
  ```
71
71
 
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://github.com/simonvanlierde/citesync/blob/main/docs/check.md#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.
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://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.
73
+
74
+ 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.
75
+
76
+ ## Social card
77
+
78
+ [`playground/og.png`](playground/og.png) is the 1200x630 card shown when the link is shared. It is rendered from
79
+ [`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:
80
+
81
+ ```sh
82
+ pnpm exec playwright screenshot --browser=chromium --viewport-size=1200,630 \
83
+ file://$PWD/docs/og-card.html playground/og.png
84
+ ```
85
+
86
+ `playground/build.py` copies the card into the built site and adds its hash to the image URL. The playground and every documentation page include sharing tags.
73
87
 
74
88
  ## Development
75
89
 
@@ -92,7 +106,7 @@ just hooks # the git hooks, as the checks workflow runs them
92
106
 
93
107
  `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
108
 
95
- uv locks only releases at least a week old. If `just check` fails on a newer security fix, add the package to `exclude-newer-package` under `[tool.uv]` in `pyproject.toml`, and remove it a week later ([how](https://github.com/simonvanlierde/project-templates/blob/main/docs/tooling.md#dependencies)).
109
+ 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
110
 
97
111
  ## Licence
98
112
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "citesync"
3
- version = "0.5.0"
3
+ version = "0.6.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,22 +43,24 @@ 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://github.com/simonvanlierde/citesync/blob/main/CHANGELOG.md"
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.1.1",
60
+ "pytest>=9.2.0",
59
61
  "pytest-cov>=7.1.0",
60
- "ruff>=0.17.1",
61
- "ty>=0.0.89",
62
+ "ruff>=0.17.3",
63
+ "ty>=0.0.93",
62
64
  "xmlschema>=4.3.2",
63
65
  ]
64
66
 
@@ -72,6 +74,22 @@ exclude-newer = "1 week"
72
74
  [tool.uv.build-backend]
73
75
  module-name = "citesync"
74
76
 
77
+ [tool.citesync.required-fields]
78
+ "CITATION.cff" = [
79
+ "name",
80
+ "version",
81
+ "author",
82
+ "license",
83
+ "identifier",
84
+ ]
85
+ "codemeta.json" = [
86
+ "name",
87
+ "version",
88
+ "author",
89
+ "license",
90
+ "identifier",
91
+ ]
92
+
75
93
  [tool.ruff]
76
94
  line-length = 120
77
95
 
@@ -113,14 +131,16 @@ max-args = 10
113
131
  [tool.ty.terminal]
114
132
  error-on-warning = false
115
133
 
116
- [tool.pytest.ini_options]
134
+ [tool.pytest]
135
+ minversion = "9.0"
117
136
  addopts = [
118
137
  "-ra",
119
- "--strict-config",
120
- "--strict-markers",
121
138
  "--import-mode=importlib",
122
139
  ]
123
140
  testpaths = ["tests"]
141
+ strict = true
142
+ filterwarnings = ["error"]
143
+ log_level = "INFO"
124
144
 
125
145
  [tool.mutmut]
126
146
  source_paths = ["src/citesync"]
@@ -133,6 +153,16 @@ only_mutate = [
133
153
  pytest_add_cli_args_test_selection = ["tests"]
134
154
  also_copy = [
135
155
  "docs",
156
+ "playground",
157
+ "README.md",
158
+ "CHANGELOG.md",
159
+ "CITATION.cff",
160
+ "codemeta.json",
161
+ ".github",
162
+ "GOVERNANCE.md",
163
+ "LICENSE",
164
+ "committed.toml",
165
+ ".pre-commit-config.yaml",
136
166
  ".pre-commit-hooks.yaml",
137
167
  ]
138
168
 
@@ -146,3 +176,14 @@ exclude_also = [
146
176
  "if TYPE_CHECKING:",
147
177
  "raise NotImplementedError",
148
178
  ]
179
+
180
+ [tool.repo-review.ignore]
181
+ PY007 = "just is the task runner: `just check` runs what CI runs"
182
+ PC110 = "ruff format runs as a local hook from the venv, the same ruff CI runs"
183
+ PC140 = "ty runs as a local hook from the venv"
184
+ PC170 = "no reStructuredText: rumdl checks the Markdown docs"
185
+ PC190 = "ruff check runs as a local hook from the venv"
186
+ PC901 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
187
+ PC902 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
188
+ PC903 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
189
+ GH200 = "Renovate updates the actions and hook revs (renovate.json5)"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "citesync"
3
- version = "0.5.0"
3
+ version = "0.6.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
- "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",
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
- "packaging>=26.3",
24
- "ruamel-yaml>=0.19",
25
- "tomlkit>=0.15.2",
23
+ "packaging>=26.3",
24
+ "ruamel-yaml>=0.19",
25
+ "tomlkit>=0.15.2",
26
26
  ]
27
27
 
28
28
  [project.scripts]
@@ -30,22 +30,24 @@ 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://github.com/simonvanlierde/citesync/blob/main/CHANGELOG.md"
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.1.1",
47
+ "pytest>=9.2.0",
46
48
  "pytest-cov>=7.1.0",
47
- "ruff>=0.17.1",
48
- "ty>=0.0.89",
49
+ "ruff>=0.17.3",
50
+ "ty>=0.0.93",
49
51
  "xmlschema>=4.3.2",
50
52
  ]
51
53
 
@@ -64,6 +66,10 @@ exclude-newer = "1 week"
64
66
  [tool.uv.build-backend]
65
67
  module-name = "citesync"
66
68
 
69
+ [tool.citesync.required-fields]
70
+ "CITATION.cff" = ["name", "version", "author", "license", "identifier"]
71
+ "codemeta.json" = ["name", "version", "author", "license", "identifier"]
72
+
67
73
  # NOTE: self-contained ruff config, deliberately not extended from any shared base.
68
74
  # No target-version: ruff derives it from requires-python above.
69
75
  [tool.ruff]
@@ -75,11 +81,11 @@ docstring-code-format = true
75
81
  [tool.ruff.lint]
76
82
  select = ["ALL"]
77
83
  ignore = [
78
- "ANN204", # missing-return-type-special-method
79
- "COM812", # trailing-comma-missing: conflicts with the formatter
80
- "CPY001", # missing copyright notice
81
- "D105", # undocumented-magic-method
82
- "D107", # undocumented-public-init
84
+ "ANN204", # missing-return-type-special-method
85
+ "COM812", # trailing-comma-missing: conflicts with the formatter
86
+ "CPY001", # missing copyright notice
87
+ "D105", # undocumented-magic-method
88
+ "D107", # undocumented-public-init
83
89
  "TD002", # missing-todo-author: a plain `# TODO:` is enough
84
90
  "TD003", # missing-todo-link
85
91
  ]
@@ -103,19 +109,40 @@ max-args = 10
103
109
  [tool.ty.terminal]
104
110
  error-on-warning = false
105
111
 
106
- [tool.pytest.ini_options]
107
- addopts = ["-ra", "--strict-config", "--strict-markers", "--import-mode=importlib"]
112
+ # pytest 9's native table. strict turns unknown config keys, unknown markers and
113
+ # an xfail test that passes into errors, and filterwarnings turns warnings into
114
+ # failures, so a deprecation shows up in CI, not after the upgrade that removes it.
115
+ [tool.pytest]
116
+ minversion = "9.0"
117
+ addopts = ["-ra", "--import-mode=importlib"]
108
118
  testpaths = ["tests"]
119
+ strict = true
120
+ filterwarnings = ["error"]
121
+ log_level = "INFO"
109
122
 
110
123
  # Coverage is opt-in via `pytest --cov` (`just py-cov`), not addopts, because it
111
124
  # slows every plain test run. No fail_under until there is a suite worth setting
112
125
  # one against.
113
- # Mutation testing (`just mutation`, not in CI) covers the comparison code only.
126
+ # Mutation testing covers check, codecs, write and jsonsplice via `just mutation`
127
+ # and the weekly or manually triggered workflow.
114
128
  [tool.mutmut]
115
129
  source_paths = ["src/citesync"]
116
130
  only_mutate = ["src/citesync/check.py", "src/citesync/codecs.py", "src/citesync/write.py", "src/citesync/jsonsplice.py"]
117
131
  pytest_add_cli_args_test_selection = ["tests"]
118
- also_copy = ["docs", ".pre-commit-hooks.yaml"]
132
+ also_copy = [
133
+ "docs",
134
+ "playground",
135
+ "README.md",
136
+ "CHANGELOG.md",
137
+ "CITATION.cff",
138
+ "codemeta.json",
139
+ ".github",
140
+ "GOVERNANCE.md",
141
+ "LICENSE",
142
+ "committed.toml",
143
+ ".pre-commit-config.yaml",
144
+ ".pre-commit-hooks.yaml",
145
+ ]
119
146
 
120
147
  [tool.coverage.run]
121
148
  source = ["src"]
@@ -124,3 +151,16 @@ branch = true
124
151
  [tool.coverage.report]
125
152
  show_missing = true
126
153
  exclude_also = ["if TYPE_CHECKING:", "raise NotImplementedError"]
154
+
155
+ # Checks from Scientific Python's repo-review (the sp-repo-review git hook) that this
156
+ # project skips on purpose. `prek run sp-repo-review --all-files` runs the rest.
157
+ [tool.repo-review.ignore]
158
+ PY007 = "just is the task runner: `just check` runs what CI runs"
159
+ PC110 = "ruff format runs as a local hook from the venv, the same ruff CI runs"
160
+ PC140 = "ty runs as a local hook from the venv"
161
+ PC170 = "no reStructuredText: rumdl checks the Markdown docs"
162
+ PC190 = "ruff check runs as a local hook from the venv"
163
+ PC901 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
164
+ PC902 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
165
+ PC903 = "the hooks run in CI's checks workflow, not on pre-commit.ci"
166
+ GH200 = "Renovate updates the actions and hook revs (renovate.json5)"