Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Agent guidelines

Read [CONTRIBUTING.rst](CONTRIBUTING.rst) for code style, linting (e.g. `make lint`, `make fmt`), and release process.
Read [CONTRIBUTING.md](CONTRIBUTING.md) for code style, linting (e.g. `make lint`, `make fmt`), and release process.

## Testing

Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
class-based `DocumentLoader` instances while preserving the existing
callable factory API. The concrete `RequestsDocumentLoader` and
`AioHttpDocumentLoader` classes are also importable from `pyld`.
- Convert `./README.rst` and `./CONTRIBUTING.rst` (reStructuredText) to
`./README.md` and `./CONTRIBUTING.md` (markdown). Also update their
contents to reflect the current state of the repo.

### Added
- `pyld.DocumentLoader` abstract base class for class-based document loaders,
Expand Down Expand Up @@ -258,7 +261,7 @@
- **1.0.0**!
- [Semantic Versioning](https://semver.org/) is now past the "initial
development" 0.x.y stage (after 6+ years!).
- [Conformance](README.rst#conformance):
- [Conformance](README.md#conformance):
- JSON-LD 1.0 + JSON-LD 1.0 errata
- JSON-LD 1.1 drafts
- Thanks to the JSON-LD and related communities and the many many people over
Expand Down
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Contributing to PyLD

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

## Code

* In general, follow the common [PEP 8 Style Guide](https://www.python.org/dev/peps/pep-0008/).
* Try to make the code pass [ruff](https://docs.astral.sh/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:

* `pip install -r docs/requirements.txt`

* Preview documentation locally:

* `mkdocs serve`

* Check documentation before submitting changes:

* `mkdocs build --strict`

* Refresh bundled JSON-LD context files:

* `make download-bundled-contexts`

## Versioning

* Follow the [Semantic Versioning](https://semver.org/) guidelines.

## 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](https://pypi.org/project/PyLD/) upload to [PyPI](https://pypi.org/),
use a clean checkout, and run the following:

* For more info, look at the packaging
[guide](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/).
* Setup an [API token](https://pypi.org/help/#apitoken). Recommend using a
specific "PyLD" token and set it up as a "repository" in your
[`~/.pypirc`](https://packaging.python.org/en/latest/specifications/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](https://w3c.github.io/json-ld-api/reports/) 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](./README.md#tests)
* Use the [rdf](https://rubygems.org/gems/rdf) tool to generate a `.ttl`:

* `rdf serialize pyld-earl.jsonld --output-format turtle -o pyld-earl.ttl`

* Optionally follow the [report instructions](https://github.com/w3c/json-ld-api/tree/master/reports) to generate the HTML report for inspection.
* Submit a PR to the [json-ld-api repository](https://github.com/w3c/json-ld-api/pulls) with at least the `.ttl`.
97 changes: 0 additions & 97 deletions CONTRIBUTING.rst

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.rst README.txt LICENSE CHANGELOG.md
include README.md README.txt LICENSE CHANGELOG.md
recursive-include lib/pyld/documentloader/frozen/bundled *.jsonld
Loading
Loading