Skip to content

Commit 4c7e5c2

Browse files
[pre-commit.ci] pre-commit autoupdate (#3)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0) - https://github.com/asottile/reorder_python_importshttps://github.com/asottile/reorder-python-imports - [github.com/asottile/reorder-python-imports: v3.9.0 → v3.12.0](asottile/reorder-python-imports@v3.9.0...v3.12.0) - [github.com/asottile/pyupgrade: v3.3.1 → v3.15.2](asottile/pyupgrade@v3.3.1...v3.15.2) - [github.com/psf/black: 23.3.0 → 24.3.0](psf/black@23.3.0...24.3.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * python >= 3.9 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Boisselet Alexandre (IFAT DC ATV SC D TE2) <[email protected]>
1 parent 97eebcf commit 4c7e5c2

File tree

8 files changed

+48
-28
lines changed

8 files changed

+48
-28
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
docs:
44
docker:
55
# see: https://circleci.com/docs/2.0/circleci-images/#python
6-
- image: circleci/python:3.7-stretch
6+
- image: circleci/python:3.9-stretch
77
steps:
88
# Get our data and merge with upstream
99
- run: sudo apt-get update

.github/ISSUE_TEMPLATES/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ERROR ...
3838

3939
**Environment (please complete the following information):**
4040

41-
- Python Version [e.g. 3.7.1]
41+
- Python Version [e.g. 3.9.1]
4242
- Package Version [e.g. 0.1.0]
4343

4444
**Additional context**

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Set up Python 3.7
13+
- name: Set up Python 3.9
1414
uses: actions/setup-python@v1
1515
with:
16-
python-version: 3.7
16+
python-version: 3.9
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
strategy:
2929
matrix:
30-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
30+
python-version: ["3.8", "3.9", "3.10", "3.11"]
3131

3232
steps:
3333
- uses: actions/checkout@v2
@@ -56,10 +56,10 @@ jobs:
5656
steps:
5757
- name: Checkout source
5858
uses: actions/checkout@v2
59-
- name: Set up Python 3.7
59+
- name: Set up Python 3.9
6060
uses: actions/setup-python@v1
6161
with:
62-
python-version: 3.7
62+
python-version: 3.9
6363
- name: Build package
6464
run: |
6565
pip install wheel

.pre-commit-config.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.5.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
@@ -11,20 +11,36 @@ repos:
1111
- id: debug-statements
1212
language_version: python3
1313

14-
- repo: https://github.com/asottile/reorder_python_imports
15-
rev: v3.9.0
14+
- repo: https://github.com/pycqa/isort
15+
rev: 5.13.2
1616
hooks:
17-
- id: reorder-python-imports
18-
args: [--py37-plus]
17+
- id: isort
18+
name: isort (python)
1919

2020
- repo: https://github.com/asottile/pyupgrade
21-
rev: v3.3.1
21+
rev: v3.15.2
2222
hooks:
2323
- id: pyupgrade
24-
args: [--py37-plus]
24+
args: [--py38-plus]
2525

2626

2727
- repo: https://github.com/psf/black
28-
rev: "23.3.0"
28+
rev: "24.3.0"
2929
hooks:
30-
- id: black
30+
- id: black
31+
32+
33+
# - repo: local
34+
# hooks:
35+
# - id: pylint
36+
# name: pylint
37+
# entry: pylint
38+
# language: system
39+
# types: [python]
40+
# files: ^magpylib/
41+
# args: [
42+
# "-rn", # Only display messages
43+
# "-sn", # Don't display the score
44+
# "--rcfile=.pylintrc", # Link to your config file
45+
# #"--load-plugins=pylint.extensions.docparams", # Load an extension
46+
# ]

magpylib_material_response/demag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""demag_functions"""
2+
23
# +
34
# pylint: disable=invalid-name, redefined-outer-name, protected-access
45
import sys
@@ -7,8 +8,7 @@
78
import magpylib as magpy
89
import numpy as np
910
from loguru import logger
10-
from magpylib._src.obj_classes.class_BaseExcitations import BaseCurrent
11-
from magpylib._src.obj_classes.class_BaseExcitations import BaseMagnet
11+
from magpylib._src.obj_classes.class_BaseExcitations import BaseCurrent, BaseMagnet
1212
from magpylib.magnet import Cuboid
1313
from scipy.spatial.transform import Rotation as R
1414

magpylib_material_response/meshing.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
from magpylib._src.obj_classes.class_BaseExcitations import BaseCurrent
88
from scipy.spatial.transform import Rotation as R
99

10-
from magpylib_material_response.meshing_utils import cells_from_dimension
11-
from magpylib_material_response.meshing_utils import get_volume
12-
from magpylib_material_response.meshing_utils import mask_inside
10+
from magpylib_material_response.meshing_utils import (
11+
cells_from_dimension,
12+
get_volume,
13+
mask_inside,
14+
)
1315

1416

1517
def _collection_from_obj_and_cells(obj, cells, **style_kwargs):

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python
22
"""The setup script."""
3-
from setuptools import find_packages
4-
from setuptools import setup
3+
from setuptools import find_packages, setup
54

65
with open("magpylib_material_response/__init__.py") as handle:
76
for line in handle:

tests/test_meshing.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
"""Test meshing functions"""
2+
23
import magpylib as magpy
34
import numpy as np
45
import pytest
56

6-
from magpylib_material_response.meshing import mesh_all
7-
from magpylib_material_response.meshing import mesh_Cuboid
8-
from magpylib_material_response.meshing import mesh_Cylinder
9-
from magpylib_material_response.meshing import mesh_thin_CylinderSegment_with_cuboids
10-
from magpylib_material_response.meshing import slice_Cuboid
7+
from magpylib_material_response.meshing import (
8+
mesh_all,
9+
mesh_Cuboid,
10+
mesh_Cylinder,
11+
mesh_thin_CylinderSegment_with_cuboids,
12+
slice_Cuboid,
13+
)
1114

1215

1316
def test_mesh_Cuboid():

0 commit comments

Comments
 (0)