bibsync 0.3.1__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 (52) hide show
  1. bibsync-0.3.1/.gitignore +136 -0
  2. bibsync-0.3.1/.markdownlint.yaml +7 -0
  3. bibsync-0.3.1/.pre-commit-config.yaml +75 -0
  4. bibsync-0.3.1/.pre-commit-hooks.yaml +12 -0
  5. bibsync-0.3.1/.prettierrc +5 -0
  6. bibsync-0.3.1/.typos.toml +2 -0
  7. bibsync-0.3.1/CITATION.cff +13 -0
  8. bibsync-0.3.1/CODE_OF_CONDUCT.md +131 -0
  9. bibsync-0.3.1/CONTRIBUTING.md +37 -0
  10. bibsync-0.3.1/Cargo.lock +2303 -0
  11. bibsync-0.3.1/Cargo.toml +60 -0
  12. bibsync-0.3.1/LICENSE +26 -0
  13. bibsync-0.3.1/PKG-INFO +323 -0
  14. bibsync-0.3.1/README.md +295 -0
  15. bibsync-0.3.1/SECURITY.md +53 -0
  16. bibsync-0.3.1/SUPPORT.md +7 -0
  17. bibsync-0.3.1/benches/greeting.rs +10 -0
  18. bibsync-0.3.1/cliff.toml +126 -0
  19. bibsync-0.3.1/deny.toml +33 -0
  20. bibsync-0.3.1/docs/api/index.md +110 -0
  21. bibsync-0.3.1/docs/contributing.md +4 -0
  22. bibsync-0.3.1/docs/index.md +95 -0
  23. bibsync-0.3.1/docs/security.md +4 -0
  24. bibsync-0.3.1/docs/user-guide/examples.md +87 -0
  25. bibsync-0.3.1/docs/user-guide/installation.md +100 -0
  26. bibsync-0.3.1/docs/user-guide/pre-commit.md +123 -0
  27. bibsync-0.3.1/docs/user-guide/providers.md +89 -0
  28. bibsync-0.3.1/docs/user-guide/usage.md +218 -0
  29. bibsync-0.3.1/examples/README.md +48 -0
  30. bibsync-0.3.1/examples/greet.rs +12 -0
  31. bibsync-0.3.1/examples/inspire-main.bib +31 -0
  32. bibsync-0.3.1/examples/inspire-main.tex +14 -0
  33. bibsync-0.3.1/examples/main.bib +56 -0
  34. bibsync-0.3.1/examples/main.tex +17 -0
  35. bibsync-0.3.1/pyproject.toml +60 -0
  36. bibsync-0.3.1/python/bibsync/__init__.py +18 -0
  37. bibsync-0.3.1/python/bibsync/__init__.pyi +29 -0
  38. bibsync-0.3.1/python/bibsync/__main__.py +7 -0
  39. bibsync-0.3.1/python/bibsync/py.typed +0 -0
  40. bibsync-0.3.1/renovate.json +85 -0
  41. bibsync-0.3.1/rust-toolchain.toml +3 -0
  42. bibsync-0.3.1/scripts/pre-commit-bibsync +68 -0
  43. bibsync-0.3.1/setup_repo.sh +48 -0
  44. bibsync-0.3.1/src/cli.rs +188 -0
  45. bibsync-0.3.1/src/lib.rs +1626 -0
  46. bibsync-0.3.1/src/main.rs +5 -0
  47. bibsync-0.3.1/src/python.rs +112 -0
  48. bibsync-0.3.1/tests/cli.rs +73 -0
  49. bibsync-0.3.1/tests/examples.rs +59 -0
  50. bibsync-0.3.1/tests/python/test_bindings.py +63 -0
  51. bibsync-0.3.1/uv.lock +158 -0
  52. bibsync-0.3.1/zensical.toml +63 -0
@@ -0,0 +1,136 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug
4
+ target
5
+ dist
6
+ # Environments
7
+ .env
8
+ .venv
9
+ env/
10
+ venv/
11
+ ENV/
12
+ env.bak/
13
+ venv.bak/
14
+ .ruff_cache
15
+
16
+ # These are backup files generated by rustfmt
17
+ **/*.rs.bk
18
+
19
+ # MSVC Windows builds of rustc generate these, which store debugging information
20
+ *.pdb
21
+
22
+ # Generated by cargo mutants
23
+ # Contains mutation testing data
24
+ **/mutants.out*/
25
+
26
+ # RustRover
27
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
28
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
29
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
30
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
31
+ #.idea/
32
+
33
+ # LaTeX build products generated while validating examples.
34
+ examples/*.aux
35
+ examples/*.bbl
36
+ examples/*.blg
37
+ examples/*.fdb_latexmk
38
+ examples/*.fls
39
+ examples/*.log
40
+ examples/*.out
41
+ examples/*.pdf
42
+ examples/*.synctex.gz
43
+
44
+ # Ad hoc provider output examples. The canonical checked fixtures are
45
+ # examples/main.bib and examples/inspire-main.bib.
46
+ examples/generated-*.bib
47
+
48
+ site/
49
+
50
+ *.so
51
+
52
+ # Byte-compiled / optimized / DLL files
53
+ __pycache__/
54
+ *.py[cod]
55
+ *$py.class
56
+
57
+ # C extensions
58
+ *.so
59
+
60
+ # Distribution / packaging
61
+ .Python
62
+ build/
63
+ develop-eggs/
64
+ dist/
65
+ downloads/
66
+ eggs/
67
+ .eggs/
68
+ lib/
69
+ lib64/
70
+ parts/
71
+ sdist/
72
+ var/
73
+ wheels/
74
+ pip-wheel-metadata/
75
+ share/python-wheels/
76
+ *.egg-info/
77
+ .installed.cfg
78
+ *.egg
79
+ MANIFEST
80
+
81
+ # PyInstaller
82
+ # Usually these files are written by a python script from a template
83
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
84
+ *.manifest
85
+ *.spec
86
+
87
+ # Installer logs
88
+ pip-log.txt
89
+ pip-delete-this-directory.txt
90
+
91
+ # Unit test / coverage reports
92
+ htmlcov/
93
+ .tox/
94
+ .nox/
95
+ .coverage
96
+ .coverage.*
97
+ .cache
98
+ nosetests.xml
99
+ coverage.xml
100
+ *.cover
101
+ *.py,cover
102
+ .hypothesis/
103
+ .pytest_cache/
104
+
105
+ # Translations
106
+ *.mo
107
+ *.pot
108
+
109
+ # Django stuff:
110
+ *.log
111
+ local_settings.py
112
+ db.sqlite3
113
+ db.sqlite3-journal
114
+
115
+ # Flask stuff:
116
+ instance/
117
+ .webassets-cache
118
+
119
+ # Scrapy stuff:
120
+ .scrapy
121
+
122
+ # Sphinx documentation
123
+ docs/_build/
124
+
125
+ # PyBuilder
126
+ target/
127
+
128
+ # Jupyter Notebook
129
+ .ipynb_checkpoints
130
+
131
+ # IPython
132
+ profile_default/
133
+ ipython_config.py
134
+
135
+ # pyenv
136
+ .python-version
@@ -0,0 +1,7 @@
1
+ default: true
2
+ MD013:
3
+ line_length: 120
4
+ code_blocks: false
5
+ tables: false
6
+ MD033: false
7
+ MD041: false
@@ -0,0 +1,75 @@
1
+ ci:
2
+ # pre-commit.ci does not install a Rust toolchain. Keep Cargo checks in
3
+ # GitHub Actions CI and run these hooks locally where rustup/cargo exist.
4
+ skip: [fmt, cargo-check, clippy]
5
+
6
+ repos:
7
+ - repo: https://github.com/pre-commit/pre-commit-hooks
8
+ rev: v6.0.0
9
+ hooks:
10
+ - id: check-added-large-files
11
+ - id: check-case-conflict
12
+ - id: check-merge-conflict
13
+ - id: check-symlinks
14
+ - id: check-yaml
15
+ - id: check-toml
16
+ - id: check-json
17
+ - id: end-of-file-fixer
18
+ - id: mixed-line-ending
19
+ - id: trailing-whitespace
20
+
21
+ - repo: https://github.com/doublify/pre-commit-rust
22
+ rev: v1.0
23
+ hooks:
24
+ - id: fmt
25
+ args: [--all]
26
+ pass_filenames: false
27
+ - id: cargo-check
28
+ pass_filenames: false
29
+ - id: clippy
30
+ args: [--all-targets, --all-features, --, -D, warnings]
31
+ pass_filenames: false
32
+
33
+ - repo: https://github.com/astral-sh/ruff-pre-commit
34
+ rev: v0.15.15
35
+ hooks:
36
+ - id: ruff
37
+ args: [--fix, --config=pyproject.toml]
38
+ - id: ruff-format
39
+
40
+ - repo: https://github.com/astral-sh/uv-pre-commit
41
+ rev: 0.11.17
42
+ hooks:
43
+ - id: uv-lock
44
+
45
+ - repo: https://github.com/rhysd/actionlint
46
+ rev: v1.7.12
47
+ hooks:
48
+ - id: actionlint
49
+
50
+ - repo: https://github.com/ComPWA/taplo-pre-commit
51
+ rev: v0.9.3
52
+ hooks:
53
+ - id: taplo-format
54
+
55
+ - repo: https://github.com/crate-ci/typos
56
+ rev: v1.47.0
57
+ hooks:
58
+ - id: typos
59
+ args: []
60
+
61
+ - repo: https://github.com/rbubley/mirrors-prettier
62
+ rev: v3.8.3
63
+ hooks:
64
+ - id: prettier
65
+
66
+ - repo: https://github.com/DavidAnson/markdownlint-cli2
67
+ rev: v0.22.1
68
+ hooks:
69
+ - id: markdownlint-cli2
70
+ args: [--config, .markdownlint.yaml]
71
+
72
+ - repo: https://github.com/gitleaks/gitleaks
73
+ rev: v8.30.1
74
+ hooks:
75
+ - id: gitleaks
@@ -0,0 +1,12 @@
1
+ - id: bibsync
2
+ name: bibsync
3
+ description: Synchronize BibTeX entries from TeX citation keys
4
+ entry: bibsync
5
+ language: rust
6
+ types_or: [tex, bib]
7
+ - id: bibsync-bin
8
+ name: bibsync
9
+ description: Synchronize BibTeX entries using a pre-built release binary
10
+ entry: scripts/pre-commit-bibsync
11
+ language: script
12
+ types_or: [tex, bib]
@@ -0,0 +1,5 @@
1
+ {
2
+ "printWidth": 100,
3
+ "tabWidth": 4,
4
+ "useTabs": false
5
+ }
@@ -0,0 +1,2 @@
1
+ [default]
2
+ extend-ignore-re = ["cafebabe"]
@@ -0,0 +1,13 @@
1
+ cff-version: 1.2.0
2
+ title: "bibsync: A Rust package to automatically resolve, synchronize, and validate LaTeX citations across BibTeX databases"
3
+ license: "BSD-3-Clause"
4
+ type: software
5
+ authors:
6
+ - given-names: Isaac C. F.
7
+ family-names: Wong
8
+ affiliation: KU Leuven
9
+ orcid: "https://orcid.org/0000-0003-2166-0027"
10
+ keywords:
11
+ - rust
12
+ - github
13
+ - template
@@ -0,0 +1,131 @@
1
+ i# Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at [INSERT CONTACT
63
+ METHOD]. All complaints will be reviewed and investigated promptly and fairly.
64
+
65
+ All community leaders are obligated to respect the privacy and security of the
66
+ reporter of any incident.
67
+
68
+ ## Enforcement Guidelines
69
+
70
+ Community leaders will follow these Community Impact Guidelines in determining
71
+ the consequences for any action they deem in violation of this Code of Conduct:
72
+
73
+ ### 1. Correction
74
+
75
+ **Community Impact**: Use of inappropriate language or other behavior deemed
76
+ unprofessional or unwelcome in the community.
77
+
78
+ **Consequence**: A private, written warning from community leaders, providing
79
+ clarity around the nature of the violation and an explanation of why the
80
+ behavior was inappropriate. A public apology may be requested.
81
+
82
+ ### 2. Warning
83
+
84
+ **Community Impact**: A violation through a single incident or series of
85
+ actions.
86
+
87
+ **Consequence**: A warning with consequences for continued behavior. No
88
+ interaction with the people involved, including unsolicited interaction with
89
+ those enforcing the Code of Conduct, for a specified period of time. This
90
+ includes avoiding interactions in community spaces as well as external channels
91
+ like social media. Violating these terms may lead to a temporary or permanent
92
+ ban.
93
+
94
+ ### 3. Temporary Ban
95
+
96
+ **Community Impact**: A serious violation of community standards, including
97
+ sustained inappropriate behavior.
98
+
99
+ **Consequence**: A temporary ban from any sort of interaction or public
100
+ communication with the community for a specified period of time. No public or
101
+ private interaction with the people involved, including unsolicited interaction
102
+ with those enforcing the Code of Conduct, is allowed during this period.
103
+ Violating these terms may lead to a permanent ban.
104
+
105
+ ### 4. Permanent Ban
106
+
107
+ **Community Impact**: Demonstrating a pattern of violation of community
108
+ standards, including sustained inappropriate behavior, harassment of an
109
+ individual, or aggression toward or disparagement of classes of individuals.
110
+
111
+ **Consequence**: A permanent ban from any sort of public interaction within the
112
+ community.
113
+
114
+ ## Attribution
115
+
116
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117
+ version 2.1, available at
118
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
119
+
120
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
121
+ enforcement ladder][Mozilla CoC].
122
+
123
+ For answers to common questions about this code of conduct, see the FAQ at
124
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
125
+ [https://www.contributor-covenant.org/translations][translations].
126
+
127
+ [homepage]: https://www.contributor-covenant.org
128
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
129
+ [Mozilla CoC]: https://github.com/mozilla/diversity
130
+ [FAQ]: https://www.contributor-covenant.org/faq
131
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,37 @@
1
+ # Contributing to bibsync
2
+
3
+ 🎉 Thank you for your interest in contributing to `bibsync`.
4
+
5
+ ## Development
6
+
7
+ 1. Fork and clone the repository.
8
+ 2. Install the stable Rust toolchain with `rustup`.
9
+ 3. Install optional local tools:
10
+
11
+ ```shell
12
+ cargo install cargo-deny cargo-audit cargo-nextest git-cliff
13
+ pipx install pre-commit
14
+ ```
15
+
16
+ 4. Install hooks:
17
+
18
+ ```shell
19
+ pre-commit install
20
+ ```
21
+
22
+ 5. Run the local checks:
23
+
24
+ ```shell
25
+ cargo fmt --all --check
26
+ cargo clippy --all-targets --all-features -- -D warnings
27
+ cargo test --all-features
28
+ pytest
29
+ ```
30
+
31
+ Use Conventional Commits for commit messages and pull request titles. The
32
+ changelog is generated with `git-cliff`.
33
+
34
+ ## Licensing
35
+
36
+ By contributing, you agree that your contributions will be licensed under the
37
+ project's 3-Clause BSD License.