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

Bump min Python to 3.10 #33

Merged
merged 2 commits into from
Nov 14, 2024
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
7 changes: 5 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://editorconfig.org/
# https://github.com/editorconfig/editorconfig-vim
# https://github.com/editorconfig/editorconfig-emacs
# https://github.com/editorconfig/editorconfig-vim
# https://github.com/editorconfig/editorconfig-emacs

root = true

Expand All @@ -23,6 +23,9 @@ indent_size = 2
[*.hpp]
indent_size = 2

[*.yml]
indent_size = 4

# There may be one in doc/
[Makefile]
indent_style = tab
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,3 @@ jobs:

build_py_project_in_conda_env
test_py_project

# vim: sw=4
48 changes: 24 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
Ruff:
script: |
pipx install ruff
ruff check
tags:
- docker-runner
except:
- tags
script: |
pipx install ruff
ruff check
tags:
- docker-runner
except:
- tags

Python 3:
script:
- py_version=3
- export EXTRA_INSTALL="numpy"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
- ". ./build-and-test-py-project.sh"
tags:
- python3
except:
- tags
artifacts:
reports:
junit: test/pytest.xml
script: |
py_version=3
export EXTRA_INSTALL="numpy"
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
. ./build-and-test-py-project.sh
tags:
- python3
except:
- tags
artifacts:
reports:
junit: test/pytest.xml

Documentation:
script:
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
- ". ./build-docs.sh"
tags:
- python3
script: |
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
. ./build-docs.sh
tags:
- python3
12 changes: 4 additions & 8 deletions gmsh_interop/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@
THE SOFTWARE.
"""

try:
from packaging.version import Version
except ImportError:
from distutils.version import Version

import logging
from typing import Optional

from packaging.version import Version

from pytools import memoize_method

Expand Down Expand Up @@ -125,11 +121,11 @@ def __init__(self, source, filenames, source_name="temp.geo"):
self.filenames = filenames


def get_gmsh_version(executable: str = "gmsh") -> Optional[Version]:
def get_gmsh_version(executable: str = "gmsh") -> Version | None:
import re
re_version = re.compile(r"[0-9]+.[0-9]+.[0-9]+")

def get_gmsh_version_from_string(output: str) -> Optional[Version]:
def get_gmsh_version_from_string(output: str) -> Version | None:
result = re_version.search(output)

try_version = None
Expand Down
3 changes: 1 addition & 2 deletions gmsh_interop/version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from importlib import metadata
from typing import Tuple


def _parse_version(version: str) -> Tuple[Tuple[int, ...], str]:
def _parse_version(version: str) -> tuple[tuple[int, ...], str]:
import re

m = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT)
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ requires = [

[project]
name = "gmsh_interop"
version = "2024.1"
version = "2024.2"
description = "A parser for GMSH's .msh format"
readme = "README.rst"
license = { text = "MIT" }
authors = [
{ name = "Andreas Kloeckner", email = "[email protected]" },
]
requires-python = ">=3.8"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
Expand All @@ -37,6 +37,11 @@ dependencies = [
]

[project.optional-dependencies]
doc = [
"furo",
"sphinx>=4",
"sphinx-copybutton",
]
test = [
"pytest",
"ruff",
Expand Down
Loading