From 3cf63cbbd2b62c1e2d2618169ee361884e1bdfdf Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 11:31:31 +0000 Subject: [PATCH 1/7] removed show plasma option --- .pre-commit-config.yaml | 1 - .../render_of_random_reactor_gif.py | 2 +- .../negative_triangularity_reactor.py | 36 ++++++++----------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65d1e5199..ec6250102 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,3 @@ - repos: - repo: https://github.com/psf/black rev: 22.1.0 diff --git a/examples/example_parametric_reactors/render_of_random_reactor_gif.py b/examples/example_parametric_reactors/render_of_random_reactor_gif.py index 4f452e841..399f75c89 100644 --- a/examples/example_parametric_reactors/render_of_random_reactor_gif.py +++ b/examples/example_parametric_reactors/render_of_random_reactor_gif.py @@ -81,7 +81,7 @@ def create_reactor_renders( # renders the scene my_render = pyrender.OffscreenRenderer(1000, 1000) - color, depth = my_render.render(scene) + color, _ = my_render.render(scene) # adds the render to the plot as a subplot in the correct location plt.plot() diff --git a/paramak/parametric_reactors/negative_triangularity_reactor.py b/paramak/parametric_reactors/negative_triangularity_reactor.py index e155e1c52..a10a88fac 100644 --- a/paramak/parametric_reactors/negative_triangularity_reactor.py +++ b/paramak/parametric_reactors/negative_triangularity_reactor.py @@ -43,9 +43,7 @@ class NegativeTriangularityReactor(paramak.Reactor): port_z_pos: List containing the Z position of the ports as Zero in the centre of the reactor (cm), outer_tf_coil_thickness: Outer Toroidal Field coil thickness (cm) - - defaults to the inner Toroidal Field coil thickness, - show_plasma: Boolean to include (True) or exlcude (False) plasma from - the model, + defaults to the inner Toroidal Field coil thickness,, low_aspect: Boolean allowing a swift switch between a lower aspect-ratio reactor (True) where the inner blanket is cut by the center column, whereas (False) non-low-aspect will produce a full @@ -69,8 +67,8 @@ def __init__( divertor_height_full: float = 300, number_of_coils: int = 12, tf_width: float = 75, - pf_coil_heights: Optional[Union[float, list]] = [75, 75, 150, 75, 75], - pf_coil_widths: Optional[Union[float, list]] = [70, 70, 150, 70, 70], + pf_coil_heights: Optional[Union[float, List[float]]] = [75, 75, 150, 75, 75], + pf_coil_widths: Optional[Union[float, List[float]]] = [70, 70, 150, 70, 70], pf_coil_center_points: Optional[Union[list, tuple]] = [ (350, 850), (1350, 650), @@ -78,15 +76,14 @@ def __init__( (1350, -650), (350, -850), ], - pf_coil_casing_thickness: Optional[float] = [15, 15, 15, 15, 15], + pf_coil_casing_thickness: Optional[List[float]] = [15, 15, 15, 15, 15], rotation_angle: float = 180, - inner_bore_radius: Optional[float] = 50, - port_side_lengths: Optional[list] = [200, 200, 150], - port_heights: Optional[list] = [200, 100, 400], - port_angles: Optional[list] = [75, 170, 15], - port_z_pos: Optional[list] = [500, -500, 200], - outer_tf_coil_thickness: float = None, - show_plasma: bool = True, + inner_bore_radius: float = 50, + port_side_lengths: Optional[List[float]] = [200, 200, 150], + port_heights: Optional[List[float]] = [200, 100, 400], + port_angles: Optional[List[float]] = [75, 170, 15], + port_z_pos: Optional[List[float]] = [500, -500, 200], + outer_tf_coil_thickness: Optional[float] = None, low_aspect: bool = False, ): @@ -116,7 +113,6 @@ def __init__( self._pf_casing_thickness = pf_coil_casing_thickness self._rotation_angle = rotation_angle - self.show_plasma = show_plasma self._low_aspect = low_aspect self._number_of_coils = number_of_coils self._tf_width = tf_width @@ -151,7 +147,6 @@ def __init__( "port_angles", "port_z_pos", "outer_tf_coil_thickness", - "show_plasma", "low_aspect", ] @@ -232,9 +227,9 @@ def __init__( self._tf_end_rad = 0 def _plasma_geometry(self): - """Calculating plasma geometry from parameters - Adjust a gap between inner TF leg and vacuum vessel to accomodate a - wider range of thicknesses""" + """Calculating plasma geometry from parameters. Adjust a gap between + inner TF leg and vacuum vessel to accommodate a wider range of + thicknesses""" core_width = ( self._inner_bore_radius + self._inner_tf_coil_thickness @@ -568,10 +563,7 @@ def create_solid(self): self._make_vertical_build() self._make_radial_build() - if self.show_plasma: - shapes_and_components.append(self._make_plasma()) - else: - print("Plasma is excluded from the model.") + shapes_and_components.append(self._make_plasma()) if self._ports_enable: self._make_ports() From 2e2d5bba92391f6fd59212309b0905bbfd545b14 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 11:46:26 +0000 Subject: [PATCH 2/7] [skip ci] fixed trailing ws --- docs/source/install.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index b5980ceb5..2bea7ea0a 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -29,7 +29,7 @@ Install (conda) This is the recommended method. -Create a new environment (Python 3.6, 3.7 or 3.8 are supported). +Create a new environment (Python 3.8 and 3.9 are supported). .. code-block:: bash @@ -56,7 +56,7 @@ Now you should be ready to import paramak from your new python environment. Install (conda + pip) --------------------- -Create a new environment (Python 3.6, 3.7 or 3.8 are supported). +Create a new environment (Python 3.8 and 3.9 are supported). .. code-block:: bash @@ -84,9 +84,9 @@ needed then this stage can be skipped. .. code-block:: bash - conda install -c conda-forge moab=5.3.1 conda install -c conda-forge gmsh=4.9.4 conda install -c conda-forge python-gmsh=4.9.4 + conda install -c conda-forge 'moab>=5.3.0' Then pip install the Paramak. @@ -130,7 +130,7 @@ which includes other packages that might be of interest. * `OpenMC `_ The OpenMC project, a Monte Carlo particle transport code based on modern methods. -* `DAGMC `_ Direct Accelerated Geometry Monte Carlo Toolkit +* `DAGMC `_ Direct Accelerated Geometry Monte Carlo Toolkit * `Svalinn Cubit Plugin `_ A plugin and command extensions for Cubit that allows h5m files to be exported. @@ -142,7 +142,7 @@ which includes other packages that might be of interest. Developer Installation ---------------------- -If you want to contribute to the paramak or then you might want to install the +If you want to contribute to the paramak or then you might want to install the package using setup tools. Download and install MiniConda, create a new python environment and activate the @@ -152,7 +152,7 @@ Then install CadQuery. .. code-block:: bash - conda install -c conda-forge -c cadquery cadquery=2.1 + conda install -c conda-forge -c cadquery cadquery=master Then clone the repository From 0d58b01460f7cd33a7caa278c62e10255ca464c0 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 13:26:29 +0000 Subject: [PATCH 3/7] flake8 comments fixed --- .github/workflows/{black.yml => pep8_linting.yml} | 7 ++++++- .../render_of_random_reactors.py | 2 +- .../blanket_constant_thickness_arc_v.py | 2 +- paramak/parametric_components/blanket_fp.py | 7 ++----- .../parametric_components/center_column_circular.py | 2 +- paramak/parametric_components/extrude_rectangle.py | 2 +- .../parametric_components/inboard_firstwall_fccs.py | 2 +- paramak/parametric_components/poloidal_field_coil.py | 2 +- .../parametric_components/port_cutters_rotated.py | 2 +- paramak/parametric_components/shell_fs.py | 2 +- paramak/parametric_components/tf_coil_casing.py | 1 - paramak/parametric_components/toroidal_field_coil.py | 2 -- .../toroidal_field_coil_coat_hanger.py | 5 +---- .../toroidal_field_coil_rectangle.py | 5 +---- .../parametric_components/vacuum_vessel_inner_leg.py | 2 -- .../negative_triangularity_reactor.py | 12 ++++++------ paramak/shape.py | 3 --- .../test_capsule_vacuum_vessel.py | 12 +++++++----- .../test_toroidal_field_coil_princetond.py | 2 +- ...est_toroidal_field_coil_rectangle_round_corner.py | 4 +++- .../test_vacuum_vessel_inner_leg.py | 2 -- tests/test_parametric_reactors/test_iter_reactor.py | 2 +- .../test_rotate_straight_shape.py | 4 ---- .../test_parametric_shapes/test_sweep_mixed_shape.py | 2 +- .../test_sweep_spline_shape.py | 2 +- .../test_sweep_straight_shape.py | 2 +- tests/test_reactor.py | 1 - tests/test_shape.py | 2 -- tests/test_utils.py | 3 --- tests/test_version.py | 1 - tests_show/test_reactor.py | 4 ---- 31 files changed, 39 insertions(+), 64 deletions(-) rename .github/workflows/{black.yml => pep8_linting.yml} (66%) diff --git a/.github/workflows/black.yml b/.github/workflows/pep8_linting.yml similarity index 66% rename from .github/workflows/black.yml rename to .github/workflows/pep8_linting.yml index a329f2ee5..7d908f5db 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/pep8_linting.yml @@ -20,9 +20,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.x + - name: Lint code + script: + # Enforce style consistency across Python projects https://flake8.pycqa.org/en/latest/manpage.html + - python -m pip install --upgrade pip + - pip install flake8 + - flake8 . --show-source --statistics --max-line-length 120 - name: Install black run: | - python -m pip install --upgrade pip pip install black==22.1.0 - name: Run black run: | diff --git a/examples/example_parametric_reactors/render_of_random_reactors.py b/examples/example_parametric_reactors/render_of_random_reactors.py index 988e56c8c..5cc32bb87 100644 --- a/examples/example_parametric_reactors/render_of_random_reactors.py +++ b/examples/example_parametric_reactors/render_of_random_reactors.py @@ -43,7 +43,7 @@ def generate_random_reactor(): ]: try: input_variables.remove(input_var) - except: + except ValueError: pass print(my_reactor.__dict__, "\n\n") diff --git a/paramak/parametric_components/blanket_constant_thickness_arc_v.py b/paramak/parametric_components/blanket_constant_thickness_arc_v.py index 38fea8fb2..e4a4a4d43 100644 --- a/paramak/parametric_components/blanket_constant_thickness_arc_v.py +++ b/paramak/parametric_components/blanket_constant_thickness_arc_v.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from typing import Tuple from paramak import RotateMixedShape diff --git a/paramak/parametric_components/blanket_fp.py b/paramak/parametric_components/blanket_fp.py index 87309153c..5a8210e5d 100644 --- a/paramak/parametric_components/blanket_fp.py +++ b/paramak/parametric_components/blanket_fp.py @@ -1,5 +1,5 @@ import warnings -from typing import Callable, List, Optional, Union +from typing import Optional, Union import mpmath import numpy as np @@ -7,10 +7,7 @@ from scipy.interpolate import interp1d import paramak -from paramak import RotateMixedShape, diff_between_angles -from paramak.parametric_components.tokamak_plasma_plasmaboundaries import ( - PlasmaBoundaries, -) +from paramak import RotateMixedShape class BlanketFP(RotateMixedShape): diff --git a/paramak/parametric_components/center_column_circular.py b/paramak/parametric_components/center_column_circular.py index 4127a4fe2..32bd9e51c 100644 --- a/paramak/parametric_components/center_column_circular.py +++ b/paramak/parametric_components/center_column_circular.py @@ -1,4 +1,4 @@ -from typing import Optional, Union, Tuple +from typing import Optional, Tuple from paramak import RotateMixedShape diff --git a/paramak/parametric_components/extrude_rectangle.py b/paramak/parametric_components/extrude_rectangle.py index e25f2d8f1..07b146746 100644 --- a/paramak/parametric_components/extrude_rectangle.py +++ b/paramak/parametric_components/extrude_rectangle.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from typing import Tuple from paramak import ExtrudeStraightShape diff --git a/paramak/parametric_components/inboard_firstwall_fccs.py b/paramak/parametric_components/inboard_firstwall_fccs.py index 3dc41be17..f1bcc82f2 100644 --- a/paramak/parametric_components/inboard_firstwall_fccs.py +++ b/paramak/parametric_components/inboard_firstwall_fccs.py @@ -1,5 +1,5 @@ from collections.abc import Iterable -from typing import List, Optional, Tuple +from typing import Optional, Tuple import paramak from paramak import ( diff --git a/paramak/parametric_components/poloidal_field_coil.py b/paramak/parametric_components/poloidal_field_coil.py index 3b647419a..361d7de04 100644 --- a/paramak/parametric_components/poloidal_field_coil.py +++ b/paramak/parametric_components/poloidal_field_coil.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from typing import Tuple from paramak import RotateStraightShape diff --git a/paramak/parametric_components/port_cutters_rotated.py b/paramak/parametric_components/port_cutters_rotated.py index 7495d5390..28a201983 100644 --- a/paramak/parametric_components/port_cutters_rotated.py +++ b/paramak/parametric_components/port_cutters_rotated.py @@ -1,7 +1,7 @@ import math from paramak import RotateStraightShape -from paramak.utils import coefficients_of_line_from_points, rotate +from paramak.utils import rotate class PortCutterRotated(RotateStraightShape): diff --git a/paramak/parametric_components/shell_fs.py b/paramak/parametric_components/shell_fs.py index ff3e11392..a46e7360c 100644 --- a/paramak/parametric_components/shell_fs.py +++ b/paramak/parametric_components/shell_fs.py @@ -1,6 +1,6 @@ import cadquery as cq -from paramak import CuttingWedgeFS, Shape +from paramak import Shape class ShellFS(Shape): diff --git a/paramak/parametric_components/tf_coil_casing.py b/paramak/parametric_components/tf_coil_casing.py index 9dd4fe9ca..265f49a3c 100644 --- a/paramak/parametric_components/tf_coil_casing.py +++ b/paramak/parametric_components/tf_coil_casing.py @@ -1,5 +1,4 @@ import warnings -from typing import Optional from paramak import ExtrudeMixedShape, ExtrudeStraightShape from paramak.utils import add_thickness, cut_solid, union_solid diff --git a/paramak/parametric_components/toroidal_field_coil.py b/paramak/parametric_components/toroidal_field_coil.py index b80fc01a5..a62fc4110 100644 --- a/paramak/parametric_components/toroidal_field_coil.py +++ b/paramak/parametric_components/toroidal_field_coil.py @@ -3,8 +3,6 @@ import numpy as np from paramak import ExtrudeMixedShape, ExtrudeStraightShape -from paramak.utils import add_thickness -import cadquery as cq class ToroidalFieldCoil(ExtrudeMixedShape): diff --git a/paramak/parametric_components/toroidal_field_coil_coat_hanger.py b/paramak/parametric_components/toroidal_field_coil_coat_hanger.py index 9a60a6ec4..354fc8908 100644 --- a/paramak/parametric_components/toroidal_field_coil_coat_hanger.py +++ b/paramak/parametric_components/toroidal_field_coil_coat_hanger.py @@ -1,11 +1,8 @@ import math from typing import Optional, Tuple -import cadquery as cq -import numpy as np - from .toroidal_field_coil import ToroidalFieldCoil -from paramak.utils import calculate_wedge_cut, rotate, patch_workplane +from paramak.utils import rotate, patch_workplane patch_workplane() diff --git a/paramak/parametric_components/toroidal_field_coil_rectangle.py b/paramak/parametric_components/toroidal_field_coil_rectangle.py index a9e553e19..68bec0b9d 100644 --- a/paramak/parametric_components/toroidal_field_coil_rectangle.py +++ b/paramak/parametric_components/toroidal_field_coil_rectangle.py @@ -1,10 +1,7 @@ from typing import Optional, Tuple -import cadquery as cq -import numpy as np - from .toroidal_field_coil import ToroidalFieldCoil -from paramak.utils import calculate_wedge_cut, patch_workplane +from paramak.utils import patch_workplane patch_workplane() diff --git a/paramak/parametric_components/vacuum_vessel_inner_leg.py b/paramak/parametric_components/vacuum_vessel_inner_leg.py index a3e08a409..2a9f053a7 100644 --- a/paramak/parametric_components/vacuum_vessel_inner_leg.py +++ b/paramak/parametric_components/vacuum_vessel_inner_leg.py @@ -1,5 +1,3 @@ -from typing import Optional - import cadquery as cq from paramak import RotateStraightShape diff --git a/paramak/parametric_reactors/negative_triangularity_reactor.py b/paramak/parametric_reactors/negative_triangularity_reactor.py index a10a88fac..ab744da9c 100644 --- a/paramak/parametric_reactors/negative_triangularity_reactor.py +++ b/paramak/parametric_reactors/negative_triangularity_reactor.py @@ -592,7 +592,7 @@ def _make_plasma(self): return self._plasma def _make_vertical_build(self): - ### Above the plasma ### + # Above the plasma # Inner wall self._inner_wall_start_height = ( self._plasma.high_point[1] + self._wall_to_plasma_gap @@ -616,7 +616,7 @@ def _make_vertical_build(self): self._divertor_start_height + self._divertor_height_full ) - ### Diverter height check ### + # Diverter height check min_div_h = self._rear_wall_end_height_top - self._divertor_start_height if min_div_h > self._divertor_height_full: print( @@ -670,7 +670,7 @@ def _make_radial_build(self): + self._inner_wall_thickness ) - ### Run check for diverter parameters ### + # Run check for diverter parameters full_outer_blanket_rad = ( self._major_radius + self._minor_radius @@ -690,7 +690,7 @@ def _make_radial_build(self): ) self._divertor_radial_thickness = width_parameter_difference - ### Divertor parts ### + # Divertor parts self._divertor_start_rad = self._plasma.high_point[0] self._divertor_end_rad = ( self._divertor_start_rad + self._divertor_radial_thickness @@ -825,7 +825,7 @@ def _make_inner_shield(self): def _make_blankets(self): - ### Cutters ### + # Cutters self._divertor_cutter_cutter = paramak.CenterColumnShieldCylinder( height=self._divertor_start_height * 2, @@ -846,7 +846,7 @@ def _make_blankets(self): outer_radius=self._inner_shield_end_rad, ) - ### Blanket layers ### + # Blanket layers self._rear_wall = paramak.BlanketFP( thickness=self._rear_wall_thickness, diff --git a/paramak/shape.py b/paramak/shape.py index 29470ecd9..d0353902b 100644 --- a/paramak/shape.py +++ b/paramak/shape.py @@ -1,13 +1,10 @@ -import json import numbers import os import tempfile -import warnings from collections.abc import Iterable from pathlib import Path from typing import List, Optional, Tuple, Union -import cadquery as cq import matplotlib.pyplot as plt from cadquery import Assembly, Color, Compound, Plane, Workplane, exporters, importers from cadquery.occ_impl import shapes diff --git a/tests/test_parametric_components/test_capsule_vacuum_vessel.py b/tests/test_parametric_components/test_capsule_vacuum_vessel.py index 9c73c8322..6dde0c998 100644 --- a/tests/test_parametric_components/test_capsule_vacuum_vessel.py +++ b/tests/test_parametric_components/test_capsule_vacuum_vessel.py @@ -4,7 +4,7 @@ import paramak -"""This test evaluates the perimeter of the resultant points and asserts them agaist the known value""" +"""This test evaluates the perimeter of the resultant points and asserts them against the known value""" def perimeter(outer_start_point, radius, thickness): @@ -13,16 +13,16 @@ def perimeter(outer_start_point, radius, thickness): outer_start_point=outer_start_point, radius=radius, thickness=thickness ) point1 = test_shape.points[0] - point2 = test_shape.points[1] + # point2 = test_shape.points[1] point3 = test_shape.points[2] point4 = test_shape.points[3] - point5 = test_shape.points[4] + # point5 = test_shape.points[4] point6 = test_shape.points[5] point7 = test_shape.points[6] - point8 = test_shape.points[7] + # point8 = test_shape.points[7] point9 = test_shape.points[8] point10 = test_shape.points[9] - point11 = test_shape.points[10] + # point11 = test_shape.points[10] point12 = test_shape.points[11] straightedges = float( @@ -34,6 +34,8 @@ def perimeter(outer_start_point, radius, thickness): curvededges = float((math.pi * radius) + (math.pi * (radius - thickness))) total = float(straightedges + curvededges) + # TODO add an assert statement to test something here + return total diff --git a/tests/test_parametric_components/test_toroidal_field_coil_princetond.py b/tests/test_parametric_components/test_toroidal_field_coil_princetond.py index 501c3a9fe..4bc97275b 100644 --- a/tests/test_parametric_components/test_toroidal_field_coil_princetond.py +++ b/tests/test_parametric_components/test_toroidal_field_coil_princetond.py @@ -45,7 +45,7 @@ def test_creation_no_inner_leg(self): test_inner_leg = paramak.ExtrudeStraightShape( points=self.test_shape.inner_leg_connection_points, distance=30 ) - inner_leg_volume = test_inner_leg.volume() + test_inner_leg.volume() self.test_shape.with_inner_leg = False diff --git a/tests/test_parametric_components/test_toroidal_field_coil_rectangle_round_corner.py b/tests/test_parametric_components/test_toroidal_field_coil_rectangle_round_corner.py index 1e6d7e780..ab382330e 100644 --- a/tests/test_parametric_components/test_toroidal_field_coil_rectangle_round_corner.py +++ b/tests/test_parametric_components/test_toroidal_field_coil_rectangle_round_corner.py @@ -1,7 +1,9 @@ from math import pi import pytest -from attr.setters import NO_OP + +# # removed due to flake 8 comment +# from attr.setters import NO_OP from paramak import ToroidalFieldCoilRectangleRoundCorners diff --git a/tests/test_parametric_components/test_vacuum_vessel_inner_leg.py b/tests/test_parametric_components/test_vacuum_vessel_inner_leg.py index 066110a8d..2bc468256 100644 --- a/tests/test_parametric_components/test_vacuum_vessel_inner_leg.py +++ b/tests/test_parametric_components/test_vacuum_vessel_inner_leg.py @@ -1,7 +1,5 @@ import unittest -import pytest - import paramak diff --git a/tests/test_parametric_reactors/test_iter_reactor.py b/tests/test_parametric_reactors/test_iter_reactor.py index ff2f017a4..190c4eb82 100644 --- a/tests/test_parametric_reactors/test_iter_reactor.py +++ b/tests/test_parametric_reactors/test_iter_reactor.py @@ -37,7 +37,7 @@ def test_vessel_construction(self): checks the contruction runs""" my_reactor = paramak.IterFrom2020PaperDiagram(number_of_tf_coils=1) - plasma = my_reactor.create_plasma() + my_reactor.create_plasma() vessel_components = my_reactor.create_vessel_components() for component in vessel_components: assert component.volume() > 0 diff --git a/tests/test_parametric_shapes/test_rotate_straight_shape.py b/tests/test_parametric_shapes/test_rotate_straight_shape.py index cde814e9f..3e3fc7262 100644 --- a/tests/test_parametric_shapes/test_rotate_straight_shape.py +++ b/tests/test_parametric_shapes/test_rotate_straight_shape.py @@ -220,10 +220,6 @@ def test_multiple_cut_volume(self): """Creates a RotateStraightShape with multiple RotateStraightShapes cut out and checks that the volume is correct.""" - main_shape = RotateStraightShape( - points=[(0, 0), (0, 200), (200, 200), (200, 0)], - ) - shape_to_cut_1 = RotateStraightShape( points=[(20, 0), (20, 200), (40, 200), (40, 0)], ) diff --git a/tests/test_parametric_shapes/test_sweep_mixed_shape.py b/tests/test_parametric_shapes/test_sweep_mixed_shape.py index ec092f038..f6b52edc5 100644 --- a/tests/test_parametric_shapes/test_sweep_mixed_shape.py +++ b/tests/test_parametric_shapes/test_sweep_mixed_shape.py @@ -28,7 +28,7 @@ def test_default_parameters(self): assert self.test_shape.azimuth_placement_angle == 0 assert self.test_shape.workplane == "XY" assert self.test_shape.path_workplane == "XZ" - assert self.test_shape.force_cross_section == False + assert self.test_shape.force_cross_section is False def test_solid_construction_workplane(self): """Checks that SweepMixedShapes can be created in different workplanes""" diff --git a/tests/test_parametric_shapes/test_sweep_spline_shape.py b/tests/test_parametric_shapes/test_sweep_spline_shape.py index b6bf9b23b..010e34ec4 100644 --- a/tests/test_parametric_shapes/test_sweep_spline_shape.py +++ b/tests/test_parametric_shapes/test_sweep_spline_shape.py @@ -21,7 +21,7 @@ def test_default_parameters(self): assert self.test_shape.azimuth_placement_angle == 0 assert self.test_shape.workplane == "XY" assert self.test_shape.path_workplane == "XZ" - assert self.test_shape.force_cross_section == False + assert self.test_shape.force_cross_section is False def test_solid_construction_workplane(self): """Checks that SweepSplineShapes can be created in different workplanes.""" diff --git a/tests/test_parametric_shapes/test_sweep_straight_shape.py b/tests/test_parametric_shapes/test_sweep_straight_shape.py index 4e284dc89..85ad05937 100644 --- a/tests/test_parametric_shapes/test_sweep_straight_shape.py +++ b/tests/test_parametric_shapes/test_sweep_straight_shape.py @@ -22,7 +22,7 @@ def test_default_parameters(self): assert self.test_shape.azimuth_placement_angle == 0 assert self.test_shape.workplane == "XY" assert self.test_shape.path_workplane == "XZ" - assert self.test_shape.force_cross_section == False + assert self.test_shape.force_cross_section is False def test_absolute_shape_volume(self): """Creates a SweepStraightShape and checks that the volume is diff --git a/tests/test_reactor.py b/tests/test_reactor.py index e8d49d3c3..f44e6c781 100644 --- a/tests/test_reactor.py +++ b/tests/test_reactor.py @@ -1,4 +1,3 @@ -import json import os import unittest from pathlib import Path diff --git a/tests/test_shape.py b/tests/test_shape.py index 33b866ba1..1ce1dae55 100644 --- a/tests/test_shape.py +++ b/tests/test_shape.py @@ -1,11 +1,9 @@ -import json import os import unittest from pathlib import Path import pytest from cadquery import Plane -from numpy.testing._private.utils import assert_ import paramak diff --git a/tests/test_utils.py b/tests/test_utils.py index 8c069deab..45571743f 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,8 +1,5 @@ -import os import unittest -from pathlib import Path -import numpy as np import plotly.graph_objects as go import pytest diff --git a/tests/test_version.py b/tests/test_version.py index b7174cf2b..2cd39e7b5 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,4 +1,3 @@ -import pytest import paramak diff --git a/tests_show/test_reactor.py b/tests_show/test_reactor.py index 0dc0ee638..63ad2c616 100644 --- a/tests_show/test_reactor.py +++ b/tests_show/test_reactor.py @@ -1,11 +1,7 @@ -import json import os import unittest from pathlib import Path -import cadquery as cq -import pytest - import paramak From cf2448f5edc3613ba6a8fecf509fb487272573c8 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 14:12:08 +0000 Subject: [PATCH 4/7] removed old keywrod arg --- .../test_negative_triangularity_reactor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_parametric_reactors/test_negative_triangularity_reactor.py b/tests/test_parametric_reactors/test_negative_triangularity_reactor.py index b06e2a8b2..40cf85ef8 100644 --- a/tests/test_parametric_reactors/test_negative_triangularity_reactor.py +++ b/tests/test_parametric_reactors/test_negative_triangularity_reactor.py @@ -42,7 +42,6 @@ def setUp(self): (350, -850), ], pf_coil_casing_thickness=[5, 5, 5, 5, 5], - show_plasma=False, low_aspect=True, ) self.test_reactor.create_solid() From 079ed1fb99eed191c976a9d4e80e89e013db3b43 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 14:14:32 +0000 Subject: [PATCH 5/7] fixing lint ci --- .github/workflows/pep8_linting.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pep8_linting.yml b/.github/workflows/pep8_linting.yml index 7d908f5db..b26c0221d 100644 --- a/.github/workflows/pep8_linting.yml +++ b/.github/workflows/pep8_linting.yml @@ -21,8 +21,7 @@ jobs: with: python-version: 3.x - name: Lint code - script: - # Enforce style consistency across Python projects https://flake8.pycqa.org/en/latest/manpage.html + run: | - python -m pip install --upgrade pip - pip install flake8 - flake8 . --show-source --statistics --max-line-length 120 From 317b67d4d9899701ce566c90784fe908d5a2d0b6 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 15:10:45 +0000 Subject: [PATCH 6/7] fixed tests with plasma on as default --- .../test_negative_triangularity_reactor.py | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/tests/test_parametric_reactors/test_negative_triangularity_reactor.py b/tests/test_parametric_reactors/test_negative_triangularity_reactor.py index 40cf85ef8..27b3dc540 100644 --- a/tests/test_parametric_reactors/test_negative_triangularity_reactor.py +++ b/tests/test_parametric_reactors/test_negative_triangularity_reactor.py @@ -48,21 +48,21 @@ def setUp(self): def test_input_variable_names(self): """tests for the number of inputs variables""" - assert len(self.test_reactor.input_variable_names) == 27 + assert len(self.test_reactor.input_variable_names) == 26 def test_bore_radius_small(self): """Creates the reactor with 0cm inner bore checks if the right amount of components are adding to the object.""" self.test_reactor.inner_bore_radius = 0 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_bore_radius_large(self): """Creates the reactor with 500cm inner bore checks if the right amount of components are adding to the object.""" self.test_reactor.inner_bore_radius = 500 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_bore_radius_type(self): """Checks for bore radius input type""" @@ -74,13 +74,13 @@ def test_inner_tf_leg_small(self): """Creates the reactor with small thickness inner tf coil""" self.test_reactor.inner_tf_coil_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_inner_tf_leg_large(self): """Creates the reactor with large thickness inner tf coil""" self.test_reactor.inner_tf_coil_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_inner_tf_leg(self): """Checks inner tf coil input type""" @@ -92,13 +92,13 @@ def test_vacuum_vessel_thickness_small(self): """Creates the reactor with small thickness vacuum vessel""" self.test_reactor.vacuum_vessel_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_vacuum_vessel_thickness_large(self): """Creates the reactor with large thickness vacuum vessel""" self.test_reactor.vacuum_vessel_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_vacuum_vessel_thickness(self): """Checks vacuum vessel input type""" @@ -110,13 +110,13 @@ def test_central_shield_thickness_small(self): """Creates the reactor with small thickness inner shield""" self.test_reactor.central_shield_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_central_shield_thickness_large(self): """Creates the reactor with large thickness inner shield""" self.test_reactor.central_shield_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_central_shield_thickness(self): """Checks inner shield input type""" @@ -128,13 +128,13 @@ def test_wall_to_plasma_gap_small(self): """Creates the reactor with small plasma gap""" self.test_reactor.wall_to_plasma_gap = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_wall_to_plasma_gap_large(self): """Creates the reactor with large plasma gap""" self.test_reactor.wall_to_plasma_gap = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_wall_to_plasma_gap(self): """Checks plasma gap input type""" @@ -146,13 +146,13 @@ def test_plasma_radial_thickness_small(self): """Creates the reactor with small radial thickness plasma""" self.test_reactor.plasma_radial_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_plasma_radial_thickness_large(self): """Creates the reactor with large radial thickness plasma""" self.test_reactor.plasma_radial_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_plasma_radial_thickness(self): """Checks input type of radial plasma thickness""" @@ -164,13 +164,13 @@ def test_elongation_small(self): """Creates the reactor with small elongation""" self.test_reactor.elongation = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_elongation_large(self): """Creates the reactor with large elongation""" self.test_reactor.elongation = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_elongation(self): """Checks input type of elongation""" @@ -183,14 +183,14 @@ def test_triangularity_small(self): with pytest.raises(ValueError): self.test_reactor.triangularity = -5 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_triangularity_large(self): """Creates the reactor with large triangularity""" with pytest.raises(ValueError): self.test_reactor.triangularity = 5 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_triangularity(self): """Checks input type of triangularity""" @@ -202,13 +202,13 @@ def test_inner_wall_thickness_small(self): """Creates the reactor with small inner wall thickness""" self.test_reactor.inner_wall_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_inner_wall_thickness_large(self): """Creates the reactor with large inner wall thickness""" self.test_reactor.inner_wall_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_inner_wall_thickness(self): """Checks input type of inner wall thickness""" @@ -220,13 +220,13 @@ def test_blanket_thickness_small(self): """Creates the reactor with small blanket thickness""" self.test_reactor.blanket_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_blanket_thickness_large(self): """Creates the reactor with large blanket thickness""" self.test_reactor.blanket_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_blanket_thickness(self): """Checks input type of blanket thickness""" @@ -238,13 +238,13 @@ def test_rear_wall_thickness_small(self): """Creates the reactor with small rear wall thickness""" self.test_reactor.rear_wall_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_rear_wall_thickness_large(self): """Creates the reactor with large rear wall thickness""" self.test_reactor.rear_wall_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_rear_wall_thickness(self): """Checks input type of rear wall thickness""" @@ -256,13 +256,13 @@ def test_divertor_radial_thickness_small(self): """Creates the reactor with small divertor radial thickness""" self.test_reactor.divertor_radial_thickness = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_divertor_radial_thickness_large(self): """Creates the reactor with large divertor radial thickness""" self.test_reactor.divertor_radial_thickness = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_divertor_radial_thickness(self): """Checks input type of divertor radial thickness""" @@ -274,13 +274,13 @@ def test_divertor_height_small(self): """Creates the reactor with small divertor height""" self.test_reactor.divertor_height = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_divertor_height_large(self): """Creates the reactor with large divertor height""" self.test_reactor.divertor_height = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_divertor_height(self): """Checks input type of divertor height""" @@ -292,13 +292,13 @@ def test_tf_width_small(self): """Creates the reactor with small toroidal field coil width""" self.test_reactor.tf_width = 1 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_tf_width_large(self): """Creates the reactor with large toroidal field coil width""" self.test_reactor.tf_width = 1000 assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_tf_width(self): """Checks input type of toroidal field coil width""" @@ -310,19 +310,19 @@ def test_port_side_lengths_list(self): """Checks port side lengths is a list""" self.test_reactor.port_side_lengths = [1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_side_lengths_val_small(self): """Creates the reactor with small port side lengths""" self.test_reactor.port_side_lengths = [5, 5, 5] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_side_lengths_val_large(self): """Creates the reactor with large port side lengths""" self.test_reactor.port_side_lengths = [50, 50, 50] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_side_lengths_val(self): """Checks input type of port side lengths""" @@ -334,19 +334,19 @@ def test_port_thickness_list(self): """Checks if list is the same length as the other port related lists""" self.test_reactor.port_heights = [1, 1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_thickness_val_small(self): """Creates the reactor with small port thickness""" self.test_reactor.port_heights = [5, 5, 5] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_thickness_val_large(self): """Creates the reactor with large port thickness""" self.test_reactor.port_heights = [50, 50, 50] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_thickness_val(self): """Checks input type of port thickness""" @@ -358,19 +358,19 @@ def test_ports_angles_list(self): """Checks if list is the same length as the other port related lists""" self.test_reactor.port_angles = [1, 1, 1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_ports_angles_val_small(self): """Creates the reactor with small port angles""" self.test_reactor.port_angles = [5, 5, 5] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_ports_angles_val_large(self): """Creates the reactor with large port angles""" self.test_reactor.port_angles = [250, 250, 250] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_ports_angles_val(self): """Checks input type of port angles""" @@ -382,19 +382,19 @@ def test_port_z_pos_list(self): """Checks if the input lists for port Z-positions are the same length""" self.test_reactor.port_z_pos = [1, 1, 1, 1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_z_pos_val_small(self): """Creates the reactor with positive Z-position of ports""" self.test_reactor.port_z_pos = [10, 150, 200] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_z_pos_val_large(self): """Creates the reactor with negative Z-position of ports""" self.test_reactor.port_z_pos = [-10, -150, -200] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_port_z_pos_val(self): """Checks input type of Z-position of ports""" @@ -406,19 +406,19 @@ def test_pf_coil_heights_list(self): """Checks if the input lists for poloidal field coil height are the same length""" self.test_reactor.pf_coil_heights = [1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_heights_val_small(self): """Creates the reactor with small poloidal field coil heights""" self.test_reactor.pf_coil_heights = [5, 5, 5] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_heights_val_large(self): """Creates the reactor with large poloidal field coil heights""" self.test_reactor.pf_coil_heights = [50, 50, 50] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_heights_val(self): """Checks input type of poloidal field coil heights""" @@ -430,19 +430,19 @@ def test_pf_coil_widths_list(self): """Checks if the input lists for poloidal field coil widths are the same length""" self.test_reactor.pf_coil_widths = [1, 1, 1, 1, 1, 1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_widths_val_small(self): """Creates the reactor with small poloidal field coil widths""" self.test_reactor.pf_coil_widths = [5, 5, 5] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_widths_val_large(self): """Creates the reactor with large poloidal field coil widths""" self.test_reactor.pf_coil_widths = [50, 50, 50] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_widths_val(self): """Checks input type of poloidal field coil widths""" @@ -459,19 +459,19 @@ def test_pf_coil_center_points_list(self): (10, 10), ] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_center_points_val_small(self): """Creates the reactor with small poloidal field coil center points""" self.test_reactor.pf_coil_center_points = [(5, 5), (5, 5), (5, 5)] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_center_points_val_large(self): """Creates the reactor with large poloidal field coil center points""" self.test_reactor.pf_coil_center_points = [(500, 500), (500, 500), (500, 500)] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_coil_center_points_val(self): """Checks input type of poloidal field coil center points""" @@ -483,19 +483,19 @@ def test_pf_casing_thickness_list(self): """Checks if the input lists for poloidal field coils are the same length""" self.test_reactor.pf_coil_casing_thickness = [1, 1, 1] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_casing_thickness_val_small(self): """Creates the reactor with small poloidal field coil casing thickness""" self.test_reactor.pf_coil_casing_thickness = [5, 5, 5] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_casing_thickness_val_large(self): """Creates the reactor with large poloidal field coil casing thickness""" self.test_reactor.pf_coil_casing_thickness = [50, 50, 50] assert self.test_reactor.solid is not None - assert len(self.test_reactor.shapes_and_components) == 11 + assert len(self.test_reactor.shapes_and_components) == 12 def test_pf_casing_thickness_val(self): """Checks input type of poloidal field coil casing thickness""" From d02bb7fae1b1669bc527e684aa66cd34f4b3a61d Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 14 Mar 2022 15:20:15 +0000 Subject: [PATCH 7/7] [skip ci] removing - signs from yaml --- .github/workflows/pep8_linting.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pep8_linting.yml b/.github/workflows/pep8_linting.yml index b26c0221d..ec9ede8f8 100644 --- a/.github/workflows/pep8_linting.yml +++ b/.github/workflows/pep8_linting.yml @@ -22,9 +22,9 @@ jobs: python-version: 3.x - name: Lint code run: | - - python -m pip install --upgrade pip - - pip install flake8 - - flake8 . --show-source --statistics --max-line-length 120 + python -m pip install --upgrade pip + pip install flake8 + flake8 . --show-source --statistics --max-line-length 120 - name: Install black run: | pip install black==22.1.0