Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent 0265d02 commit 31fbe53
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion crystal_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from monty.json import MSONable

import crystal_toolkit.helpers.layouts as ctl
from crystal_toolkit.core.plugin import CrystalToolkitPlugin
from crystal_toolkit.core.jupyter import patch_msonable
from crystal_toolkit.core.plugin import CrystalToolkitPlugin
from crystal_toolkit.renderables import (
Lattice,
Molecule,
Expand Down
6 changes: 3 additions & 3 deletions docs_rst/components/bulma_layouts.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Bulma Layouts
-------------

`Bulma <https://bulma.io>`_ is a popular CSS-only web framework which can make it easier to build responsive web interfaces.
`Bulma <https://bulma.io>`_ is a popular CSS-only web framework which can make it easier to build responsive web interfaces.
This is an alternative to other frameworks, such as Bootstrap, which require additional JavaScript to be loaded.

Crystal Toolkit provides wrappers around the in-built Dash HTML components with Bulma CSS styles pre-applied.
Expand All @@ -16,5 +16,5 @@ To use::
ctl.Column([])
])

Most Bulma styles are supported and fully type-hinted in Python. It is recommended to keep the Bulma docs open when
using these components to make it easier to understand how to achieve specific layouts!
Most Bulma styles are supported and fully type-hinted in Python. It is recommended to keep the Bulma docs open when
using these components to make it easier to understand how to achieve specific layouts!
8 changes: 4 additions & 4 deletions docs_rst/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ transform crystal structures and molecules.
Citation
--------

Crystal Toolkit was created as an academic project to solve specific problems. It is open sourced in the
Crystal Toolkit was created as an academic project to solve specific problems. It is open sourced in the
hopes that it is helpful for others but without guarantee of support.

If you use Crystal Toolkit for your own apps, please cite the Crystal Toolkit publication:
Expand All @@ -30,7 +30,7 @@ Crystal Toolkit Demonstration App

The new Materials Project website is powered by the Crystal Toolkit framework, visit it
`here. <https://next-gen.materialsproject.org>`_. This includes the original "Crystal
Toolkit" app `available here <https://next-gen.materialsproject.org/toolkit>`_, which was an app on the
Toolkit" app `available here <https://next-gen.materialsproject.org/toolkit>`_, which was an app on the
Materials Project that gave the Crystal Toolkit library its name.


Expand Down Expand Up @@ -60,7 +60,7 @@ For Jupyter integration, please see the `additional installation steps <jupyter>
Modernization
-------------

Please see the `Modernization <>`_ page for more information on how Crystal Toolkit is changing
Please see the `Modernization <>`_ page for more information on how Crystal Toolkit is changing
due to the availability of new features in Dash. The required minimum version is now Dash 2.11.


Expand All @@ -70,7 +70,7 @@ Development Team
Crystal Toolkit is the result of the combined efforts of the `Crystal Toolkit Development Team <https://github.com/materialsproject/crystaltoolkit/graphs/contributors>`_.
It was created by `Matthew Horton <https://github.com/mkhorton>`_.

More information on individual contributions can be seen in the `GitHub README <https://github.com/materialsproject/crystaltoolkit#team-and-contribution-policy>`_ and
More information on individual contributions can be seen in the `GitHub README <https://github.com/materialsproject/crystaltoolkit#team-and-contribution-policy>`_ and
the associated publication.

New contributors are welcome, please see our `Code of Conduct. <https://github.com/materialsproject/crystaltoolkit/blob/master/code-of-conduct.md>`_
8 changes: 4 additions & 4 deletions docs_rst/jupyter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Caveats
-------

Crystal Toolkit now uses Dash's in-built `Jupyter integration <https://dash.plotly.com/dash-in-jupyter>`_.
Previous versions of Crystal Toolkit used a customer Jupyter extension, but this extension was limited in scope,
difficult to maintain, and restricted usage to specific versions of Jupyter (Jupyter Lab 2+). The new solution
Previous versions of Crystal Toolkit used a customer Jupyter extension, but this extension was limited in scope,
difficult to maintain, and restricted usage to specific versions of Jupyter (Jupyter Lab 2+). The new solution
runs a Dash server behind-the-scenes.

Issues might be encountered when running behind a proxy. To fix, try::
Expand All @@ -26,5 +26,5 @@ Issues might be encountered when running behind a proxy. To fix, try::

jupyter_dash.infer_jupyter_proxy_config()

Alternatively, consult the Dash documentation or forums for help. The default port is 8884, but can be modified
by setting the ``CT_JUPYTER_EMBED_PORT`` environment variable.
Alternatively, consult the Dash documentation or forums for help. The default port is 8884, but can be modified
by setting the ``CT_JUPYTER_EMBED_PORT`` environment variable.
22 changes: 11 additions & 11 deletions docs_rst/modernization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
Modernization
=============

Crystal Toolkit has been able to work with both Dash 1.x and Dash 2. However,
several design choices were made before Dash 2 was developed that can now be
Crystal Toolkit has been able to work with both Dash 1.x and Dash 2. However,
several design choices were made before Dash 2 was developed that can now be
replaced with first-party solutions now provided by Dash 2.

The minimum version required is now Dash 2.11.

Wherever possible, changes will be made gradually and in a backwards-compatible way.
However, please pay attention to deprecation warnings!

The overall goal is to defer to first-party solutions wherever possible, with the
The overall goal is to defer to first-party solutions wherever possible, with the
hope of making the Crystal Toolkit codebase leaner and simpler.

Plugin
------

Previously, a `ctc.register_crystal_toolkit()` line was required in every Crystal Toolkit
Previously, a `ctc.register_crystal_toolkit()` line was required in every Crystal Toolkit
app. Dash now supports plugins, so the new solution is::

from crystal_toolkit import CrystalToolkitPlugin
Expand All @@ -30,15 +30,15 @@ app. Dash now supports plugins, so the new solution is::
Jupyter
-------

Previously, Crystal Toolkit supplied its own Jupyter Lab extension. While this is still
installed by default to render ``Scene`` objects, most end users will now use a Dash-based
Jupyter renderer. This will allow for display of Crystal Toolkit components in Jupyter
Previously, Crystal Toolkit supplied its own Jupyter Lab extension. While this is still
installed by default to render ``Scene`` objects, most end users will now use a Dash-based
Jupyter renderer. This will allow for display of Crystal Toolkit components in Jupyter
exactly as in its Dash app counterpart.

Pagination
----------

Crystal Toolkit as developed before first-party support for multipage apps was developed. As
Crystal Toolkit as developed before first-party support for multipage apps was developed. As
such, there are some limitations for very large Crystal Toolkit apps, which result in a lot of
``dcc.Store`` elements being added to a layout. This design choice can now be reconsidered.
This improvement is pending.
Expand All @@ -47,6 +47,6 @@ This improvement is pending.
All-in-One Components and Pattern-Matched Callbacks
---------------------------------------------------

Crystal Toolkit as developed before pattern-matched callbacks were available, and before
the "all-in-one" component pattern was established. Many components can now be simplified
to use these features. This improvement is pending.
Crystal Toolkit as developed before pattern-matched callbacks were available, and before
the "all-in-one" component pattern was established. Many components can now be simplified
to use these features. This improvement is pending.

0 comments on commit 31fbe53

Please sign in to comment.