diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9a0e79c3..68135d1c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,7 +6,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: [3.11] steps: # git checkout diff --git a/.meta.toml b/.meta.toml index d0ae1c53..79351086 100644 --- a/.meta.toml +++ b/.meta.toml @@ -79,17 +79,15 @@ allowlist_externals = [testenv:plone6docs] # New docs with sphinx-book-theme # See [testenv:docs] for classic documentation -basepython = python3.9 +basepython = python3.11 skip_install = False -usedevelop = True +package = editable allowlist_externals = mkdir extras = tests - deps = -r requirements-docs.txt - commands = python -VV mkdir -p {toxinidir}/_build/plone6docs @@ -116,9 +114,9 @@ whitelist_externals = mkdir [testenv:linkcheck] -basepython = python +basepython = python3.11 skip_install = False -usedevelop = True +package = editable allowlist_externals = mkdir extras = diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 505f3ce7..116ef6d3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1 +1 @@ -Please see https://5.docs.plone.org/develop/coredev/docs/guidelines.html +Please see [Contributing to Plone](https://6.docs.plone.org/contributing/index.html) and [Contributing to `plone.api`](https://6.docs.plone.org/plone.api/contribute/index.html). diff --git a/Makefile b/Makefile deleted file mode 100644 index 31094091..00000000 --- a/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -SHELL := /bin/bash -CURRENT_DIR:="$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))" - -version = 3 - -# We like colors -# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects -RED=`tput setaf 1` -GREEN=`tput setaf 2` -RESET=`tput sgr0` -YELLOW=`tput setaf 3` - - -# all: .installed.cfg - -# Add the following 'help' target to your Makefile -# And add help text after each target name starting with '\#\#' -.PHONY: help -help: ## This help message - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - - - -bin/python bin/pip: - python$(version) -m venv . || virtualenv --python=python$(version) . - bin/python -m pip install --upgrade pip - - -# Documentation -# ---------------------------------------------------------------------- - -# TODO Remove complete Makefile when Netlify build command is switched from 'make netlify' to 'tox -e docs'. - -# Just a developer helper. Can be replaced by 'tox -e docs' ('tox -e plone6docs') -.PHONY: docs-html -docs-html: bin/python bin/pip ## Build documentation - bin/pip install tox - bin/tox -e plone6docs - @echo - @echo "Build of documentation finished. The HTML pages are in _build/plone6docs/html." - -.PHONY: livehtml -livehtml: - sphinx-autobuild -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html $(O) - -# TODO Remove when Netlify build command is switched from 'make netlify' to 'tox -e docs'. -.PHONY: netlify -netlify: bin/python bin/pip ## Build documentation (Netlfy style) - bin/pip install tox - bin/tox -e plone6docs - @echo - @echo "Build of documentation finished. The HTML pages are in _build/plone6docs/html." - -## Run conversion of documentation from restructuredText to myST -# TODO Remove later when MyST documentation is settled. -.PHONY: conversion-to-myst -conversion-to-myst: bin/python bin/pip - bin/pip install "rst-to-myst[sphinx]" - -bin/rst2myst convert -R docs/*.rst - -bin/rst2myst convert -R docs/**/*.rst - python fix-converted-myst.py - make netlify diff --git a/README.md b/README.md index ec224189..481eec7e 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,7 @@ Recipes try to assume the user does not have extensive knowledge about Plone int Contributors - Please read the document [Process for Plone core's development](https://5.docs.plone.org/develop/coredev/docs/index.html). - Also consult the section about contribution in the [plone.api contributors documentation](https://5.docs.plone.org/develop/plone.api/docs/contribute/index.html). + Please read [Contributing to Plone](https://6.docs.plone.org/contributing/index.html) and [Contributing to `plone.api`](https://6.docs.plone.org/plone.api/contribute/index.html). Source Code at the [Plone code repository hosted at GitHub](https://github.com/plone/plone.api). diff --git a/docs/conf.py b/docs/conf.py index 9492f0a8..c20fbc67 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,13 +16,14 @@ } extensions = [ - "sphinx.ext.doctest", - "sphinx.ext.coverage", + "myst_parser", "sphinx.ext.autodoc", - "sphinx.ext.viewcode", "sphinx.ext.autosummary", - "myst_parser", + "sphinx.ext.coverage", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", "sphinx.ext.todo", + "sphinx.ext.viewcode", ] master_doc = "index" @@ -67,11 +68,12 @@ def __getattr__(cls, name): sys.modules[mod_name] = Mock() -# -- Options for myST markdown conversion to html ----------------------------- +# -- Options for MyST markdown conversion to HTML ----------------------------- myst_enable_extensions = [ "colon_fence", "deflist", + "linkify", # Identify "bare" web URLs and add hyperlinks. ] @@ -81,3 +83,25 @@ def __getattr__(cls, name): # a list of builtin themes. # html_theme = "sphinx_book_theme" + + +# -- Intersphinx configuration ---------------------------------- + +# This extension can generate automatic links to the documentation of objects +# in other projects. Usage is simple: whenever Sphinx encounters a +# cross-reference that has no matching target in the current documentation set, +# it looks for targets in the documentation sets configured in +# intersphinx_mapping. A reference like :py:class:`zipfile.ZipFile` can then +# linkto the Python documentation for the ZipFile class, without you having to +# specify where it is located exactly. +# +# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html +# +# Note that Plone Documentation imports documentation from several remote repositories. +# These projects need to build their docs as part of their CI/CD and testing. +# We use Intersphinx to resolve targets when either the individual project's or +# the entire Plone Documentation is built. +intersphinx_mapping = { + "plone": ("https://6.docs.plone.org/", None), # for imported packages + "plone5": ("https://5.docs.plone.org/", None), +} diff --git a/docs/contribute.md b/docs/contribute.md new file mode 100644 index 00000000..b5f869c6 --- /dev/null +++ b/docs/contribute.md @@ -0,0 +1,244 @@ +--- +myst: + html_meta: + "description": "Contribute to plone.api" + "property=og:description": "Contribute to plone.api" + "property=og:title": "Contribute to plone.api" + "keywords": "plone.api, contribute, Plone, API, development" +--- + +# Contribute to `plone.api` + +This section describes how to contribute to the `plone.api` project. +It extends {doc}`plone:contributing/index`. + + +## Pre-requisites + +Prepare your system by installing pre-requisites. + + +### System libraries + +You need to install system libraries, as described in {ref}`plone:plone-pre-requisites-label`, with the exception of GNU make. + + +### tox + +[tox](https://tox.wiki/en/stable/index.html) automates and standardizes testing in Python. +Install tox into your Python user space with the following command. + +```shell +python -m pip install --user tox +``` + +### pre-commit + +`plone.api` uses [pre-commit](https://pre-commit.com/) to automate code quality checks before every commit. + +Install pre-commit either with your system package manager. +Alternatively you can install pre-commit into your Python user. + +```shell +python -m pip install --user pre-commit +``` + +Once installed, set up the git hook scripts to run on every commit. + +```shell +pre-commit install +``` + + +## Create development environment + +After satisfying the pre-requisites, you are ready to create your development environment. +`plone.api` uses `tox` as a wrapper around `coredev.buildout` to simplify development, whereas Plone core uses `coredev.buildout` directly. + +Start by changing your working directory to your project folder, and download the latest `plone.api` source code. + +```shell +cd +git clone https://github.com/plone/plone.api.git +``` + +Next go into the newly created directory, and build your environment. + +```shell +cd plone.api +tox +``` + +Go make some tea while `tox` runs all tasks listed by issuing the command `tox -l`. + +Open `tox.ini` in your code editor to see all configured commands and what they do. +Some helpful `tox` commands are shown below. + +```shell +tox -e py39-plone-60 # run all tests for Python 3.9 and Plone 6 +tox -e plone6docs # build documentation +tox -e livehtml # build, serve, and reload changes to documentation +tox -l # list all tox environments +``` + + +(git-workflow)= + +## git + +Use the following git branches when contributing to `plone.api`. + +feature branches +: All development for a new feature or bug fix must be done on a new branch. + +`master` +: Pull requests should be made from a feature branch against the `master` branch. + When features and bug fixes are complete and approved, they are merged into the `master` branch. + +```{seealso} +{ref}`plone:contributing-core-work-with-git-label` +``` + + +## Continuous integration + +`plone.api` uses GitHub workflows for continuous integration. +On every push to the `master` branch, GitHub runs its workflows for all tests and code quality checks. +GitHub workflows are configured in the directory `.github/workflows` at the root of this package. + + +## Documentation + +For every feature change or addition to `plone.api`, you must add documentation of it. +`plone.api` uses [MyST](https://myst-parser.readthedocs.io/en/latest/) for documentation syntax. + +```{seealso} +{doc}`plone:contributing/documentation/index` +``` + +After adding or modifying documentation, you can build the documentation with the following command. + +```shell +tox -e plone6docs +``` + +Alternatively, you can automatically reload changes to the documentation as you edit it in a web browser. + +```shell +tox -e livehtml +``` + +The [`plone.api` documentation](https://6.docs.plone.org/plone.api) is automatically generated from the documentation source files when its submodule is updated in the [main Plone `documentation` repository](https://github.com/plone/documentation/). + + +## Add a function to an existing module + +This section describes how to add a new function `foo` to `plone.api`. + +The function would go in the module `plone.api.content`, located in the file {file}`src/plone/api/content.py`. + +% invisible-code-block: python +% +% from plone.api.validation import at_least_one_of +% from plone.api.validation import mutually_exclusive_parameters + +```python +@mutually_exclusive_parameters('path', 'UID') +@at_least_one_of('path', 'UID') +def foo(path=None, UID=None): + """Do foo. + + :param path: Path to the object we want to get, + relative to the portal root. + :type path: string + + :param UID: UID of the object we want to get. + :type UID: string + + :returns: String + :raises: + :class:`~plone.api.exc.MissingParameterError`, + :class:`~plone.api.exc.InvalidParameterError` + :Example: :ref:`content-foo-example` + """ + return "foo" +``` + +% invisible-code-block: python +% +% bar = foo('/plone/blog') +% self.assertEqual(bar,"foo") +% +% from plone.api.exc import InvalidParameterError +% self.assertRaises( +% InvalidParameterError, +% lambda: foo("/plone/blog", "abcd001") +% ) + +Add documentation in {file}`docs/api/content.md`. +Narrative documentation should describe what your function does. + +You should also write some tests in code blocks. +`TestCase` methods, such as `self.assertEqual()`, are available in `doctests`. +See [unittest.TestCase assert methods](https://docs.python.org/3/library/unittest.html#unittest.TestCase.debug) for all available methods. +The file is linked in `/src/plone/api/tests/doctests/`, which includes the doctests in `plone.api`'s test setup. +The package `manuel` allows you to write doctests as common Python code in code blocks. + +The following example shows narrative documentation and doctests. + +````markdown +(content-foo-example)= + +## Get the foo of an object + +You can use the {meth}`api.content.foo` function to get the `foo` of an object. + +```python +from plone import api +blog_foo = api.content.foo(path="/plone/blog") +``` + +% invisible-code-block: python +% +% self.assertEqual(blog_foo,"foo") +```` + +Code blocks are rendered in documentation. + +````markdown +```python +from plone import api +blog_foo = api.content.foo(path="/plone/blog") +``` +```` + +Invisible code blocks are not rendered in documentation and can be used for tests. + +```markdown +% invisible-code-block: python +% +% self.assertEqual(blog_foo,"foo") +``` + +Invisible code blocks are also handy for enriching the namespace without cluttering the narrative documentation. + +```markdown +% invisible-code-block: python +% +% portal = api.portal.get() +% image = api.content.create(type='Image', id='image', container=portal) +% blog = api.content.create(type='Link', id='blog', container=portal) +``` + +Functions and examples in documentation are mutually referenced. +The function references the narrative documentation via the label `content-foo-example`. +The narrative documentation references the API function documentation via `` {meth}`api.content.foo` ``. +The documentation is rendered with a link from the API reference to the narrative documentation, which in turn links back to the API reference. + + +## Resources + +- {doc}`plone:index` +- [Source code](https://github.com/plone/plone.api) +- [Issue tracker](https://github.com/plone/plone.api/issues) +- [Code Coverage](https://coveralls.io/github/plone/plone.api) diff --git a/docs/contribute/develop.md b/docs/contribute/develop.md deleted file mode 100644 index c2b0a699..00000000 --- a/docs/contribute/develop.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -myst: - html_meta: - "description": "How to set up your development environment to contribute" - "property=og:description": "How to set up your development environment to contribute" - "property=og:title": "Development environment" - "keywords": "contribute, Plone, API, development" ---- - -# Development environment - -{sub-ref}`today` - -This section is meant for contributors to the `plone.api` project. -Its purpose is to guide them through the steps needed to start contributing. - -```{note} -This HowTo is written for Linux and OS X users. -If you are running Windows, we suggest using either Windows Subsystem for Linux, VMWare or a similar virtualization tool to install Ubuntu Linux on a virtual machine, or installing Ubuntu Linux as a secondary operating system on your machine. -Alternatively, you can browse Plone's documentation on how to get Plone development environment up and running on Windows. -Plone does run on Windows, but it's not completely trivial to set it up. -``` - -## Locations of information and tools - -- [Documentation @ 6.docs.plone.org](https://6.docs.plone.org) -- [Source code @ GitHub](https://github.com/plone/plone.api) -- [Issues @ GitHub](https://github.com/plone/plone.api/issues) -- [Code Coverage @ Coveralls.io](https://coveralls.io/github/plone/plone.api) - -## Prerequisites - -### System libraries - -First let's look at 'system' libraries and applications that are normally installed with your OS packet manager, such as apt, aptitude, yum, etc.: - -- `libxml2` - An xml parser written in C. -- `libxslt` - XSLT library written in C. -- `git` - Version control system. -- `gcc` - The GNU Compiler Collection. -- `g++` - The C++ extensions for gcc. -- `GNU tar` - The (un)archiving tool for extracting downloaded archives. -- `bzip2` and `gzip` decompression packages - `gzip` is nearly standard, however some platforms will require that `bzip2` be installed. -- `Python 3` - It is recommended to use a Python virtual environment, using tools such as pyenv or venv, to get a clean Python version. - -### Python tools - -tox automation -: `tox` aims to automate and standardize testing in Python. - It is part of a larger vision of easing the packaging, testing, and release process of Python software. - Install with `pip install tox`. - - -### Further information - -If you experience problems, read through the following links as almost all of the above steps are required for a default Plone development environment: - -- -- -- -- - - -(git-workflow)= - -## Git workflow & branching model - -Our repository on GitHub has the following layout: - -- **feature branches**: all development for new features must be done in - dedicated branches, normally one branch per feature, -- **master branch**: when features get completed they are merged into the - master branch; bugfixes are committed directly on the master branch, -- **tags**: whenever we create a new release we tag the repository so we can - later re-trace our steps, re-release versions, etc. - -### Squashing commits - -In order to keep a clear and concise git history, it is good practice to squash commits before merging. -Use `git rebase --interactive` to squash all commits that you think are unnecessary. - -## Creating and using the development environment - -Go to your projects folder and download the latest `plone.api` code: - -```shell -cd -git clone https://github.com/plone/plone.api.git -``` - -Now `cd` into the newly created directory and build your environment: - -```shell -cd plone.api -pip install tox -tox -``` - -Go make some tea while `tox` runs all tasks listed under `tox -l`. - -- runs all checks and tests -- generates documentation so you can open it locally later on - -Other commands that you may want to run: - -```shell -tox -e py39-plone-60 # run all tests for Python 3.9 and Plone 6 -tox -e plone6docs # re-generate documentation -``` - -Run `tox -l` to list all tox environments. -Open `tox.ini` in your favorite code editor to see all possible commands and what they do. -Read to learn more about `tox`. - - -(working-on-an-issue)= - -## Working on an issue - -Our GitHub account contains a [list of open issues](https://github.com/plone/plone.api/issues). -Click on one that catches your attention. -If the issue description says `No one is assigned` it means no-one is already working on it and you can claim it as your own. -Click on the button next to the text and make yourself the one assigned for this issue. - -Based on our {ref}`git-workflow` all new features must be developed in separate git branches. -So if you are not doing a very trivial fix, but rather adding new features/enhancements, you should create a *feature branch*. -This way your work is kept in an isolated place where you can receive feedback on it, improve it, etc. -Once we are happy with your implementation, your branch gets merged into *master* at which point everyone else starts using your code. - -```shell -git checkout master # go to master branch -git switch -c issue_17 # create a feature branch -# replace 17 with the issue number you are working on - -# change code here - -git add -p && git commit # commit my changes -git push origin issue_17 # push my branch to GitHub -``` - -At this point, others can see your changes, but they don't get affected by them. -In other words, others can comment on your code without your code changing their development environments. - -Read more about Git branching at and on our Git workflow at [Working with Git and GitHub](https://5.docs.plone.org/develop/coredev/docs/git.html). - -Once you are done with your work and you would like us to merge your changes into master, go to GitHub to do a *pull request*. -Open a browser and point it to `https://github.com/plone/plone.api/tree/issue_`. -There you should see a `Pull Request` button. -Click on it, write some text about what you did and anything else you would like to tell the one who will review your work, and finally click `Send pull request`. -Now wait that someone comes by and merges your branch (don't do it yourself, even if you have permissions to do so). - -An example pull request text: - -``` -Please merge my branch that resolves issue #13, -where I added the get_navigation_root() method. -``` - -## Commit checklist - -Before every commit you should: - -- Run unit tests and syntax validation checks. -- Add an entry to `/news/` (if applicable). - -All syntax checks and all tests can be run with a single command. -This command also re-generates your documentation. - -```shell -tox -``` - -```{note} -It pays off to invest a little time to make your editor run `pep8` and `pyflakes` on a file every time you save that file -(or use `flake8` which combines both). -This saves you lots of time in the long run. -``` - - -## GitHub Continuous Integration - -On every push GitHub runs all tests and syntax validation checks. -GitHub CI is configured in `.github/workflow` in the root of this package. - - -## Sphinx Documentation - -```{note} -Un-documented code is broken code. -``` - -For every feature you add to the codebase, you should also add documentation of it to `docs/`. - -After adding or modifying documentation, run `tox -e plone6docs` to re-generate your documentation. - -Publicly available documentation on [6.docs.plone.org/plone.api](https://6.docs.plone.org/plone.api) is automatically generated from these source files when its submodule is updated in the [main Plone `documentation` repository](https://github.com/plone/documentation/). - -For writing documentation, read [Contributing to documentation](https://6.docs.plone.org/contributing/index.html). - -### Adding a function to an existing module - -Example: Add a new function `plone.api.content.foo`. - -The function would go in the module `plone.api.content`. -Therefore you would add your function in `/src/plone/api/content.py`. - -% invisible-code-block: python -% -% from plone.api.validation import at_least_one_of -% from plone.api.validation import mutually_exclusive_parameters - -```python -@mutually_exclusive_parameters('path', 'UID') -@at_least_one_of('path', 'UID') -def foo(path=None, UID=None): - """Do foo. - - :param path: Path to the object we want to get, - relative to the portal root. - :type path: string - - :param UID: UID of the object we want to get. - :type UID: string - - :returns: String - :raises: - :class:`~plone.api.exc.MissingParameterError`, - :class:`~plone.api.exc.InvalidParameterError` - :Example: :ref:`content-foo-example` - """ - return "foo" -``` - -% invisible-code-block: python -% -% bar = foo('/plone/blog') -% self.assertEqual(bar,"foo") -% -% from plone.api.exc import InvalidParameterError -% self.assertRaises( -% InvalidParameterError, -% lambda: foo("/plone/blog", "abcd001") -% ) - -Add documentation in `/docs/content.md`. -Describe what your function does, and write some tests in code blocks. -`TestCase` methods such as `self.assertEqual()` are available in `doctests`. -See [unittest.TestCase assert methods](https://docs.python.org/3/library/unittest.html#unittest.TestCase.debug) for all available methods. -The file is linked in `/src/plone/api/tests/doctests/`, which includes the doctests in `plone.api` testing set up. -The package `manuel` allows you to write doctests as common Python code in code blocks. - -````markdown -(content-foo-example)= - -## Get the foo of an object - -You can use the {meth}`api.content.foo` function to get the `foo` of an object. - -```python -from plone import api -blog_foo = api.content.foo(path="/plone/blog") -``` - -% invisible-code-block: python -% -% self.assertEqual(blog_foo,"foo") -```` - -Code blocks are rendered in documentation. - -````markdown -```python -from plone import api -blog_foo = api.content.foo(path="/plone/blog") -``` -```` - -Invisible code blocks are not rendered in documentation and can be used for tests. - -```markdown -% invisible-code-block: python -% -% self.assertEqual(blog_foo,"foo") -``` - -Invisible code blocks are also handy for enriching the namespace without cluttering the narrative documentation. - -```markdown -% invisible-code-block: python -% -% portal = api.portal.get() -% image = api.content.create(type='Image', id='image', container=portal) -% blog = api.content.create(type='Link', id='blog', container=portal) -``` - -Functions and examples in documentation are mutually referenced. -The function references the narrative documentation via label `content-foo-example`. -The narrative documentation references the API function documentation via `` {meth}`api.content.foo` ``. -The documentation is rendered with a link from the API reference to the narrative documentation, which in turn links back to the API reference. diff --git a/docs/contribute/index.md b/docs/contribute/index.md deleted file mode 100644 index 9d73c418..00000000 --- a/docs/contribute/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -myst: - html_meta: - "description": "How to contribute to plone.api" - "property=og:description": "How to contribute to plone.api" - "property=og:title": "Contributing to plone.api" - "keywords": "Plone, API, development, contribute" ---- - -# Contributing to `plone.api` - -## Conventions - -For rules and guidelines on syntax style, development process, repository workflow, etc see [The Plone Styleguides](https://5.docs.plone.org/develop/styleguide/) and [Working with Git and GitHub](https://5.docs.plone.org/develop/coredev/docs/git.html) - -## Local development environment - -Setting up and using the local development environment. - -```{toctree} -:maxdepth: 2 - -develop -``` diff --git a/docs/index.md b/docs/index.md index 71fbcb6b..eacc7178 100644 --- a/docs/index.md +++ b/docs/index.md @@ -72,7 +72,7 @@ api/index ```{toctree} :maxdepth: 2 -contribute/index +contribute ``` ## Indices and tables diff --git a/news/539.documentation b/news/539.documentation new file mode 100644 index 00000000..2ae5f3d8 --- /dev/null +++ b/news/539.documentation @@ -0,0 +1 @@ +Overhaul contributing documentation for Plone 6. @stevepiercy diff --git a/requirements-docs.txt b/requirements-docs.txt index 8038479c..694c282c 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,20 +1,12 @@ -docutils<0.17,>=0.15 # sphinx-book-theme 0.2.0 has requirement docutils<0.17,>=0.15 -Sphinx<5,>=3 # sphinx-book-theme 0.3.3 has requirement sphinx<5,>=3 lesscpy linkify-it-py myst-parser +plone-sphinx-theme sphinx-autobuild -pydata-sphinx-theme<=0.8.99 -sphinx-book-theme==0.3.3 sphinx-copybutton sphinx-sitemap sphinx-togglebutton sphinxcontrib-spelling sphinxext-opengraph -sphinxcontrib-applehelp==1.0.4 # https://github.com/plone/documentation/issues/1604 -sphinxcontrib-devhelp==1.0.2 # https://github.com/plone/documentation/issues/1604 -sphinxcontrib-htmlhelp==2.0.1 # https://github.com/plone/documentation/issues/1604 -sphinxcontrib-qthelp==1.0.3 # https://github.com/plone/documentation/issues/1604 -sphinxcontrib-serializinghtml==1.1.5 # https://github.com/plone/documentation/issues/1604 sphinxcontrib-video vale==2.30.0 diff --git a/setup.py b/setup.py index 351b3f63..5d9ed052 100644 --- a/setup.py +++ b/setup.py @@ -80,4 +80,9 @@ "Programming Language :: Python :: 3.11", ], platforms="Any", + project_urls={ + "Documentation": "https://6.docs.plone.org/plone.api/index.html", + "Changelog": "https://github.com/plone/plone.api/blob/master/CHANGES.rst", + "Issue Tracker": "https://github.com/plone/plone.api/issues", + }, ) diff --git a/tox.ini b/tox.ini index 701ba2af..cc85d042 100644 --- a/tox.ini +++ b/tox.ini @@ -257,17 +257,15 @@ allowlist_externals = [testenv:plone6docs] # New docs with sphinx-book-theme # See [testenv:docs] for classic documentation -basepython = python3.9 +basepython = python3.11 skip_install = False -usedevelop = True +package = editable allowlist_externals = mkdir extras = tests - deps = -r requirements-docs.txt - commands = python -VV mkdir -p {toxinidir}/_build/plone6docs @@ -294,9 +292,9 @@ whitelist_externals = mkdir [testenv:linkcheck] -basepython = python +basepython = python3.11 skip_install = False -usedevelop = True +package = editable allowlist_externals = mkdir extras = @@ -308,6 +306,21 @@ commands = mkdir -p {toxinidir}/_build/plone6docs sphinx-build -b linkcheck -d _build/plone6docs/doctrees docs _build/plone6docs/linkcheck +[testenv:livehtml] +basepython = python3.11 +skip_install = False +package = editable +allowlist_externals = + mkdir +extras = + {[testenv:plone6docs]extras} +deps = + {[testenv:plone6docs]deps} +commands = + python -VV + mkdir -p {toxinidir}/_build/plone6docs + sphinx-autobuild -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html + ## # Add extra configuration options in .meta.toml: # [tox]