Final doc updates and fix tests

This commit is contained in:
Anthony Johnson 2019-07-25 14:08:56 -06:00
parent 9a8699b915
commit 472b3aee21
2 changed files with 22 additions and 27 deletions

View File

@ -10,13 +10,12 @@ Modifying the theme
=================== ===================
The styles for this theme use SASS_ and a custom CSS framework called Wyrm_. We The styles for this theme use SASS_ and a custom CSS framework called Wyrm_. We
use Bower_ to manage these dependencies and SASS_ to build the CSS. Grunt_ is use Webpack_ and node-sass_ to build the CSS. Webpack_ is used to watch for
used to watch for changes, rebuild the static assets, and rebuild the Sphinx changes, rebuild the static assets, and rebuild the Sphinx demo documentation.
demo documentation.
.. note:: .. note::
The installation of Ruby and Node is outside the scope of this The installation of Node is outside the scope of this documentation. You
documentation. You will need both in order to make changes to this theme. will need Node version 10+ in order to make changes to this theme.
Set up your environment Set up your environment
----------------------- -----------------------
@ -27,13 +26,7 @@ Set up your environment
pip install -e '.[dev]' pip install -e '.[dev]'
#. Install SASS. #. Install Webpack_, node-sass_, and theme dependencies locally.
.. code:: console
gem install sass
#. Install Bower, Grunt, and theme dependencies locally.
.. code:: console .. code:: console
@ -42,31 +35,31 @@ Set up your environment
Making changes Making changes
-------------- --------------
Changes to the theme can be compiled and tested with the default Grunt task: Changes to the theme can be compiled and tested with webpacke:
.. code:: console .. code:: console
grunt npm run dev
This default task will do the following: This script will do the following:
#. Install and update any Bower dependencies. #. Install and update any dependencies.
#. Build the static CSS from SASS source files. #. Build the static CSS from SASS source files.
#. Build the demo documentation. #. Build the demo documentation.
#. Watch for changes to the SASS files and documentation and rebuild everything #. Watch for changes to the SASS files and documentation and rebuild everything
on any detected changes. on any detected changes.
Alternatively, if you don't need to watch the files, Grunt can be called with Alternatively, if you don't need to watch the files, the release build script
the same task used for releases: can be used to test built assets:
.. code:: console .. code:: console
grunt build npm run build
.. _Bower: http://www.bower.io .. _Webpack: https://webpack.js.org/
.. _node-sass: https://github.com/sass/node-sass
.. _SASS: http://www.sass-lang.com .. _SASS: http://www.sass-lang.com
.. _Wyrm: http://www.github.com/snide/wyrm/ .. _Wyrm: http://www.github.com/snide/wyrm/
.. _Grunt: http://www.gruntjs.com
.. _Sphinx: http://www.sphinx-doc.org/en/stable/ .. _Sphinx: http://www.sphinx-doc.org/en/stable/
Translations Translations
@ -96,10 +89,12 @@ Releasing the theme
To release a new version of the theme, core team will take the following steps: To release a new version of the theme, core team will take the following steps:
#. Bump the version in ``sphinx_rtd_theme/__init__.py``, ``bower.json`` and ``package.json`` -- #. Bump the version in ``sphinx_rtd_theme/__init__.py``, ``setup.py`` and
we try to follow `semver <http://semver.org/>`_, so be careful with breaking changes. ``package.json``. We follow `semver <http://semver.org/>`_ and `PEP440`_
(with regards to alpha release and development versions). The version
increment should reflect these releases and any potentially breaking changes.
#. Update the changelog (``docs/changelog.rst``) with the version information. #. Update the changelog (``docs/changelog.rst``) with the version information.
#. Run ``grunt build`` to rebuild all the theme assets. #. Run ``npm run build`` to rebuild all the theme assets.
#. Run ``python setup.py update_translations`` to compile new translation files and update Transifex #. Run ``python setup.py update_translations`` to compile new translation files and update Transifex
#. Commit that change. #. Commit that change.
#. Tag the release in git: ``git tag $NEW_VERSION``. #. Tag the release in git: ``git tag $NEW_VERSION``.
@ -111,3 +106,5 @@ To release a new version of the theme, core team will take the following steps:
rm -rf dist/ rm -rf dist/
python setup.py sdist bdist_wheel python setup.py sdist bdist_wheel
twine upload --sign --identity security@readthedocs.org dist/* twine upload --sign --identity security@readthedocs.org dist/*
.. _PEP440: https://www.python.org/dev/peps/pep-0440/

View File

@ -10,8 +10,6 @@ import distutils.cmd
from io import open from io import open
from setuptools import setup from setuptools import setup
from sphinx_rtd_theme import __version__
class UpdateTranslationsCommand(distutils.cmd.Command): class UpdateTranslationsCommand(distutils.cmd.Command):
@ -55,7 +53,7 @@ class TransifexCommand(distutils.cmd.Command):
setup( setup(
name='sphinx_rtd_theme', name='sphinx_rtd_theme',
version=__version__, version='0.4.3.dev0',
url='https://github.com/rtfd/sphinx_rtd_theme/', url='https://github.com/rtfd/sphinx_rtd_theme/',
license='MIT', license='MIT',
author='Dave Snider, Read the Docs, Inc. & contributors', author='Dave Snider, Read the Docs, Inc. & contributors',