-
Notifications
You must be signed in to change notification settings - Fork 136
Replace Sphinx docs with MkDocs Material #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 18 commits
c3a97de
5594559
8908ed4
1b4491f
c3e84e6
01c3f5f
813b482
3f3348a
570840b
d27ad22
01e2c44
a966bfa
0747f9c
daa6776
51f60bd
d417b98
f7e5e15
a5b00e8
a75f9a8
af6c2e9
178bb76
747e7d2
fc68f8c
d49ca6d
8d5417f
d9d6035
7de8a94
df2cd9a
ee797ac
54105bb
c612d48
09e509c
4cca153
2a86785
1d7079c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
| 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@v5 | ||
Check failureCode scanning / zizmor unpinned action reference: action is not pinned to a hash (required by blanket policy) Error
unpinned action reference: action is not pinned to a hash (required by blanket policy)
|
||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@v6 | ||
Check failureCode scanning / zizmor unpinned action reference: action is not pinned to a hash (required by blanket policy) Error
unpinned action reference: action is not pinned to a hash (required by blanket policy)
|
||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| 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@v3 | ||
Check failureCode scanning / zizmor unpinned action reference: action is not pinned to a hash (required by blanket policy) Error
unpinned action reference: action is not pinned to a hash (required by blanket policy)
|
||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| 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@v4 | ||
Check failureCode scanning / zizmor unpinned action reference: action is not pinned to a hash (required by blanket policy) Error
unpinned action reference: action is not pinned to a hash (required by blanket policy)
|
||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| 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: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # API Reference | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was generated using some tool? |
||
|
|
||
| This page lists the public APIs that are intended for direct user code. PyLD | ||
| also contains internal processor classes and helper functions that are not | ||
| documented here. | ||
|
|
||
| ## Module `pyld.jsonld` | ||
|
|
||
| ### `compact(input_, ctx, options=None)` | ||
|
|
||
| Compact a JSON-LD document using the provided context. | ||
|
|
||
| ### `expand(input_, options=None, on_property_dropped=noop)` | ||
|
|
||
| Expand a JSON-LD document, removing context aliases and producing expanded | ||
| JSON-LD form. `on_property_dropped` can be used to observe or reject properties | ||
| that do not expand to absolute IRIs. | ||
|
|
||
| ### `flatten(input_, ctx=None, options=None)` | ||
|
|
||
| Flatten a JSON-LD document. If `ctx` is supplied, compact the flattened output | ||
| with that context. | ||
|
|
||
| ### `frame(input_, frame, options=None)` | ||
|
|
||
| Frame a JSON-LD document according to the supplied frame. | ||
|
|
||
| ### `link(input_, ctx, options=None)` | ||
|
|
||
| Experimentally link a JSON-LD document's nodes in memory. This is equivalent to | ||
| framing with `@embed: @link`. | ||
|
|
||
| ### `normalize(input_, options=None)` | ||
|
|
||
| Normalize a JSON-LD document. Common options include `algorithm` and `format`. | ||
| Use `{"algorithm": "URDNA2015", "format": "application/n-quads"}` to produce | ||
| canonical N-Quads. | ||
|
|
||
| ### `from_rdf(input_, options=None)` | ||
|
|
||
| Convert RDF input to JSON-LD. | ||
|
|
||
| ### `to_rdf(input_, options=None)` | ||
|
|
||
| Convert JSON-LD input to RDF dataset form. | ||
|
|
||
| ### `set_document_loader(load_document_)` | ||
|
|
||
| Set the global document loader callable. | ||
|
|
||
| ### `get_document_loader()` | ||
|
|
||
| Return the current global document loader callable. | ||
|
|
||
| ### `load_document(url, options, base=None, profile=None, request_profile=None)` | ||
|
|
||
| Load a remote document using the configured or supplied document loader. | ||
|
|
||
| ### `requests_document_loader(**kwargs)` | ||
|
|
||
| Create a `requests`-based document loader. Pass `secure=True` to require HTTPS. | ||
| Other keyword arguments are forwarded to `requests.get()`. | ||
|
|
||
| ### `aiohttp_document_loader(**kwargs)` | ||
|
|
||
| Create an `aiohttp`-based document loader. Pass `secure=True` to require HTTPS. | ||
| Other keyword arguments are forwarded to `aiohttp` request calls. | ||
|
|
||
| ### `register_rdf_parser(content_type, parser)` | ||
|
|
||
| Register an RDF parser for a content type. | ||
|
|
||
| ### `unregister_rdf_parser(content_type)` | ||
|
|
||
| Remove a registered RDF parser for a content type. | ||
|
|
||
| ### `parse_link_header(header)` | ||
|
|
||
| Parse an HTTP `Link` header. | ||
|
|
||
| ### `JsonLdProcessor` | ||
|
|
||
| Processor class behind the module-level convenience functions. Most callers use | ||
| the module-level functions directly. | ||
|
|
||
| ### `JsonLdError` | ||
|
|
||
| Exception type raised for JSON-LD processing and loading errors. | ||
|
|
||
| ### `ContextResolver` | ||
|
|
||
| Context resolver that can be supplied in operation options for custom context | ||
| loading and caching behavior. | ||
|
|
||
| ### `freeze(value)` | ||
|
|
||
| Return an immutable mapping for dictionary values. This is used by PyLD's | ||
| context caches. | ||
|
|
||
| ## Top-Level Exports | ||
|
|
||
| ### `jsonld` | ||
|
|
||
| The main JSON-LD processing module. | ||
|
|
||
| ### `DocumentLoader` | ||
|
|
||
| Abstract base class for class-based document loaders. PyLD still accepts any | ||
| callable with the loader signature. | ||
|
|
||
| ### `RemoteDocument` | ||
|
|
||
| Typed mapping shape returned by document loaders. | ||
|
|
||
| ### `RequestsDocumentLoader` | ||
|
|
||
| Class-based remote document loader implemented with `requests`. | ||
|
|
||
| ### `AioHttpDocumentLoader` | ||
|
|
||
| Class-based remote document loader implemented with `aiohttp`. | ||
|
|
||
| ### `FrozenDocumentLoader` | ||
|
|
||
| Allowlist-only document loader for deployments that must not fetch arbitrary | ||
| remote contexts. | ||
|
|
||
| ### `BUNDLED_CONTEXTS` | ||
|
|
||
| Mapping of selected common JSON-LD context URLs to bundled local context files. | ||
|
|
||
| ### `ContextResolver` | ||
|
|
||
| Context resolver that can be supplied in operation options for custom context | ||
| loading and caching behavior. | ||
Uh oh!
There was an error while loading. Please reload this page.