Skip to content

Commit

Permalink
Fix docs after renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
q-posev committed Feb 26, 2022
1 parent 8ce75cd commit c312e21
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 45 deletions.
14 changes: 7 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Sphinx configuration for qp2
# Sphinx configuration for aiida-qp2
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand All @@ -15,7 +15,7 @@
import sys
import time

import qp2
import aiida_qp2
from aiida.manage.configuration import load_documentation_profile

# -- AiiDA-related setup --------------------------------------------------
Expand Down Expand Up @@ -70,7 +70,7 @@
master_doc = 'index'

# General information about the project.
project = u'qp2'
project = u'aiida-qp2'
copyright_first_year = '2021'
copyright_owners = 'TREX-CoE'

Expand All @@ -86,7 +86,7 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = qp2.__version__
release = aiida_qp2.__version__
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

Expand Down Expand Up @@ -211,7 +211,7 @@
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
html_use_opensearch = 'http://qp2.readthedocs.io'
html_use_opensearch = 'http://aiida_qp2.readthedocs.io'

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
Expand All @@ -231,7 +231,7 @@
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'qp2-doc'
htmlhelp_basename = 'aiida-qp2-doc'

# -- Options for LaTeX output ---------------------------------------------

Expand Down Expand Up @@ -286,7 +286,7 @@ def run_apidoc(_):
"""
source_dir = os.path.abspath(os.path.dirname(__file__))
apidoc_dir = os.path.join(source_dir, 'apidoc')
package_dir = os.path.join(source_dir, os.pardir, os.pardir, 'qp2')
package_dir = os.path.join(source_dir, os.pardir, os.pardir, 'aiida_qp2')

# In #1139, they suggest the route below, but this ended up
# calling sphinx-build, not sphinx-apidoc
Expand Down
32 changes: 2 additions & 30 deletions docs/source/developer_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you ever need to skip these pre-commit hooks, just use::
Continuous integration
++++++++++++++++++++++

``qp2`` comes with a ``.github`` folder that contains continuous integration tests on every commit using `GitHub Actions <https://github.com/features/actions>`_. It will:
``aiida_qp2`` comes with a ``.github`` folder that contains continuous integration tests on every commit using `GitHub Actions <https://github.com/features/actions>`_. It will:

#. run all tests for the ``django`` ORM
#. build the documentation
Expand Down Expand Up @@ -59,37 +59,9 @@ Building the documentation

Check the result by opening ``build/html/index.html`` in your browser.

Publishing the documentation
++++++++++++++++++++++++++++

Once you're happy with your documentation, it's easy to host it online on ReadTheDocs_:

#. Create an account on ReadTheDocs_

#. Import your ``aiida-qp2`` repository (preferably using ``qp2`` as the project name)

The documentation is now available at `qp2.readthedocs.io <http://qp2.readthedocs.io/>`_.

PyPI release
++++++++++++

Your plugin is ready to be uploaded to the `Python Package Index <https://pypi.org/>`_.
Just register for an account and::

pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*

After this, you (and everyone else) should be able to::

pip install qp2

You can also enable *automatic* deployment of git tags to the python package index:
simply generate a `PyPI API token <https://pypi.org/help/#apitoken>`_ for your PyPI account and add it as a secret to your GitHub repository under the name ``pypi_token`` (Go to Settings -> Secrets).

.. note::

When updating the plugin package to a new version, remember to update the version number both in ``setup.json`` and ``qp2/__init__.py``.
When updating the plugin package to a new version, remember to update the version number both in ``setup.json`` and ``aiida_qp2/__init__.py``.


.. _ReadTheDocs: https://readthedocs.org/
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The aiida-qp2 plugin for `AiiDA`_

user_guide/index
developer_guide/index
API documentation <apidoc/qp2>
API documentation <apidoc/aiida_qp2>

If you use this plugin for your research, please cite the following work:

Expand Down
9 changes: 2 additions & 7 deletions docs/source/user_guide/get_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Use the following commands to install the plugin::
verdi quicksetup # better to set up a new profile
verdi calculation plugins # should now show your calclulation plugins

Then use ``verdi code setup`` with the ``qp2`` input plugin
Then use ``verdi code setup`` with the ``aiida_qp2`` input plugin
to set up an AiiDA code for qp2.

Usage
Expand All @@ -30,13 +30,8 @@ A quick demo of how to submit a calculation::
verdi run test_submit.py # submit test calculation
verdi calculation list -a # check status of calculation

If you have already set up your own qp2 code using
``verdi code setup``, you may want to try the following command::

qp2-submit # uses qp2.cli

Available calculations
++++++++++++++++++++++

.. aiida-calcjob:: QP2Calculation
:module: qp2.calculations
:module: aiida_qp2.calculations

0 comments on commit c312e21

Please sign in to comment.