Skip to content

Commit

Permalink
Blackify & optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bennybp committed May 14, 2024
1 parent f389c67 commit 2513d5d
Show file tree
Hide file tree
Showing 162 changed files with 281 additions and 177 deletions.
83 changes: 41 additions & 42 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# Import the package for version info
import qcfractal

# Other packages
import os
import datetime

# Import the package for version info
import qcfractal

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
Expand All @@ -24,9 +23,11 @@

# -- Project information -----------------------------------------------------

project = 'QCArchive'
copyright = f'2018-{datetime.datetime.today().year}, The Molecular Sciences Software Institute'
author = 'Molecular Sciences Software Institute'
project = "QCArchive"
copyright = (
f"2018-{datetime.datetime.today().year}, The Molecular Sciences Software Institute"
)
author = "Molecular Sciences Software Institute"

# The short X.Y version
version = qcfractal.__version__
Expand All @@ -40,83 +41,81 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.extlinks',
'sphinx_design',
'sphinxcontrib.autodoc_pydantic',
'sphinx_copybutton',
'myst_nb',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.extlinks",
"sphinx_design",
"sphinxcontrib.autodoc_pydantic",
"sphinx_copybutton",
"myst_nb",
]

# Some options
add_module_names = False
autoclass_content = "both"
autodoc_typehints = 'description'
autodoc_typehints = "description"
autodoc_default_options = {
'members': True,
'undoc-members': True,
'inherited-members': "BaseModel",
'show-inheritance': True,
'member-order': 'bysource',
"members": True,
"undoc-members": True,
"inherited-members": "BaseModel",
"show-inheritance": True,
"member-order": "bysource",
}
autodoc_pydantic_model_show_json = False
autodoc_pydantic_settings_show_json = False

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

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['.ipynb_checkpoints/*']
exclude_patterns = [".ipynb_checkpoints/*"]


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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'pydata_sphinx_theme'
html_theme = "pydata_sphinx_theme"

html_theme_options = {
"github_url": "https://github.com/MolSSI/QCFractal",

"logo": {
"image_light": "qcarchive_logo.svg",
"image_dark": "qcarchive_logo_inverted.svg",
"text": "QCArchive",
"molssi_light": "molssi_main_logo.png",
"molssi_dark": "molssi_main_logo_inverted_white.png",
"image_light": "qcarchive_logo.svg",
"image_dark": "qcarchive_logo_inverted.svg",
"text": "QCArchive",
"molssi_light": "molssi_main_logo.png",
"molssi_dark": "molssi_main_logo_inverted_white.png",
},
"show_toc_level": 2,
"header_links_before_dropdown": 6,
"external_links": [
{"name": "MolSSI", "url": "https://molssi.org"}
],

"external_links": [{"name": "MolSSI", "url": "https://molssi.org"}],
"secondary_sidebar_items": ["page-toc", "sourcelink"],
"footer_start": [ "molssi_footer" ],
"footer_start": ["molssi_footer"],
"footer_end": [],
}

html_css_files = ['css/custom.css']
html_css_files = ["css/custom.css"]

html_context = {
'extrahead': '<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">'
"extrahead": '<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">'
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# -- extlinks extension ----------------------------------------------------

extlinks = {
'issue': ('https://github.com/MolSSI/QCFractal/issues/%s', 'Issue %s'),
'pr': ('https://github.com/MolSSI/QCFractal/pull/%s', 'PR %s'),
'contrib': ('https://github.com/%s', '@%s'),
"issue": ("https://github.com/MolSSI/QCFractal/issues/%s", "Issue %s"),
"pr": ("https://github.com/MolSSI/QCFractal/pull/%s", "PR %s"),
"contrib": ("https://github.com/%s", "@%s"),
}
1 change: 1 addition & 0 deletions qcarchivetesting/qcarchivetesting/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains testing infrastructure for QCFractal.
"""

from __future__ import annotations

import json
Expand Down
2 changes: 1 addition & 1 deletion qcarchivetesting/qcarchivetesting/test_full_neb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import time
from typing import TYPE_CHECKING

from qcarchivetesting import load_molecule_data
from qcportal.neb import NEBKeywords
from qcportal.optimization import OptimizationSpecification
from qcportal.record_models import RecordStatusEnum
from qcarchivetesting import load_molecule_data
from qcportal.singlepoint import QCSpecification

if TYPE_CHECKING:
Expand Down
1 change: 1 addition & 0 deletions qcarchivetesting/qcarchivetesting/testing_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Pytest fixtures for QCArchive
"""

from __future__ import annotations

import secrets
Expand Down
2 changes: 1 addition & 1 deletion qcfractal/qcfractal/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from sqlalchemy import engine_from_config, pool

from qcfractal.db_socket import BaseORM
from qcfractal.components import register_all
from qcfractal.components import register_all # noqa

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2019-07-02 22:51:25.613742
"""

from alembic import op
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Create Date: 2019-07-09 12:02:39.164203
"""
from alembic import op
import sqlalchemy as sa

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "6adeb5d3032e"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Create Date: 2019-07-23 16:06:28.766128
"""
from alembic import op
import sqlalchemy as sa

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "26cfd7b0439e"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2019-07-26 15:31:14.811337
"""

from alembic import op
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
Create Date: 2019-08-10 17:41:15.520300
"""
from alembic import op
import sqlalchemy as sa
import numpy as np

import os
import sys

import numpy as np

sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))

from migration_helpers import msgpack_migrations
from qcelemental.util import msgpackext_dumps, msgpackext_loads
from qcelemental.util import msgpackext_dumps

# revision identifiers, used by Alembic.
revision = "963822c28879"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
Create Date: 2019-08-11 22:30:51.453746
"""
from alembic import op
import sqlalchemy as sa

import os
import sys

sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
from migration_helpers import msgpack_migrations
from qcelemental.util import msgpackext_dumps, msgpackext_loads

# revision identifiers, used by Alembic.
revision = "05ceea11b78a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Create Date: 2019-08-11 17:21:43.328492
"""
from alembic import op
import sqlalchemy as sa

import os
import sys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
Create Date: 2019-08-11 17:21:40.264688
"""
from alembic import op
import sqlalchemy as sa
import numpy as np

import os
import sys

import numpy as np
import sqlalchemy as sa

sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
from migration_helpers import msgpack_migrations
from qcelemental.util import msgpackext_dumps, msgpackext_loads
from qcelemental.util import msgpackext_dumps

# revision identifiers, used by Alembic.
revision = "84c94a48e491"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2019-08-11 22:30:27.613722
"""

from alembic import op
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Create Date: 2019-08-11 16:17:23.856255
"""
from alembic import op
import sqlalchemy as sa

import os
import sys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
Create Date: 2019-08-12 10:12:46.478628
"""
from alembic import op
import sqlalchemy as sa

import os
import sys

sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
from migration_helpers import msgpack_migrations
from qcelemental.util import msgpackext_dumps, msgpackext_loads
from qcelemental.util import msgpackext_dumps

# revision identifiers, used by Alembic.
revision = "da7c6f141bcb"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
Create Date: 2019-08-12 10:13:09.694643
"""
from alembic import op
import sqlalchemy as sa

import os
import sys

sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
from migration_helpers import msgpack_migrations
from qcelemental.util import msgpackext_dumps, msgpackext_loads

# revision identifiers, used by Alembic.
revision = "e32b61e2516f"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2019-08-19 16:35:19.100113
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.orm.session import Session
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
Create Date: 2019-09-19 15:10:26.146940
"""
from alembic import op
import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision = "cc54842bb6ba"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
Create Date: 2019-09-30 10:31:23.552722
"""
from alembic import op

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2019-10-08 11:06:15.438742
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
Create Date: 2019-10-17 14:03:07.364322
"""
from alembic import op

import sqlalchemy as sa
import qcfractal
from alembic import op

import qcfractal

# revision identifiers, used by Alembic.
import qcfractal.db_socket.column_types
Expand Down
Loading

0 comments on commit 2513d5d

Please sign in to comment.