Skip to content

Commit

Permalink
Improve documentation layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 25, 2022
1 parent 1016ec4 commit 1adf354
Show file tree
Hide file tree
Showing 58 changed files with 335 additions and 85 deletions.
9 changes: 8 additions & 1 deletion chemistry_tools/elements/actinides.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# actinides.py
"""
r"""
Actinides (or actinoids) in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: Ac
:class:`~chemistry_tools.elements.classes.Element` representing Actinium
Expand Down Expand Up @@ -64,6 +68,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Lawrencium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
9 changes: 8 additions & 1 deletion chemistry_tools/elements/alkali_metals.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# alkali_metals.py
"""
r"""
Group 1: Alkali Metals in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: Li
:class:`~chemistry_tools.elements.classes.Element` representing Lithium
Expand All @@ -28,6 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Francium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
8 changes: 7 additions & 1 deletion chemistry_tools/elements/alkaline_earth_metals.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# alkaline_earth_metals.py
"""
r"""
Group 2: Alkaline Earth Metals in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: Be
:class:`~chemistry_tools.elements.classes.Element` representing Beryllium
Expand All @@ -28,7 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Radium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
9 changes: 8 additions & 1 deletion chemistry_tools/elements/chalcogens.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# chalcogens.py
"""
r"""
Group 16: Chalcogens in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: O
:class:`~chemistry_tools.elements.classes.Element` representing Oxygen
Expand All @@ -28,6 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Livermorium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
6 changes: 6 additions & 0 deletions chemistry_tools/elements/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class Element(Dictable):
:param ionenergy: The ionization energies in ``eV``.
:param isotopes: The Isotopic composition. A mapping of isotope mass numbers to :class:`~.Isotope` objects.
:param description: A description of the element.
.. autosummary-widths:: 30/100
"""

_ionenergy: Tuple
Expand Down Expand Up @@ -543,6 +545,8 @@ class Isotope(Dictable):
:param mass: The mass of the isotope.
:param abundance: The natural abundance of the isotope.
:param massnumber: The mass number of the isotope.
.. latex:clearpage::
"""

def __init__(self, mass: float = 0.0, abundance: float = 1.0, massnumber: int = 0):
Expand Down Expand Up @@ -602,6 +606,8 @@ class Elements(Iterable[Element]):
Ordered dict of Elements with lookup by number, symbol, and name.
:param \*elements: The elements to add to the dictionary.
.. autosummary-widths:: 1/2
"""

def __init__(self, *elements: Element):
Expand Down
9 changes: 8 additions & 1 deletion chemistry_tools/elements/halogens.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# halogens.py
"""
r"""
Group 17: Halogens in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: F
:class:`~chemistry_tools.elements.classes.Element` representing Fluorine
Expand All @@ -28,6 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Tennessine
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
9 changes: 8 additions & 1 deletion chemistry_tools/elements/lanthanides.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# lanthanides.py
"""
r"""
Lanthanides (or lanthanoids) in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: La
:class:`~chemistry_tools.elements.classes.Element` representing Lanthanum
Expand Down Expand Up @@ -64,6 +68,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Lutetium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
10 changes: 9 additions & 1 deletion chemistry_tools/elements/noble_gases.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# noble_gases.py
"""
r"""
Group 18: Noble Gases in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: He
:class:`~chemistry_tools.elements.classes.Element` representing Helium
Expand Down Expand Up @@ -31,6 +35,10 @@
.. data:: Og
:class:`~chemistry_tools.elements.classes.Element` representing Oganesson
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
8 changes: 7 additions & 1 deletion chemistry_tools/elements/pnictogens.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# pnictogens.py
"""
r"""
Group 15: Pnictogens in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: N
:class:`~chemistry_tools.elements.classes.Element` representing Nitrogen
Expand All @@ -28,7 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Moscovium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
8 changes: 7 additions & 1 deletion chemistry_tools/elements/tetrels.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# tetrels.py
"""
r"""
Group 14: Tetrels, carbon group, crystallogens or adamantogens in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: C
:class:`~chemistry_tools.elements.classes.Element` representing Carbon
Expand All @@ -28,7 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Flerovium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
8 changes: 7 additions & 1 deletion chemistry_tools/elements/transition_metals.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# transition_metals.py
"""
r"""
Transition Metals block in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: Sc
:class:`~chemistry_tools.elements.classes.Element` representing Scandium
Expand Down Expand Up @@ -156,7 +160,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Roentgenium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
8 changes: 7 additions & 1 deletion chemistry_tools/elements/triels.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3
#
# triels.py
"""
r"""
Group 13: Triels (or boron group) in the Periodic Table.
.. raw:: latex
\begin{multicols}{2}
.. data:: B
:class:`~chemistry_tools.elements.classes.Element` representing Boron
Expand All @@ -28,7 +32,9 @@
:class:`~chemistry_tools.elements.classes.Element` representing Nihonium
.. raw:: latex
\end{multicols}
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
Expand Down
4 changes: 3 additions & 1 deletion chemistry_tools/formulae/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class Compound(Dictable):
:param unicode_name:
:param html_name:
.. autosummary-widths:: 4/10
``data`` could be simple such as ``{'mp': 0, 'bp': 100}`` or considerably more involved,
e.g.:
Expand Down Expand Up @@ -198,7 +200,7 @@ def molar_mass(self) -> quantities.quantity.Quantity:
"""
Returns the molar mass (with units) of the substance.
**Example:**
:bold-title:`Example:`
.. code-block:: python
Expand Down
Loading

0 comments on commit 1adf354

Please sign in to comment.