-
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
Open
anatoly-scherbakov
wants to merge
35
commits into
master
Choose a base branch
from
docs/mkdocs-material
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 5594559
Use MkDocs Material for documentation dependencies
anatoly-scherbakov 8908ed4
Add documentation homepage
anatoly-scherbakov 1b4491f
Add installation documentation
anatoly-scherbakov c3e84e6
Add JSON-LD quick examples documentation
anatoly-scherbakov 01c3f5f
Add document loader overview documentation
anatoly-scherbakov 813b482
Document RequestsDocumentLoader usage
anatoly-scherbakov 3f3348a
Document AioHttpDocumentLoader usage
anatoly-scherbakov 570840b
Document FrozenDocumentLoader usage
anatoly-scherbakov d27ad22
Add manual public API reference
anatoly-scherbakov 01e2c44
Add documentation deployment workflow
anatoly-scherbakov a966bfa
Add MkDocs serve target
anatoly-scherbakov 0747f9c
Document MkDocs contributor commands
anatoly-scherbakov daa6776
Ignore MkDocs site output
anatoly-scherbakov 51f60bd
Remove Sphinx docs Makefile
anatoly-scherbakov d417b98
Remove Sphinx docs configuration
anatoly-scherbakov f7e5e15
Remove Sphinx docs index
anatoly-scherbakov a5b00e8
Remove Sphinx Windows build script
anatoly-scherbakov a75f9a8
Build documentation on every branch push
anatoly-scherbakov af6c2e9
Pin documentation workflow actions
anatoly-scherbakov 178bb76
Add documentation macros module
anatoly-scherbakov 747e7d2
Add MkDocs macros dependency
anatoly-scherbakov fc68f8c
Enable MkDocs macros plugin
anatoly-scherbakov d49ca6d
Render bundled contexts in frozen loader docs
anatoly-scherbakov 8d5417f
Import bundled contexts in docs macro
anatoly-scherbakov d9d6035
Install runtime dependencies for docs macros
anatoly-scherbakov 7de8a94
Convert README from rst to md and update the contents.
mielvds df2cd9a
Add README in markdown
mielvds ee797ac
Change symbolic link README.txt
mielvds 54105bb
Wrap markdown at 80 ch
mielvds c612d48
Convert CONTRIBUTING to markdown
mielvds 09e509c
Update README.md
mielvds 4cca153
Update README.md
mielvds 2a86785
Remove trailing links in contributing.md
mielvds 1d7079c
Adjust changelog
mielvds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ build | |
| cover | ||
| dist | ||
| docs/_build | ||
| site/ | ||
| lib/PyLD.egg-info | ||
| profiler | ||
| tests/test_caching.py | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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`. |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.