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

Use Python 3,13 in CI #286

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = *.lock,*.toml
ignore-words = ./doc/styles/config/vocabularies/ANSYS/accept.txt
9 changes: 3 additions & 6 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
MAIN_PYTHON_VERSION: '3.10'
MAIN_PYTHON_VERSION: '3.13'
MAPDL_DOCKER_PACKAGE: 'ghcr.io/ansys/mapdl'
MAPDL_DOCKER_VERSION: 'v24.2.0'
DOCUMENTATION_CNAME: "manager.materials.docs.pyansys.com"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ['3.10']
python-version: ['3.13']
fail-fast: false

steps:
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

- name: "Test with tox"
# Only the tox environment specified in the tox.ini gh-actions is run
run: tox -e py310-coverage -- -m mapdl_integration
run: tox -e py313-coverage -- -m mapdl_integration

- name: "Collect MAPDL logs on failure"
if: always()
Expand Down Expand Up @@ -258,9 +258,6 @@ jobs:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4

- name: List directory structure
run: ls -R

- name: Publish to PyPI
env:
Expand Down
13 changes: 6 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
repos:

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 24.10.0
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.3.0
hooks:
- id: codespell
args: ["--ignore-words", "doc/styles/config/vocabularies/ANSYS/accept.txt"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: requirements-txt-fixer

# this validates our github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
rev: 0.30.0
hooks:
- id: check-github-workflows

Expand Down
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx documentation configuration file."""

from datetime import datetime
import os

Expand Down
1 change: 1 addition & 0 deletions doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ ANSYS
Ansys
ansys
Pymaterials-manager
socio-economic
1 change: 1 addition & 0 deletions src/ansys/materials/manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides a helper to manage materials in the Ansys ecosystem."""

from importlib import metadata as metadata
import sys

Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/material.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``Material`` class."""

from typing import List, Optional

from ._models import _BaseModel
Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/material_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``MaterialManager`` class."""

import inspect
from typing import Any, Dict

Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/serialize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides functions to serialize materials."""

import json
import pathlib
from typing import Dict, Union
Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/util/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``common`` module."""

from itertools import islice
import re
from typing import Generator, Iterable, List, Union
Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/util/mapdl/mapdl_reader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``mapdl_reader`` module."""

from typing import Dict

from ansys.materials.manager._models._common._base import _MapdlCore
Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/util/mapdl/mpdata_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``MaterialDataParser`` class."""

from typing import Dict, List, Optional

from ansys.materials.manager._models import Constant, PiecewiseLinear, _BaseModel
Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/util/mapdl/tbdata_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``TableDataParser`` class."""

from typing import Dict, List, Optional

from ansys.materials.manager._models import _BaseModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``MatmlWriter`` class."""

import os
import sys
from typing import BinaryIO, Dict, Sequence, Union
Expand Down
1 change: 1 addition & 0 deletions src/ansys/materials/manager/util/matml/matml_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides the ``matml_parser`` module."""

from dataclasses import dataclass
import os
from typing import Any, Dict, List, Optional, Union
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides a function to convert MatML entries into Material objects."""

from typing import Dict, Sequence

from ansys.materials.manager._models import Constant
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
[tox]
description = Default tox environments list
envlist =
style,{py39,py310,py311}{,-coverage},doc
style,{py310,py311,py312,py313}{,-coverage},doc
skip_missing_interpreters = true
isolated_build = true

[gh-actions]
description = The tox environment to be executed in gh-actions for a given python version
python =
3.9: style,py39-coverage,doc
3.10: style,py310-coverage,doc
3.11: style,py311-coverage,doc
3.12: style,py312-coverage,doc
3.13: style,py313-coverage,doc

[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
py: python3{style,reformat,doc}: python3
skip_install = true
allowlist_externals =
Expand Down
Loading