Want to contribute to PyLD? Great! Here are a few notes:
- In general, follow the common PEP 8 Style Guide.
- Try to make the code pass flake8 checks.
flake8 lib/pyld/jsonld.py
- Use version X.Y.Z-dev in dev mode.
- Use version X.Y.Z for releases.
- Follow the Semantic Versioning guidelines.
$EDITOR CHANGELOG.md
: update CHANGELOG with new notes, version, and date.- commit changes
$EDITOR lib/pyld/__about__.py
: update to release version and remove-dev
suffix.git commit CHANGELOG.md lib/pyld/__about__.py -m "Release {version}."
git tag {version}
$EDITOR lib/pyld/__about__.py
: update to next version and add-dev
suffix.git commit lib/pyld/__about__.py -m "Start {next-version}."
git push --tags
To ensure a clean package upload to PyPI, use a clean checkout, and run the following:
- For more info, look at the packaging guide.
- Setup an API token. Recommend using a specific "PyLD" token and set it up as a "repository" in your ~/.pypirc for use in the upload command.
- The below builds and uploads a sdist and wheel. Adjust as needed depending on how you manage and clean "dist/" dir files.
git checkout {version}
python3 -m build
twine check dist/*
twine upload -r PyLD dist/*
As of early 2020, the process to generate an EARL report for the official JSON-LD Processor Conformance page is:
- Run the tests on the
json-ld-api
andjson-ld-framing
test repos to generate a.jsonld
test report:python tests/runtests.py ../json-ld-api/tests/ ../json-ld-framing/tests/ -e pyld-earl.jsonld
- Use the rdf tool to generate a
.ttl
:rdf serialize pyld-earl.jsonld --output-format turtle -o pyld-earl.ttl
- Optionally follow the report instructions to generate the HTML report for inspection.
- Submit a PR to the json-ld-api repository with at least the
.ttl
: