Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for isort configuration #2366

Merged
merged 2 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ jobs:
continue-on-error: true
run: |
cd python/
python3 -m isort --check dolfinx
python3 -m isort --check demo
python3 -m isort --check test
python3 -m isort --check .
- name: mypy checks
run: |
python3 -m pip install types-setuptools
Expand Down
2 changes: 1 addition & 1 deletion python/.isort.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[settings]
src_paths = ["demo", "dolfinx", "test"]
src_paths = demo,dolfinx,test
known_first_party = basix,dolfinx,ffcx,ufl
known_third_party = gmsh,numpy,pytest
known_mpi = mpi4py,petsc4py
Expand Down
1 change: 1 addition & 0 deletions python/demo/demo_gmsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


from dolfinx.io import XDMFFile, gmshio

from mpi4py import MPI

# -
Expand Down
1 change: 1 addition & 0 deletions python/demo/demo_poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

from mpi4py import MPI
from petsc4py.PETSc import ScalarType

# -

# We begin by using {py:func}`create_rectangle
Expand Down
1 change: 1 addition & 0 deletions python/demo/demo_stokes.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@

from mpi4py import MPI
from petsc4py import PETSc

# -

# We create a {py:class}`Mesh <dolfinx.mesh.Mesh>`, define functions to
Expand Down
6 changes: 3 additions & 3 deletions python/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import dolfinx
import datetime
import os
import sys

sys.path.insert(0, os.path.abspath('.'))
import dolfinx

import jupytext_process # noqa
sys.path.insert(0, os.path.abspath('.'))

import jupytext_process # noqa

jupytext_process.process()

Expand Down
4 changes: 2 additions & 2 deletions python/doc/source/jupytext_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# SPDX-License-Identifier: LGPL-3.0-or-later

import shutil
import pathlib
import os
import pathlib
import shutil

import jupytext

Expand Down
4 changes: 2 additions & 2 deletions python/dolfinx/io/gmshio.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import ufl
from dolfinx import cpp as _cpp
from dolfinx.mesh import (CellType, Mesh, create_mesh, meshtags,
meshtags_from_entities, create_cell_partitioner, GhostMode)
from dolfinx.mesh import (CellType, GhostMode, Mesh, create_cell_partitioner,
create_mesh, meshtags, meshtags_from_entities)

from mpi4py import MPI as _MPI

Expand Down
5 changes: 3 additions & 2 deletions python/test/unit/fem/test_assemble_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
dirichletbc, form)
from dolfinx.fem.petsc import (apply_lifting, assemble_matrix, assemble_vector,
set_bc)
from dolfinx.mesh import (GhostMode, Mesh, create_unit_square, meshtags, meshtags_from_entities,
locate_entities_boundary)
from dolfinx.mesh import (GhostMode, Mesh, create_unit_square,
locate_entities_boundary, meshtags,
meshtags_from_entities)

from mpi4py import MPI
from petsc4py import PETSc
Expand Down
2 changes: 1 addition & 1 deletion python/test/unit/fem/test_element_integrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from dolfinx.fem import (Constant, Function, FunctionSpace,
VectorFunctionSpace, assemble_scalar, form)
from dolfinx.fem.petsc import assemble_matrix, assemble_vector
from dolfinx.mesh import CellType, meshtags, create_mesh
from dolfinx.mesh import CellType, create_mesh, meshtags

from mpi4py import MPI
from petsc4py import PETSc
Expand Down
3 changes: 2 additions & 1 deletion python/test/unit/fem/test_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import numpy.typing

import basix
import dolfinx.cpp
import ufl
from dolfinx.cpp.la.petsc import create_matrix
from dolfinx.fem import (Constant, Expression, Function, FunctionSpace,
Expand All @@ -24,7 +25,7 @@
from mpi4py import MPI
from petsc4py import PETSc
from petsc4py import get_config as PETSc_get_config
import dolfinx.cpp

dolfinx.cpp.common.init_logging(["-v"])
# Get details of PETSc install
petsc_dir = PETSc_get_config()['PETSC_DIR']
Expand Down
1 change: 0 additions & 1 deletion python/test/unit/fem/test_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

from mpi4py import MPI


parametrize_cell_types = pytest.mark.parametrize(
"cell_type", [
CellType.interval,
Expand Down
2 changes: 1 addition & 1 deletion python/test/unit/io/test_adios2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import ufl
from dolfinx.common import has_adios2
from dolfinx.fem import Function, FunctionSpace, VectorFunctionSpace
from dolfinx.graph import create_adjacencylist
from dolfinx.mesh import (CellType, create_mesh, create_unit_cube,
create_unit_square)
from dolfinx.graph import create_adjacencylist

from mpi4py import MPI

Expand Down
8 changes: 4 additions & 4 deletions python/test/unit/mesh/test_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
is_simplex)
from dolfinx.fem import assemble_scalar, form
from dolfinx.mesh import (CellType, DiagonalType, GhostMode, create_box,
create_interval, create_rectangle, create_submesh, create_unit_cube,
create_unit_interval, create_unit_square,
exterior_facet_indices, locate_entities,
locate_entities_boundary)
create_interval, create_rectangle, create_submesh,
create_unit_cube, create_unit_interval,
create_unit_square, exterior_facet_indices,
locate_entities, locate_entities_boundary)

from mpi4py import MPI

Expand Down