Contributing#
Development setup#
Clone the repository:
git clone https://github.com/opencitations/oc_meta.git
cd oc_meta
Install dependencies with UV:
uv sync
Start test databases:
./test/start-test-databases.sh
Run tests to verify setup:
uv run coverage run --rcfile=test/coverage/.coveragerc
Code style#
Python 3.10+ compatible
Type hints where practical
Follow existing code patterns
Commit messages#
Use conventional commits:
feat: add new identifier schema support
fix: correct ORCID checksum validation
docs: update configuration reference
refactor: simplify curator logic
test: add tests for edge cases
Types:
Type |
Description |
|---|---|
|
New feature |
|
Bug fix |
|
Documentation |
|
Code change that doesn’t fix bug or add feature |
|
Adding or updating tests |
|
Maintenance tasks |
Pull requests#
Create a branch from
masterMake your changes
Run tests locally
Push and open a pull request
Wait for CI checks to pass
Request review
Release process#
The project uses semantic-release for automated versioning and publishing.
Creating a release#
Make your changes with conventional commits
Include
[release]in the final commit messagePush to master
git commit -m "feat: add new feature [release]"
git push origin master
What happens automatically#
Tests run via GitHub Actions
If tests pass and commit contains
[release]:semantic-release determines version bump from commits
CHANGELOG.md is updated
GitHub release is created
Package is built and published to PyPI
Version bumping#
Commit type |
Version bump |
|---|---|
|
Patch (1.0.0 → 1.0.1) |
|
Minor (1.0.0 → 1.1.0) |
|
Major (1.0.0 → 2.0.0) |
Project structure#
oc_meta/
├── core/ # Curator, Creator
├── lib/ # Utilities (finder, cleaner, file_manager)
├── plugins/ # Multiprocess, editor, csv_generator
└── run/ # CLI scripts
├── fixer/ # Data repair tools
├── merge/ # Find duplicates and merge entities
├── meta/ # Processing scripts
├── patches/ # hasNext anomalies and fixer
└── upload/ # Triplestore upload
test/ # Test files
docs/ # Documentation (this site)
Adding new features#
New identifier schema#
Add validation logic to
oc_meta/lib/cleaner.pyAdd schema to
master_of_regex.pyUpdate
oc_meta/core/curator.pyif neededAdd tests to
test/cleaner_test.pyUpdate documentation
New CLI script#
Create script in appropriate
oc_meta/run/subdirectoryAdd argument parsing with argparse
Add tests
Document in this site
New fixer#
Create in
oc_meta/run/fixer/Follow existing patterns (dry-run support, provenance tracking)
Add tests
Document in patches section
Getting help#
GitHub Issues - Bug reports and feature requests
OpenCitations - Project information