-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: pr #15 from joshua-auchincloss/v0.2.4
v0.2.4
- Loading branch information
Showing
24 changed files
with
622 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
| Name | Stmts | Miss | Branch | BrPart | Cover | | ||
|---------------------------------- | -------: | -------: | -------: | -------: | ------: | | ||
| src/hatch\_cython/\_\_init\_\_.py | 2 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/config.py | 282 | 19 | 124 | 12 | 92% | | ||
| src/hatch\_cython/devel.py | 5 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/hooks.py | 5 | 1 | 2 | 0 | 86% | | ||
| src/hatch\_cython/plugin.py | 194 | 9 | 102 | 8 | 94% | | ||
| src/hatch\_cython/types.py | 19 | 5 | 2 | 1 | 71% | | ||
| src/hatch\_cython/utils.py | 10 | 0 | 2 | 0 | 100% | | ||
| **TOTAL** | **517** | **34** | **232** | **21** | **92%** | | ||
| Name | Stmts | Miss | Branch | BrPart | Cover | | ||
|----------------------------------------- | -------: | -------: | -------: | -------: | ------: | | ||
| src/hatch\_cython/\_\_init\_\_.py | 2 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/config/\_\_init\_\_.py | 2 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/config/autoimport.py | 9 | 0 | 4 | 0 | 100% | | ||
| src/hatch\_cython/config/config.py | 145 | 16 | 70 | 10 | 87% | | ||
| src/hatch\_cython/config/defaults.py | 6 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/config/files.py | 22 | 1 | 12 | 2 | 91% | | ||
| src/hatch\_cython/config/flags.py | 53 | 1 | 16 | 0 | 99% | | ||
| src/hatch\_cython/config/platform.py | 71 | 2 | 28 | 2 | 96% | | ||
| src/hatch\_cython/constants.py | 11 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/devel.py | 5 | 0 | 0 | 0 | 100% | | ||
| src/hatch\_cython/hooks.py | 5 | 1 | 2 | 0 | 86% | | ||
| src/hatch\_cython/plugin.py | 189 | 9 | 142 | 8 | 95% | | ||
| src/hatch\_cython/temp.py | 12 | 0 | 2 | 0 | 100% | | ||
| src/hatch\_cython/types.py | 19 | 4 | 2 | 1 | 76% | | ||
| src/hatch\_cython/utils.py | 22 | 0 | 8 | 0 | 100% | | ||
| **TOTAL** | **573** | **34** | **286** | **23** | **93%** | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# distutils: language=c++ | ||
|
||
cpdef str some_aliased(str name): | ||
return name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cdef class MyClass: | ||
def __cinit__(self): | ||
pass | ||
|
||
cpdef str do(self): | ||
return "abc" | ||
|
||
cpdef MyClass fast_create(): | ||
return MyClass.__new__(MyClass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
def test_aliased(): | ||
from example_lib.aliased import some_aliased | ||
|
||
assert some_aliased("abc") == "abc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
from example_lib.mod_a.adds import fmul, imul | ||
from example_lib.mod_a.some_defn import ValueDefn | ||
|
||
|
||
def test_muls(): | ||
from example_lib.mod_a.adds import fmul, imul | ||
|
||
assert fmul(5.5, 5.5) == 30.25 | ||
assert imul(21, 2) == 42 | ||
|
||
|
||
def test_vals(): | ||
from example_lib.mod_a.some_defn import ValueDefn | ||
|
||
v = ValueDefn(10) | ||
assert v.value == 10 | ||
v.set(5) | ||
assert v.value == 5 | ||
|
||
|
||
def test_deep_nesting(): | ||
from example_lib.mod_a.deep_nest.creates import fast_create | ||
|
||
o = fast_create() | ||
assert o.do() == "abc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2023-present joshua-auchincloss <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
__version__ = "0.2.3" | ||
__version__ = "0.2.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from hatch_cython.config.config import Config, parse_from_dict | ||
from hatch_cython.config.platform import PlatformArgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from dataclasses import dataclass, field | ||
|
||
|
||
@dataclass | ||
class Autoimport: | ||
pkg: str | ||
|
||
include: str | ||
libraries: str = field(default=None) | ||
library_dirs: str = field(default=None) | ||
required_call: str = field(default=None) | ||
|
||
|
||
__packages__ = { | ||
a.pkg: a | ||
for a in ( | ||
Autoimport("numpy", "get_include"), | ||
Autoimport( | ||
"pyarrow", | ||
include="get_include", | ||
libraries="get_libraries", | ||
library_dirs="get_library_dirs", | ||
required_call="create_library_symlinks", | ||
), | ||
) | ||
} |
Oops, something went wrong.