diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 75145c71..4b3deebb 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@main - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: '3.10' - name: Setup Linux Environment @@ -59,7 +59,7 @@ jobs: cd - - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@main with: name: microstructpy_${{ matrix.doc-type }}_documentation path: ${{ env.art_path }} diff --git a/.github/workflows/ossar-analysis.yml b/.github/workflows/ossar-analysis.yml index 2e0dfae1..b3a84140 100644 --- a/.github/workflows/ossar-analysis.yml +++ b/.github/workflows/ossar-analysis.yml @@ -16,7 +16,7 @@ jobs: steps: # Checkout your code repository to scan - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@main with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -29,17 +29,17 @@ jobs: # Install dotnet, used by OSSAR - name: Install .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@main with: dotnet-version: '6.0.x' # Run open source static analysis tools - name: Run OSSAR - uses: github/ossar-action@v1 + uses: github/ossar-action@main id: ossar # Upload results to the Security tab - name: Upload OSSAR results - uses: github/codeql-action/upload-sarif@v1 + uses: github/codeql-action/upload-sarif@main with: sarif_file: ${{ steps.ossar.outputs.sarifFile }} diff --git a/.github/workflows/python_package.yaml b/.github/workflows/python_package.yaml index c230f408..b29b8bf6 100644 --- a/.github/workflows/python_package.yaml +++ b/.github/workflows/python_package.yaml @@ -9,13 +9,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] + python-version: [3.9, '3.10', '3.11', '3.12'] os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: ${{ matrix.python-version }} @@ -30,7 +30,7 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel - pip install flake8 pytest pytest-cov coveralls + pip install flake8 pytest==6.2.5 pytest-cov coveralls - name: Install package requirements run: pip install -r requirements.txt - name: Install package @@ -56,13 +56,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: '3.x' - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@main with: # This path is specific to Ubuntu path: ~/.cache/pip diff --git a/docs/requirements.txt b/docs/requirements.txt index b701f490..86459fa1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,6 +2,9 @@ gmsh==4.11.1 matplotlib>=3.7.3 numpy>=1.24.4 pybind11==2.4.3 -setuptools>=65.5.1 -sphinx==4.2.0 +requests>=2.32.0 # not directly required, pinned by Snyk to avoid a vulnerability +setuptools>=70.0.0 +sphinx==5.3.0 sphinx-gallery==0.8.1 +urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability +zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst index 69018f94..71989d83 100644 --- a/docs/source/api/index.rst +++ b/docs/source/api/index.rst @@ -4,6 +4,7 @@ API === .. toctree:: + :maxdepth: 2 cli geometry/index diff --git a/requirements.txt b/requirements.txt index 8235f94a..8298e352 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,11 +3,12 @@ matplotlib>=3.7.3 pybind11==2.4.3 pygmsh==7.1.17 MeshPy==2022.1.3 -numpy>=1.24.4 +numpy>=1.24.4,<2.0 pyquaternion==0.9.5 pyvoro-mmalahe==1.3.4 scipy>=1.10.1 -setuptools>=65.5.1 +setuptools>=70.0.0 xmltodict==0.12.0 tox==3.14.0 lsq-ellipse==2.0.1 +zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/setup.py b/setup.py index e6fcec9a..2aa562c0 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,6 @@ def find_version(*fname): 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', diff --git a/src/microstructpy/examples/grain_neighborhoods.py b/src/microstructpy/examples/grain_neighborhoods.py index 9c2ccfa3..b84d26c5 100644 --- a/src/microstructpy/examples/grain_neighborhoods.py +++ b/src/microstructpy/examples/grain_neighborhoods.py @@ -44,7 +44,7 @@ dx = np.insert(np.diff(x_perim), 0, 0) dy = np.insert(np.diff(y_perim), 0, 0) ds = np.sqrt(dx * dx + dy * dy) -arc_len = scipy.integrate.cumtrapz(ds, x=t_perim, initial=0) +arc_len = scipy.integrate.cumulative_trapezoid(ds, x=t_perim, initial=0) eq_spaced = arc_len[-1] * np.arange(n) / n x_pts = np.interp(eq_spaced, arc_len, x_perim) y_pts = np.interp(eq_spaced, arc_len, y_perim) diff --git a/src/microstructpy/geometry/ellipse.py b/src/microstructpy/geometry/ellipse.py index 364d9c70..05013765 100644 --- a/src/microstructpy/geometry/ellipse.py +++ b/src/microstructpy/geometry/ellipse.py @@ -182,7 +182,7 @@ def best_fit(self, points): points (list or numpy.ndarray): An Nx2 list of points to fit. Returns: - .Ellipse: An instance of the class that best fits the points. + Ellipse: An instance of the class that best fits the points. .. _`least-squares-ellipse-fitting`: https://github.com/bdhammel/least-squares-ellipse-fitting