Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c3a97de
Add MkDocs Material configuration
anatoly-scherbakov Jun 1, 2026
5594559
Use MkDocs Material for documentation dependencies
anatoly-scherbakov Jun 1, 2026
8908ed4
Add documentation homepage
anatoly-scherbakov Jun 1, 2026
1b4491f
Add installation documentation
anatoly-scherbakov Jun 1, 2026
c3e84e6
Add JSON-LD quick examples documentation
anatoly-scherbakov Jun 1, 2026
01c3f5f
Add document loader overview documentation
anatoly-scherbakov Jun 1, 2026
813b482
Document RequestsDocumentLoader usage
anatoly-scherbakov Jun 1, 2026
3f3348a
Document AioHttpDocumentLoader usage
anatoly-scherbakov Jun 1, 2026
570840b
Document FrozenDocumentLoader usage
anatoly-scherbakov Jun 1, 2026
d27ad22
Add manual public API reference
anatoly-scherbakov Jun 1, 2026
01e2c44
Add documentation deployment workflow
anatoly-scherbakov Jun 1, 2026
a966bfa
Add MkDocs serve target
anatoly-scherbakov Jun 1, 2026
0747f9c
Document MkDocs contributor commands
anatoly-scherbakov Jun 1, 2026
daa6776
Ignore MkDocs site output
anatoly-scherbakov Jun 1, 2026
51f60bd
Remove Sphinx docs Makefile
anatoly-scherbakov Jun 1, 2026
d417b98
Remove Sphinx docs configuration
anatoly-scherbakov Jun 1, 2026
f7e5e15
Remove Sphinx docs index
anatoly-scherbakov Jun 1, 2026
a5b00e8
Remove Sphinx Windows build script
anatoly-scherbakov Jun 1, 2026
a75f9a8
Build documentation on every branch push
anatoly-scherbakov Jun 1, 2026
af6c2e9
Pin documentation workflow actions
anatoly-scherbakov Jun 1, 2026
178bb76
Add documentation macros module
anatoly-scherbakov Jun 1, 2026
747e7d2
Add MkDocs macros dependency
anatoly-scherbakov Jun 1, 2026
fc68f8c
Enable MkDocs macros plugin
anatoly-scherbakov Jun 1, 2026
d49ca6d
Render bundled contexts in frozen loader docs
anatoly-scherbakov Jun 1, 2026
8d5417f
Import bundled contexts in docs macro
anatoly-scherbakov Jun 1, 2026
d9d6035
Install runtime dependencies for docs macros
anatoly-scherbakov Jun 1, 2026
7de8a94
Convert README from rst to md and update the contents.
mielvds Jun 9, 2026
df2cd9a
Add README in markdown
mielvds Jun 9, 2026
ee797ac
Change symbolic link README.txt
mielvds Jun 9, 2026
54105bb
Wrap markdown at 80 ch
mielvds Jun 9, 2026
c612d48
Convert CONTRIBUTING to markdown
mielvds Jun 10, 2026
09e509c
Update README.md
mielvds Jun 10, 2026
4cca153
Update README.md
mielvds Jun 10, 2026
2a86785
Remove trailing links in contributing.md
mielvds Jun 10, 2026
1d7079c
Adjust changelog
mielvds Jun 10, 2026
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
55 changes: 55 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Documentation

on:
push:
pull_request:
branches:
- '**'

permissions: {}

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.14'
cache: 'pip'
- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build documentation
run: mkdocs build --strict
- name: Upload Pages artifact
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: site

deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ build
cover
dist
docs/_build
site/
Comment thread
mielvds marked this conversation as resolved.
lib/PyLD.egg-info
profiler
tests/test_caching.py
Expand Down
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`.
76 changes: 0 additions & 76 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
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.PHONY: install test upgrade-submodules download-bundled-contexts
.PHONY: install test serve upgrade-submodules download-bundled-contexts

install:
pip install -e .

test:
pytest --cov=pyld

serve:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can serve the docs from make, I'd expect you can build them too (including installing the deps).

mkdocs serve --dev-addr 127.0.0.1:8008

upgrade-submodules:
git submodule update --remote --init --recursive

Expand Down
Loading