From 9b17337b2ffc5ddedca4083b9c015820f3371a8a Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Wed, 22 Oct 2025 16:44:28 +0200 Subject: [PATCH 1/7] Try building pyi file. --- python/CMakeLists.txt | 4 + python/basix/_basixcpp.pyi | 527 ------------------------------------- 2 files changed, 4 insertions(+), 527 deletions(-) delete mode 100644 python/basix/_basixcpp.pyi diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 4b78353be..696664b95 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -44,6 +44,9 @@ endif() nanobind_add_module(_basixcpp NB_SUPPRESS_WARNINGS ${NANOBIND_SABI} wrapper.cpp) target_compile_definitions(_basixcpp PRIVATE cxx_std_20) +# and the nanobind typing stubs. +nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT _basixcpp.pyi MARKER_FILE py.typed PYTHON_PATH $ DEPENDS _basixcpp) + if(ENABLE_CLANG_TIDY) find_program(CLANG_TIDY NAMES clang-tidy REQUIRED) set_target_properties(_basixcpp PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY};--config-file=${CMAKE_CURRENT_SOURCE_DIR}/../.clang-tidy") @@ -81,3 +84,4 @@ else() endif() install(TARGETS _basixcpp LIBRARY DESTINATION basix) +install(FILES $/py.typed $/_basixcpp.pyi DESTINATION basix) diff --git a/python/basix/_basixcpp.pyi b/python/basix/_basixcpp.pyi deleted file mode 100644 index 0eb1604cc..000000000 --- a/python/basix/_basixcpp.pyi +++ /dev/null @@ -1,527 +0,0 @@ -from collections.abc import Sequence -import enum -from typing import Annotated, overload - -import numpy -from numpy.typing import NDArray, ArrayLike - - -def topology(arg: CellType, /) -> list[list[list[int]]]: ... - -def geometry(arg: CellType, /) -> NDArray[numpy.float64]: ... - -def sub_entity_type(arg0: CellType, arg1: int, arg2: int, /) -> CellType: ... - -def sub_entity_connectivity(arg: CellType, /) -> list[list[list[list[int]]]]: ... - -def sub_entity_geometry(arg0: CellType, arg1: int, arg2: int, /) -> NDArray[numpy.float64]: ... - -def subentity_types(arg: CellType, /) -> list[list[CellType]]: ... - -def sobolev_space_intersection(arg0: SobolevSpace, arg1: SobolevSpace, /) -> SobolevSpace: ... - -class LatticeType(enum.IntEnum): - """Lattice type.""" - - equispaced = 0 - - gll = 1 - - chebyshev = 2 - - gl = 4 - -class LatticeSimplexMethod(enum.IntEnum): - """Lattice simplex method.""" - - none = 0 - - warp = 1 - - isaac = 2 - - centroid = 3 - -class PolynomialType(enum.IntEnum): - """Polynomial type.""" - - legendre = 0 - - lagrange = 1 - - bernstein = 2 - -def tabulate_polynomials(arg0: PolynomialType, arg1: CellType, arg2: int, arg3: Annotated[NDArray[numpy.float64], dict(shape=(None, None), order='C', writable=False)], /) -> NDArray[numpy.float64]: ... - -def polynomials_dim(arg0: PolynomialType, arg1: CellType, arg2: int, /) -> int: ... - -def create_lattice(arg0: CellType, arg1: int, arg2: LatticeType, arg3: bool, arg4: LatticeSimplexMethod, /) -> NDArray[numpy.float64]: ... - -class MapType(enum.IntEnum): - """Element map type.""" - - identity = 0 - - L2Piola = 1 - - covariantPiola = 2 - - contravariantPiola = 3 - - doubleCovariantPiola = 4 - - doubleContravariantPiola = 5 - -class SobolevSpace(enum.IntEnum): - """Sobolev space.""" - - L2 = 0 - - H1 = 1 - - H2 = 2 - - H3 = 3 - - HInf = 8 - - HDiv = 10 - - HCurl = 11 - - HEin = 12 - - HDivDiv = 13 - -class QuadratureType(enum.IntEnum): - """Quadrature type.""" - - default = 0 - - gauss_jacobi = 1 - - gll = 2 - - xiao_gimbutas = 3 - -class CellType(enum.IntEnum): - """Cell type.""" - - point = 0 - - interval = 1 - - triangle = 2 - - tetrahedron = 3 - - quadrilateral = 4 - - hexahedron = 5 - - prism = 6 - - pyramid = 7 - -def cell_volume(arg: CellType, /) -> float: ... - -def cell_facet_normals(arg: CellType, /) -> NDArray[numpy.float64]: ... - -def cell_facet_reference_volumes(arg: CellType, /) -> NDArray[numpy.float64]: ... - -def cell_facet_outward_normals(arg: CellType, /) -> NDArray[numpy.float64]: ... - -def cell_facet_orientations(arg: CellType, /) -> list[int]: ... - -def cell_facet_jacobians(arg: CellType, /) -> NDArray[numpy.float64]: ... - -def cell_edge_jacobians(arg: CellType, /) -> NDArray[numpy.float64]: ... - -class ElementFamily(enum.IntEnum): - """Finite element family.""" - - custom = 0 - - P = 1 - - BDM = 4 - - RT = 2 - - N1E = 3 - - N2E = 5 - - Regge = 7 - - HHJ = 11 - - bubble = 9 - - serendipity = 10 - - DPC = 8 - - CR = 6 - - Hermite = 12 - - iso = 13 - -class LagrangeVariant(enum.IntEnum): - """Lagrange element variant.""" - - unset = 0 - - equispaced = 1 - - gll_warped = 2 - - gll_isaac = 3 - - gll_centroid = 4 - - chebyshev_warped = 5 - - chebyshev_isaac = 6 - - chebyshev_centroid = 7 - - gl_warped = 8 - - gl_isaac = 9 - - gl_centroid = 10 - - legendre = 11 - - bernstein = 12 - -class DPCVariant(enum.IntEnum): - """DPC variant.""" - - unset = 0 - - simplex_equispaced = 1 - - simplex_gll = 2 - - horizontal_equispaced = 3 - - horizontal_gll = 4 - - diagonal_equispaced = 5 - - diagonal_gll = 6 - - legendre = 7 - -def create_element(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, arg6: Sequence[int], arg7: str, /) -> FiniteElement_float32 | FiniteElement_float64: ... - -def create_tp_element(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, arg6: str, /) -> FiniteElement_float32 | FiniteElement_float64: ... - -def tp_factors(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, arg6: Sequence[int], arg7: str, /) -> list[list[FiniteElement_float32]] | list[list[FiniteElement_float64]]: ... - -def tp_dof_ordering(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, /) -> list[int]: ... - -def lex_dof_ordering(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, /) -> list[int]: ... - -class PolysetType(enum.IntEnum): - """Polyset type.""" - - standard = 0 - - macroedge = 1 - -def superset(arg0: CellType, arg1: PolysetType, arg2: PolysetType, /) -> PolysetType: ... - -def restriction(arg0: PolysetType, arg1: CellType, arg2: CellType, /) -> PolysetType: ... - -def make_quadrature(arg0: QuadratureType, arg1: CellType, arg2: PolysetType, arg3: int, /) -> tuple[NDArray[numpy.float64], NDArray[numpy.float64]]: ... - -def gauss_jacobi_rule(arg0: float, arg1: int, /) -> tuple[NDArray[numpy.float64], NDArray[numpy.float64]]: ... - -@overload -def index(arg: int, /) -> int: ... - -@overload -def index(arg0: int, arg1: int, /) -> int: ... - -@overload -def index(arg0: int, arg1: int, arg2: int, /) -> int: ... - -class FiniteElement_float32: - def tabulate(self, arg0: int, arg1: Annotated[NDArray[numpy.float32], dict(shape=(None, None), order='C', writable=False)], /) -> NDArray[numpy.float32]: ... - - def __eq__(self, arg: object, /) -> bool: ... - - def hash(self) -> int: ... - - @overload - def permute_subentity_closure(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, /) -> None: ... - - @overload - def permute_subentity_closure(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, arg3: int, /) -> None: ... - - @overload - def permute_subentity_closure_inv(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, /) -> None: ... - - @overload - def permute_subentity_closure_inv(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, arg3: int, /) -> None: ... - - def push_forward(self, arg0: Annotated[NDArray[numpy.float32], dict(shape=(None, None, None), order='C', writable=False)], arg1: Annotated[NDArray[numpy.float32], dict(shape=(None, None, None), order='C', writable=False)], arg2: Annotated[NDArray[numpy.float32], dict(shape=(None,), order='C', writable=False)], arg3: Annotated[NDArray[numpy.float32], dict(shape=(None, None, None), order='C', writable=False)], /) -> NDArray[numpy.float32]: ... - - def pull_back(self, arg0: Annotated[NDArray[numpy.float32], dict(shape=(None, None, None), order='C', writable=False)], arg1: Annotated[NDArray[numpy.float32], dict(shape=(None, None, None), order='C', writable=False)], arg2: Annotated[NDArray[numpy.float32], dict(shape=(None,), order='C', writable=False)], arg3: Annotated[NDArray[numpy.float32], dict(shape=(None, None, None), order='C', writable=False)], /) -> NDArray[numpy.float32]: ... - - def T_apply(self, arg0: Annotated[NDArray[numpy.float32], dict(shape=(None,), order='C')], arg1: int, arg2: int, /) -> None: ... - - def Tt_apply_right(self, arg0: Annotated[NDArray[numpy.float32], dict(shape=(None,), order='C')], arg1: int, arg2: int, /) -> None: ... - - def Tt_inv_apply(self, arg0: Annotated[NDArray[numpy.float32], dict(shape=(None,), order='C')], arg1: int, arg2: int, /) -> None: ... - - def base_transformations(self) -> NDArray[numpy.float32]: ... - - def entity_transformations(self) -> dict: ... - - def get_tensor_product_representation(self) -> list[list[FiniteElement_float32]]: ... - - @property - def degree(self) -> int: ... - - @property - def embedded_superdegree(self) -> int: ... - - @property - def embedded_subdegree(self) -> int: ... - - @property - def cell_type(self) -> CellType: ... - - @property - def polyset_type(self) -> PolysetType: ... - - @property - def dim(self) -> int: ... - - @property - def num_entity_dofs(self) -> list[list[int]]: ... - - @property - def entity_dofs(self) -> list[list[list[int]]]: ... - - @property - def num_entity_closure_dofs(self) -> list[list[int]]: ... - - @property - def entity_closure_dofs(self) -> list[list[list[int]]]: ... - - @property - def value_size(self) -> int: ... - - @property - def value_shape(self) -> list[int]: ... - - @property - def discontinuous(self) -> bool: ... - - @property - def family(self) -> ElementFamily: ... - - @property - def lagrange_variant(self) -> LagrangeVariant: ... - - @property - def dpc_variant(self) -> DPCVariant: ... - - @property - def dof_transformations_are_permutations(self) -> bool: ... - - @property - def dof_transformations_are_identity(self) -> bool: ... - - @property - def interpolation_is_identity(self) -> bool: ... - - @property - def map_type(self) -> MapType: ... - - @property - def sobolev_space(self) -> SobolevSpace: ... - - @property - def points(self) -> Annotated[NDArray[numpy.float32], dict(shape=(None, None), writable=False)]: ... - - @property - def interpolation_matrix(self) -> Annotated[NDArray[numpy.float32], dict(shape=(None, None), writable=False)]: ... - - @property - def dual_matrix(self) -> Annotated[NDArray[numpy.float32], dict(shape=(None, None), writable=False)]: ... - - @property - def coefficient_matrix(self) -> Annotated[NDArray[numpy.float32], dict(shape=(None, None), writable=False)]: - """Coefficient matrix.""" - - @property - def wcoeffs(self) -> Annotated[NDArray[numpy.float32], dict(shape=(None, None), writable=False)]: ... - - @property - def M(self) -> list[list[Annotated[NDArray[numpy.float32], dict(writable=False)]]]: ... - - @property - def x(self) -> list[list[Annotated[NDArray[numpy.float32], dict(writable=False)]]]: ... - - @property - def has_tensor_product_factorisation(self) -> bool: ... - - @property - def interpolation_nderivs(self) -> int: ... - - @property - def dof_ordering(self) -> list[int]: ... - - @property - def dtype(self) -> str: ... - -def create_custom_element_float32(cell_type: CellType, value_shape: Sequence[int], wcoeffs: Annotated[NDArray[numpy.float32], dict(shape=(None, None), order='C', writable=False)], x: Sequence[Sequence[Annotated[NDArray[numpy.float32], dict(shape=(None, None), order='C', writable=False)]]], M: Sequence[Sequence[Annotated[NDArray[numpy.float32], dict(shape=(None, None, None, None), order='C', writable=False)]]], interpolation_nderivs: int, map_type: MapType, sobolev_space: SobolevSpace, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, poly_type: PolysetType) -> FiniteElement_float32: ... - -@overload -def compute_interpolation_operator(arg0: FiniteElement_float32, arg1: FiniteElement_float32, /) -> NDArray[numpy.float32]: ... - -@overload -def compute_interpolation_operator(arg0: FiniteElement_float64, arg1: FiniteElement_float64, /) -> NDArray[numpy.float64]: ... - -def tabulate_polynomial_set(celltype: CellType, polytype: PolysetType, d: int, n: int, x: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), order='C')]) -> Annotated[ArrayLike, dict(dtype='float64', )]: ... - -class FiniteElement_float64: - def tabulate(self, arg0: int, arg1: Annotated[NDArray[numpy.float64], dict(shape=(None, None), order='C', writable=False)], /) -> NDArray[numpy.float64]: ... - - def __eq__(self, arg: object, /) -> bool: ... - - def hash(self) -> int: ... - - @overload - def permute_subentity_closure(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, /) -> None: ... - - @overload - def permute_subentity_closure(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, arg3: int, /) -> None: ... - - @overload - def permute_subentity_closure_inv(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, /) -> None: ... - - @overload - def permute_subentity_closure_inv(self, arg0: Annotated[NDArray[numpy.int32], dict(shape=(None,), order='C')], arg1: int, arg2: CellType, arg3: int, /) -> None: ... - - def push_forward(self, arg0: Annotated[NDArray[numpy.float64], dict(shape=(None, None, None), order='C', writable=False)], arg1: Annotated[NDArray[numpy.float64], dict(shape=(None, None, None), order='C', writable=False)], arg2: Annotated[NDArray[numpy.float64], dict(shape=(None,), order='C', writable=False)], arg3: Annotated[NDArray[numpy.float64], dict(shape=(None, None, None), order='C', writable=False)], /) -> NDArray[numpy.float64]: ... - - def pull_back(self, arg0: Annotated[NDArray[numpy.float64], dict(shape=(None, None, None), order='C', writable=False)], arg1: Annotated[NDArray[numpy.float64], dict(shape=(None, None, None), order='C', writable=False)], arg2: Annotated[NDArray[numpy.float64], dict(shape=(None,), order='C', writable=False)], arg3: Annotated[NDArray[numpy.float64], dict(shape=(None, None, None), order='C', writable=False)], /) -> NDArray[numpy.float64]: ... - - def T_apply(self, arg0: Annotated[NDArray[numpy.float64], dict(shape=(None,), order='C')], arg1: int, arg2: int, /) -> None: ... - - def Tt_apply_right(self, arg0: Annotated[NDArray[numpy.float64], dict(shape=(None,), order='C')], arg1: int, arg2: int, /) -> None: ... - - def Tt_inv_apply(self, arg0: Annotated[NDArray[numpy.float64], dict(shape=(None,), order='C')], arg1: int, arg2: int, /) -> None: ... - - def base_transformations(self) -> NDArray[numpy.float64]: ... - - def entity_transformations(self) -> dict: ... - - def get_tensor_product_representation(self) -> list[list[FiniteElement_float64]]: ... - - @property - def degree(self) -> int: ... - - @property - def embedded_superdegree(self) -> int: ... - - @property - def embedded_subdegree(self) -> int: ... - - @property - def cell_type(self) -> CellType: ... - - @property - def polyset_type(self) -> PolysetType: ... - - @property - def dim(self) -> int: ... - - @property - def num_entity_dofs(self) -> list[list[int]]: ... - - @property - def entity_dofs(self) -> list[list[list[int]]]: ... - - @property - def num_entity_closure_dofs(self) -> list[list[int]]: ... - - @property - def entity_closure_dofs(self) -> list[list[list[int]]]: ... - - @property - def value_size(self) -> int: ... - - @property - def value_shape(self) -> list[int]: ... - - @property - def discontinuous(self) -> bool: ... - - @property - def family(self) -> ElementFamily: ... - - @property - def lagrange_variant(self) -> LagrangeVariant: ... - - @property - def dpc_variant(self) -> DPCVariant: ... - - @property - def dof_transformations_are_permutations(self) -> bool: ... - - @property - def dof_transformations_are_identity(self) -> bool: ... - - @property - def interpolation_is_identity(self) -> bool: ... - - @property - def map_type(self) -> MapType: ... - - @property - def sobolev_space(self) -> SobolevSpace: ... - - @property - def points(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), writable=False)]: ... - - @property - def interpolation_matrix(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), writable=False)]: ... - - @property - def dual_matrix(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), writable=False)]: ... - - @property - def coefficient_matrix(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), writable=False)]: - """Coefficient matrix.""" - - @property - def wcoeffs(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), writable=False)]: ... - - @property - def M(self) -> list[list[Annotated[NDArray[numpy.float64], dict(writable=False)]]]: ... - - @property - def x(self) -> list[list[Annotated[NDArray[numpy.float64], dict(writable=False)]]]: ... - - @property - def has_tensor_product_factorisation(self) -> bool: ... - - @property - def interpolation_nderivs(self) -> int: ... - - @property - def dof_ordering(self) -> list[int]: ... - - @property - def dtype(self) -> str: ... - -def create_custom_element_float64(cell_type: CellType, value_shape: Sequence[int], wcoeffs: Annotated[NDArray[numpy.float64], dict(shape=(None, None), order='C', writable=False)], x: Sequence[Sequence[Annotated[NDArray[numpy.float64], dict(shape=(None, None), order='C', writable=False)]]], M: Sequence[Sequence[Annotated[NDArray[numpy.float64], dict(shape=(None, None, None, None), order='C', writable=False)]]], interpolation_nderivs: int, map_type: MapType, sobolev_space: SobolevSpace, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, poly_type: PolysetType) -> FiniteElement_float64: ... From 17d6adbf1016a4aed000fc0c7e1d51cd2783b8de Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Wed, 22 Oct 2025 17:25:39 +0200 Subject: [PATCH 2/7] Try this for Windows. --- python/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 696664b95..ed1c1c9e8 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -44,9 +44,6 @@ endif() nanobind_add_module(_basixcpp NB_SUPPRESS_WARNINGS ${NANOBIND_SABI} wrapper.cpp) target_compile_definitions(_basixcpp PRIVATE cxx_std_20) -# and the nanobind typing stubs. -nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT _basixcpp.pyi MARKER_FILE py.typed PYTHON_PATH $ DEPENDS _basixcpp) - if(ENABLE_CLANG_TIDY) find_program(CLANG_TIDY NAMES clang-tidy REQUIRED) set_target_properties(_basixcpp PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY};--config-file=${CMAKE_CURRENT_SOURCE_DIR}/../.clang-tidy") @@ -84,4 +81,7 @@ else() endif() install(TARGETS _basixcpp LIBRARY DESTINATION basix) + +# and the nanobind typing stubs. +nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_basixcpp.pyi" MARKER_FILE "${CMAKE_CURRENT_BINARY_DIR}/py.typed" PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR} DEPENDS _basixcpp) install(FILES $/py.typed $/_basixcpp.pyi DESTINATION basix) From 514d81bd82721bed8bb0c50a5069fcc104517360 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Wed, 22 Oct 2025 17:33:15 +0200 Subject: [PATCH 3/7] Use nuget vcpkg cache. --- .github/workflows/windows.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index cd0061a9f..b6b08ed32 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,10 +18,29 @@ jobs: build-combined: name: Combined build and test runs-on: windows-2022 - env: - VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + permissions: + packages: write + + USERNAME: FEniCS + VCPKG_EXE: C:/vcpkg/vcpkg + FEED_URL: https://nuget.pkg.github.com/FEniCS/index.json + VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/FEniCS/index.json,readwrite" steps: + - name: Add NuGet sources + shell: pwsh + run: | + .$(${{ env.VCPKG_EXE }} fetch nuget) ` + sources add ` + -Source "${{ env.FEED_URL }}" ` + -StorePasswordInClearText ` + -Name GitHubPackages ` + -UserName "${{ env.USERNAME }}" ` + -Password "${{ secrets.GITHUB_TOKEN }}" + .$(${{ env.VCPKG_EXE }} fetch nuget) ` + setapikey "${{ secrets.GITHUB_TOKEN }}" ` + -Source "${{ env.FEED_URL }}" + - uses: actions/checkout@v5 - name: Export GitHub Actions cache environment variables From 07f4d97979c1930b1a30a622bfee516eddca4f8d Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Wed, 22 Oct 2025 17:34:19 +0200 Subject: [PATCH 4/7] Fix. --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b6b08ed32..e3ff9b43b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -20,7 +20,7 @@ jobs: runs-on: windows-2022 permissions: packages: write - + env: USERNAME: FEniCS VCPKG_EXE: C:/vcpkg/vcpkg FEED_URL: https://nuget.pkg.github.com/FEniCS/index.json From bf678a62a8031ccfa94b8db409fca2b1a0f33834 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 27 Oct 2025 15:08:56 +0100 Subject: [PATCH 5/7] Update python/CMakeLists.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Paul T. Kühner <56360279+schnellerhase@users.noreply.github.com> --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index ed1c1c9e8..e83ddfce4 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -83,5 +83,5 @@ endif() install(TARGETS _basixcpp LIBRARY DESTINATION basix) # and the nanobind typing stubs. -nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_basixcpp.pyi" MARKER_FILE "${CMAKE_CURRENT_BINARY_DIR}/py.typed" PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR} DEPENDS _basixcpp) +nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT $/_basixcpp.pyi MARKER_FILE $/py.typed PYTHON_PATH $ DEPENDS _basixcpp) install(FILES $/py.typed $/_basixcpp.pyi DESTINATION basix) From 259b6de4b6f2b755ee90d710f020e9dcf845610c Mon Sep 17 00:00:00 2001 From: schnellerhase <56360279+schnellerhase@users.noreply.github.com> Date: Tue, 20 Jan 2026 21:00:50 +0100 Subject: [PATCH 6/7] Revert "Update python/CMakeLists.txt" This reverts commit bf678a62a8031ccfa94b8db409fca2b1a0f33834. --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e83ddfce4..ed1c1c9e8 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -83,5 +83,5 @@ endif() install(TARGETS _basixcpp LIBRARY DESTINATION basix) # and the nanobind typing stubs. -nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT $/_basixcpp.pyi MARKER_FILE $/py.typed PYTHON_PATH $ DEPENDS _basixcpp) +nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_basixcpp.pyi" MARKER_FILE "${CMAKE_CURRENT_BINARY_DIR}/py.typed" PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR} DEPENDS _basixcpp) install(FILES $/py.typed $/_basixcpp.pyi DESTINATION basix) From 3fa9a40f01442661c83d833ceeac34c32332b6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20T=2E=20K=C3=BChner?= <56360279+schnellerhase@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:08:14 +0100 Subject: [PATCH 7/7] Try fix (#991) * Try fix * Silvence for now * Update python/CMakeLists.txt Co-authored-by: qbisicwate * Run all PR CI independent of target branch * Revert "Run all PR CI independent of target branch" This reverts commit c8857454c5b53020e3de8d4d8266721c57397613. --------- Co-authored-by: qbisicwate --- python/CMakeLists.txt | 11 +++++++++-- python/basix/ufl.py | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index ed1c1c9e8..fa45bd27a 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -83,5 +83,12 @@ endif() install(TARGETS _basixcpp LIBRARY DESTINATION basix) # and the nanobind typing stubs. -nanobind_add_stub(_basixcpp_stub MODULE _basixcpp OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_basixcpp.pyi" MARKER_FILE "${CMAKE_CURRENT_BINARY_DIR}/py.typed" PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR} DEPENDS _basixcpp) -install(FILES $/py.typed $/_basixcpp.pyi DESTINATION basix) +nanobind_add_stub( + _basixcpp_stub + MODULE basix._basixcpp + DEPENDS _basixcpp + VERBOSE + INSTALL_TIME + OUTPUT + basix/_basixcpp.pyi +) diff --git a/python/basix/ufl.py b/python/basix/ufl.py index 55eccd334..2ba6f599f 100644 --- a/python/basix/ufl.py +++ b/python/basix/ufl.py @@ -1636,7 +1636,7 @@ def element( dpc_variant, discontinuous, dof_ordering=dof_ordering, - dtype=dtype, + dtype=dtype, # type: ignore ) ufl_e = _BasixElement(e) @@ -1802,7 +1802,7 @@ def custom_element( embedded_subdegree, embedded_superdegree, polyset_type, - dtype=dtype, + dtype=dtype, # type: ignore ) return _BasixElement(e)