Skip to content

Latest commit

 

History

History
80 lines (54 loc) · 2.84 KB

File metadata and controls

80 lines (54 loc) · 2.84 KB

Contributing to PyLD

Want to contribute to PyLD? Great! Here are a few notes:

Code

  • In general, follow the common PEP 8 Style Guide.

  • Try to make the code pass ruff checks.

    • make lint or ruff check lib/pyld/*
    • You can also apply automatic fixing and formatting using make fmt
  • Use version X.Y.Z-dev in dev mode.

  • Use version X.Y.Z for releases.

Documentation

The public documentation site is built with MkDocs Material.

  • Install documentation dependencies:

    • make docs-install
  • Build the site:

    • make docs-build
  • Preview documentation locally:

    • make docs-serve (override port with PORT=8008 make docs-serve)
  • Refresh bundled JSON-LD context files:

    • make download-bundled-contexts

Versioning

Release Process

  • $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/*

Implementation Report Process

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 and json-ld-framing test repos to generate a .jsonld test report as explained in README.md

  • 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.