Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Apr 5, 2022
1 parent 5c34a9b commit 46408b3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 165 deletions.
2 changes: 1 addition & 1 deletion aiida_lammps/data/lammps_potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def source_citations(self) -> typing.Union[str, list]:
corresponding to primary published work(s) describing the KIM Item.
:return: the citation where the potential was originally published.
:rtype: typing.Union[str, list].
:rtype: typing.Union[str, list]
"""
return self.get_attribute("source_citations")

Expand Down
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"pymatgen": ("https://pymatgen.org/", None),
}

suppress_warnings = ["etoc.toctree"]

html_theme = "furo" # pylint: disable=invalid-name
html_title = f"v{__version__}" # pylint: disable=invalid-name
html_logo = "static/logo.png" # pylint: disable=invalid-name
Expand Down
178 changes: 16 additions & 162 deletions docs/source/nitpick-exceptions
Original file line number Diff line number Diff line change
@@ -1,163 +1,17 @@
### python builtins

# note: there doesn't seem to be a standard way of indicating a callable in python3
# https://stackoverflow.com/questions/23571253/how-to-define-a-callable-parameter-in-a-python-docstring
py:class callable

# For some reason, "filter" does not seem to be found
py:class filter

py:class collections.namedtuple
py:class list of str
py:class optional

py:class unittest.case.TestCase
py:class unittest.runner.TextTestRunner

# required for metaclasses(?)
py:class builtins.bool
py:class builtins.float
py:class builtins.int
py:class builtins.object
py:class builtins.str
py:class builtins.dict

# typing
py:class asyncio.events.AbstractEventLoop
py:class EntityType
py:class function
py:class IO
py:class traceback

### AiiDA

# issues with order of object processing and type hinting
py:class aiida.engine.runners.ResultAndNode
py:class aiida.engine.runners.ResultAndPk
py:class aiida.engine.processes.workchains.workchain.WorkChainSpec
py:class aiida.manage.manager.Manager
py:class aiida.orm.nodes.node.WarnWhenNotEntered
py:class aiida.orm.utils.links.LinkQuadruple
py:class aiida.tools.importexport.dbexport.ExportReport
py:class aiida.tools.importexport.dbexport.ArchiveData
py:class aiida.tools.groups.paths.WalkNodeResult
py:class aiida.orm.Float
py:class aiida.orm.Dict
py:class aiida.orm.StructureData

py:class Backend
py:class BackendEntity
py:class BackendNode
py:class AuthInfo
py:class CalcJob
py:class CalcJobNode
py:class Data
py:class ExitCode
py:class File
py:class FolderData
py:class JobInfo
py:class JobState
py:class Node
py:class Parser
py:class PersistenceError
py:class Process
py:class ProcessBuilder
py:class ProcessNode
py:class ProcessSpec
py:class Port
py:class PortNamespace
py:class Runner
py:class Transport
py:class TransportQueue
py:class WorkChainSpec

py:class kiwipy.communications.Communicator
py:class plumpy.process_states.State
py:class plumpy.workchains._If
py:class plumpy.workchains._While

### python packages
# Note: These exceptions are needed if
# * the objects are referenced e.g. as param/return types types in method docstrings (without intersphinx mapping)
# * the documentation linked via intersphinx lists the objects at a different (usually lower) import hierarchy
py:class click.core.Group
py:class click.core.Option
py:class click.types.ParamType
py:class click.types.Choice
py:class click.types.IntParamType
py:class click.types.StringParamType
py:class click.types.Path
py:class click.types.File
py:meth click.Option.get_default

py:class concurrent.futures._base.TimeoutError

py:class sphinx.util.docutils.SphinxDirective

py:class frozenset

py:class numpy.bool_

py:class paramiko.proxy.ProxyCommand

# These can be removed once they are properly included in the `__all__` in `plumpy`
py:class plumpy.ports.PortNamespace
py:class plumpy.utils.AttributesDict

py:class _asyncio.Future

py:class tqdm.std.tqdm

py:class IPython.core.magic.Magics

py:class HTMLParser.HTMLParser
py:class html.parser.HTMLParser

py:class django.contrib.auth.base_user.AbstractBaseUser
py:class django.contrib.auth.base_user.BaseUserManager
py:class django.contrib.auth.models.AbstractBaseUser
py:class django.contrib.auth.models.BaseUserManager
py:class django.contrib.auth.models.PermissionsMixin
py:class django.core.exceptions.MultipleObjectsReturned
py:class django.core.exceptions.ObjectDoesNotExist
py:class django.db.models.base.Model
py:class django.db.models.manager.Manager
py:class django.db.models.query.QuerySet
py:class django.db.migrations.migration.Migration

py:class flask.app.Flask

py:class sqlalchemy.ext.declarative.api.Base
py:class sqlalchemy.ext.declarative.api.Model
py:class sqlalchemy.sql.functions.FunctionElement
py:class sqlalchemy.orm.query.Query
py:class sqlalchemy.orm.util.AliasedClass
py:class sqlalchemy.orm.session.Session
py:exc sqlalchemy.orm.exc.MultipleResultsFound

py:class sphinx.ext.autodoc.ClassDocumenter

py:class yaml.Dumper
py:class yaml.Loader
py:class yaml.dumper.Dumper
py:class yaml.loader.Loader
py:class yaml.FullLoader
py:class yaml.loader.FullLoader
py:class uuid.UUID

py:class psycopg2.extensions.cursor

py:class aldjemy.orm.DbNode
py:class aldjemy.orm.DbLink
py:class aldjemy.orm.DbComputer
py:class aldjemy.orm.DbUser
py:class aldjemy.orm.DbGroup
py:class aldjemy.orm.DbAuthInfo
py:class aldjemy.orm.DbComment
py:class aldjemy.orm.DbLog
py:class aldjemy.orm.DbSetting

py:class alembic.config.Config

py:class pgsu.PGSU
py:meth pgsu.PGSU.__init__

py:class jsonschema.exceptions._Error
py:class namedtuple
py:class numpy.array
py:class np.array
py:class State
py:class EVENT_CALLBACK_TYPE
py:class orm.ArrayData
py:class orm.Dict
py:class orm.ProcessNode
py:class orm.StructureData
py:class utils.AttributesFrozendict
py:exc jsonschema.exceptions.ValidationError
py:exc jsonschema.exceptions.SchemaError
py:exc InputValidationError
py:class aiida_lammps.common.parse_trajectory.TRAJ_BLOCK
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ force_sort_within_sections = true
no_lines_before = ["LOCALFOLDER"]

# Configure isort to work without access to site-packages
known_first_party = ["aiida_lammos"]
known_first_party = ["aiida_lammps"]

# Settings for Black compatibility
profile = "black"
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
envlist = py37

[testenv]
use_develop = true
usedevelop = true

[testenv:py{37,38,39}]
extras = testing
Expand All @@ -29,6 +29,7 @@ allowlist_externals =
echo
commands =
clean: rm -rf docs/_build
clean: rm -rf docs/source/reference/apidoc
sphinx-build -n -W --keep-going -c docs/source docs/source docs/_build
commands_post = echo "open docs/_build/index.html"

Expand Down

0 comments on commit 46408b3

Please sign in to comment.