Skip to content

Commit

Permalink
docs: theme change, improve formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pauliacomi committed Feb 15, 2022
1 parent 2eb419a commit 6d7a906
Show file tree
Hide file tree
Showing 35 changed files with 851 additions and 442 deletions.
11 changes: 5 additions & 6 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
Authors
=======

* Paul Iacomi - main developer

* Cory Simon - pyIAST functionality
* Bastien Aillet - BET surface area functionality
* Chris Murdock - originally coded Micromeritics report import functionality
* Thomas B Cooper - feedback for BET/Langmuir area improvements
- Paul Iacomi - main developer
- Cory Simon - pyIAST functionality
- Bastien Aillet - BET surface area functionality
- Chris Murdock - originally coded Micromeritics report import functionality
- Thomas B Cooper - feedback for BET/Langmuir area improvements
16 changes: 7 additions & 9 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Bug reports

When `reporting a bug <https://github.com/pauliacomi/pygaps/issues>`_ please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in
troubleshooting.
* Detailed steps to reproduce the bug.
- Your operating system name and version.
- Any details about your local setup that might be helpful in
troubleshooting.
- Detailed steps to reproduce the bug.

A helpful GitHub issue template is provided.

Expand All @@ -34,9 +34,9 @@ The best way to send feedback is to file

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* And of course, remember that this project is developed in the
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- And of course, remember that this project is developed in the
spare time of the maintainers, and that code contributions are welcome :)

Development
Expand Down Expand Up @@ -66,9 +66,7 @@ To set up `pyGAPS` for local development:
Or you could run the tests with only your own environment by running::

python setup.py test

# or pytest directly

pytest

5. Commit your changes and push your branch to GitHub::
Expand Down
22 changes: 11 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ Documentation

pyGAPS is built with three key mantras in mind:

- **opinionated**: There are many places where the code will suggest or
default to what the it considers a good practice. As examples: the
standard units, pore size distribution methods and BET calculation limits.
- **flexible**: While the defaults are there for a reason, you can override
pretty much any parameter. Want to pass a custom adsorbate thickness
function or use volumetric bases? Can do!
- **transparency**: All code is well documented and open source. There are
no black boxes.
- **opinionated**: There are many places where the code will suggest or
default to what the it considers a good practice. As examples: the
standard units, pore size distribution methods and BET calculation limits.
- **flexible**: While the defaults are there for a reason, you can override
pretty much any parameter. Want to pass a custom adsorbate thickness
function or use volumetric bases? Can do!
- **transparency**: All code is well documented and open source. There are
no black boxes.

In-depth explanations, examples and theory can be found in the
`online documentation <https://pygaps.readthedocs.io/>`__. If you are familiar
Expand All @@ -125,7 +125,7 @@ best to explain the theory and application range of each capability and model.
To learn more, look at the
`reference <https://pygaps.readthedocs.io/en/master/reference/index.html>`__ or
simply call ``help()`` from a python interpreter (for example
``help(pygaps.area_BET)``.
``help(pygaps.PointIsotherm)``.

Citing
======
Expand Down Expand Up @@ -154,7 +154,7 @@ environments for you. First create a new environment and use conda to
install the dependencies (or start with one that already has a full
instalation). Then use pip inside your environment.

.. code-block:: bash
.. code:: bash
conda create -n myenv python=3 numpy scipy pandas matplotlib
conda activate myenv
Expand All @@ -163,7 +163,7 @@ instalation). Then use pip inside your environment.
To install the development branch, clone the repository from GitHub.
Then install the package with pip either in regular or developer mode.

.. code-block:: bash
.. code:: bash
git clone https://github.com/pauliacomi/pyGAPS
Expand Down
4 changes: 4 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root[color-mode="dark"] {
--warning: #CD4949;
--attention: #49CDAC;
}
2 changes: 2 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% extends "!layout.html" %}

55 changes: 41 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only set the theme if we're building docs locally
html_theme = 'sphinx_rtd_theme'
# if not on_rtd: # only set the theme if we're building docs locally
html_theme = "furo"


# -- Mocking of modules -----------------------------------------------------
Expand Down Expand Up @@ -56,12 +56,13 @@ def __getattr__(cls, name):
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
'sphinx_copybutton',
]
# If currently spellchecking
if os.getenv('SPELLCHECK'):
extensions += 'sphinxcontrib.spelling'
spelling_show_suggestions = True
spelling_lang = 'en_US'
spelling_lang = 'en_UK'

# The suffix of source filenames.
source_suffix = '.rst'
Expand All @@ -71,7 +72,7 @@ def __getattr__(cls, name):

# General information about the project.
project = 'pygaps'
year = '2021'
year = '2022'
author = 'Paul Iacomi'
copyright = f'{year}, {author}'
try:
Expand All @@ -81,17 +82,15 @@ def __getattr__(cls, name):
from pkg_resources import get_distribution as imp_version
version = release = imp_version("pygaps").version

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.']

# Needed for jupyter notebook compilation by nbsphinx
exclude_patterns = [
'_build',
'**.ipynb_checkpoints',
]

# Needed for jupyter notebook compilation by nbsphinx
pygments_style = 'trac'
# Style of code colorization
pygments_style = 'manni'
pygments_dark_style = 'dracula'

# Suppressing the nonlocal_uri image warning, as it appears due to
# github badges being stored on another server
Expand All @@ -118,22 +117,50 @@ def __getattr__(cls, name):

# -- Options for HTML output ---------------------------------------------------

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "logo.png"
html_logo = "logo.svg"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = 'favicon.ico'

# Custom CSS/JS
html_static_path = ["_static"]
# html_css_files = [
# 'css/custom.js',
# ]
# html_js_files = [
# 'js/darkmode.js',
# ]

# Others
html_last_updated_fmt = '%b %d, %Y'
html_split_index = False
html_sidebars = {
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
# html_sidebars = {
# '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
# }
html_short_title = '%s-%s' % (project, version)

# Other options
html_theme_options = {
"sidebar_hide_name": True,
"navigation_with_keys": True,
"light_css_variables": {
"color-brand-primary": "#c2389e",
"color-background-secondary": "#f0fbff",
},
"dark_css_variables": {
"color-brand-primary": "#c2389e",
"color-background-primary": "#151420",
"color-background-secondary": "#1a1d25",
},
}

# -- napoleon configuration -----------------------------------------------------

napoleon_use_ivar = True
Expand Down
Empty file removed docs/examples/cli.ipynb
Empty file.
42 changes: 41 additions & 1 deletion docs/examples/parsing.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 6d7a906

Please sign in to comment.