Skip to content

Commit ce12a66

Browse files
authored
Merge branch 'main' into devel
2 parents 96114da + 7098073 commit ce12a66

File tree

98 files changed

+2444
-2314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2444
-2314
lines changed

.github/workflows/pytest_docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ jobs:
5050
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
5151
run: |
5252
poetry run pytest --color=yes --webdriver Firefox --headless crystal_toolkit/apps/examples/tests/
53-

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: release
22

3-
on:
3+
on:
44
workflow_dispatch
55

66
jobs:

.pre-commit-config.yaml

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
4+
default_stages: [commit]
5+
6+
default_install_hook_types: [pre-commit, commit-msg]
7+
8+
# ignore generated doc and dependency lock files
9+
exclude: ^(docs/.+|.*lock.*)$
10+
111
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: stable
12+
- repo: https://github.com/PyCQA/isort
13+
rev: 5.10.1
414
hooks:
5-
- id: black
15+
- id: isort
16+
17+
- repo: https://github.com/psf/black
18+
rev: 22.6.0
19+
hooks:
20+
- id: black-jupyter
21+
22+
- repo: https://github.com/PyCQA/flake8
23+
rev: 4.0.1
24+
hooks:
25+
- id: flake8
26+
27+
- repo: https://github.com/asottile/pyupgrade
28+
rev: v2.34.0
29+
hooks:
30+
- id: pyupgrade
31+
args: [--py38-plus]
32+
33+
- repo: https://github.com/pre-commit/mirrors-mypy
34+
rev: v0.961
35+
hooks:
36+
- id: mypy
37+
38+
- repo: https://github.com/pre-commit/pre-commit-hooks
39+
rev: v4.3.0
40+
hooks:
41+
- id: check-case-conflict
42+
- id: check-symlinks
43+
- id: check-yaml
44+
- id: destroyed-symlinks
45+
- id: end-of-file-fixer
46+
exclude: ^assets/.+\.(svg|html)$
47+
- id: mixed-line-ending
48+
- id: trailing-whitespace
49+
50+
- repo: https://github.com/codespell-project/codespell
51+
rev: v2.1.0
52+
hooks:
53+
- id: codespell
54+
stages: [commit, commit-msg]
55+
exclude_types: [csv, svg, html, yaml, jupyter]
56+
57+
- repo: local
58+
hooks:
59+
- id: svg-assets
60+
name: SVG assets
61+
entry: Files under assets/* must end in .(svg|html)
62+
language: fail
63+
files: ^assets/.*(?<!\.svg)(?<!\.html)$
64+
65+
- repo: https://github.com/myint/autoflake
66+
rev: v1.4
67+
hooks:
68+
- id: autoflake
69+
args:
70+
- --in-place
71+
- --remove-unused-variables
72+
- --remove-all-unused-imports
73+
- --expand-star-imports
74+
- --ignore-init-module-imports
75+
76+
- repo: https://github.com/nbQA-dev/nbQA
77+
rev: 1.3.1
78+
hooks:
79+
- id: nbqa-pyupgrade
80+
args: [--py38-plus]
81+
- id: nbqa-isort
82+
- id: nbqa-flake8
83+
args: [--ignore=E402]

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Crystal Toolkit
22

3-
**Crystal Toolkit is not ready for the public yet! Please wait for a release announcement soon, thank you :-)**
3+
# Call for new contributors
4+
5+
Crystal Toolkit is an academic project. A manuscript is in preparation to detail the design goals of Crystal Toolkit and achievements to date.
6+
7+
**If you are interested in getting involved in Crystal Toolkit and are not already, it is not too late to be included in this manuscript, but please get in touch with [email protected] ASAP.** Include information on the specific contributions that you would like to make (e.g. this may include adding features, addressing bugs, writing documentation, manuscript preparation, community engagement, writing tests, and the like), and if these align with the project we can formally add you to the development team.
8+
9+
Following a discussion with a potential contributor, "new contributor" issues are assigned. A current list of new contributor issues can be seen [here](https://github.com/materialsproject/crystaltoolkit/labels/new-contributor).
10+
11+
## Status
412

513
[![Pytest Status](https://github.com/materialsproject/crystaltoolkit/workflows/pytest_and_docs/badge.svg)](https://github.com/materialsproject/crystaltoolkit/actions?query=workflow%3Apytest_and_docs)
614
[![Visual Regression Test Status](https://percy.io/static/images/percy-badge.svg)](https://percy.io/Materials-Project/crystaltoolkit)
@@ -33,16 +41,16 @@ New contributors are welcome, please see our [Code of Conduct.](code-of-conduct.
3341

3442
The Crystal Toolkit repo currently contains three major parts:
3543

36-
* An object-orientated Python framework for rendering materials science data based on the schema employed by the Materials Proejct
44+
* An object-orientated Python framework for rendering materials science data based on the schema employed by the Materials Project
3745
* A few custom Plotly Dash components (Simple3DSceneComponent, JSONComponent, GraphComponent)
3846
* Some example apps using these components
3947

4048
It is likely the custom Plotly Dash components might be spun off into a separate repo at some point to reduce the complexity of the Crystal Toolkit repo itself.
4149

4250
## Acknowledgements
4351

44-
Thank you to all the authors and maintainers of the libraries Crystal Toolkit
45-
depends upon, and in particular [pymatgen](http://pymatgen.org) for crystallographic
52+
Thank you to all the authors and maintainers of the libraries Crystal Toolkit
53+
depends upon, and in particular [pymatgen](http://pymatgen.org) for crystallographic
4654
analysis and [Dash from Plotly](https://plot.ly/products/dash/) for their web app framework.
4755

4856
Thank you to the [NERSC Spin](http://www.nersc.gov/users/data-analytics/spin/) service for

code-of-conduct.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
4646
version 1.3.0, available at https://www.contributor-covenant.org/version/1/3/0/code-of-conduct.html
4747

4848
[homepage]: https://www.contributor-covenant.org
49-

crystal_toolkit/__init__.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1+
from __future__ import annotations
2+
13
import json
24
import os as _os
35
from collections import defaultdict
46
from pathlib import Path
7+
from typing import Any
58

69
# pleasant hack to support MSONable objects in Dash callbacks natively
710
from monty.json import MSONable
811

9-
from crystal_toolkit.renderables import *
12+
from crystal_toolkit.renderables import (
13+
Lattice,
14+
Molecule,
15+
MoleculeGraph,
16+
PhaseDiagram,
17+
Site,
18+
Structure,
19+
StructureGraph,
20+
VolumetricData,
21+
)
1022

11-
__version__ = "2022.06.08"
23+
__version__ = "2022.07.25"
1224

1325
MODULE_PATH = Path(__file__).parents[0]
1426

@@ -21,7 +33,7 @@ def to_plotly_json(self):
2133

2234

2335
# Populate the default values from the JSON file
24-
_DEFAULTS = defaultdict(lambda: None)
36+
_DEFAULTS: dict[str, Any] = defaultdict()
2537
default_js = _os.path.join(
2638
_os.path.join(_os.path.dirname(_os.path.abspath(__file__))), "./", "defaults.json"
2739
)
@@ -43,8 +55,8 @@ def _repr_mimebundle_(self, include=None, exclude=None):
4355
This only works in Jupyter Lab 3.x or above.\n\n
4456
"""
4557

46-
help_text_plotly = """If you see this text, the Plotly Jupyter Lab extension
47-
is not installed, please consult Plotly documentation for information on how to
58+
help_text_plotly = """If you see this text, the Plotly Jupyter Lab extension
59+
is not installed, please consult Plotly documentation for information on how to
4860
install.
4961
"""
5062

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
2-
3-
41
body, html, .body {
52
background: #f3f3f3 !important;
63
}
7-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"10.26434/chemrxiv.11294480.v1": "D. Waroquiers, J. George, M. Horton, S. Schenk, K. Persson, G.-M. Rignanese, X. Gonze, and G. Hautier, \u201cChemEnv\u202f: A Fast and Robust Coordination Environment Identification Tool,\u201d Dec. 2019.\n", "10.3389/fmats.2017.00034": "N. E. R. Zimmermann, M. K. Horton, A. Jain, and M. Haranczyk, \u201cAssessing Local Structure Motifs Using Order Parameters for Motif Recognition, Interstitial Identification, and Diffusion Path Characterization,\u201d Frontiers in Materials, vol. 4, Nov. 2017.\n"}
1+
{"10.26434/chemrxiv.11294480.v1": "D. Waroquiers, J. George, M. Horton, S. Schenk, K. Persson, G.-M. Rignanese, X. Gonze, and G. Hautier, \u201cChemEnv\u202f: A Fast and Robust Coordination Environment Identification Tool,\u201d Dec. 2019.\n", "10.3389/fmats.2017.00034": "N. E. R. Zimmermann, M. K. Horton, A. Jain, and M. Haranczyk, \u201cAssessing Local Structure Motifs Using Order Parameters for Motif Recognition, Interstitial Identification, and Diffusion Path Characterization,\u201d Frontiers in Materials, vol. 4, Nov. 2017.\n"}

crystal_toolkit/apps/assets/task_ids_on_load.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

crystal_toolkit/apps/examples/GaN_bs.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)