Skip to content

Commit b96c14e

Browse files
committed
Merge branch 'master' into 39/array-deepcopy-kwarg
2 parents 27b7d0d + 80b0ea9 commit b96c14e

File tree

11 files changed

+80
-31
lines changed

11 files changed

+80
-31
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
whl:
2727
name: Build / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
2828
strategy:
29+
fail-fast: false
2930
matrix:
3031
os: [macOS, Ubuntu, Windows]
3132
major: [3]
@@ -51,7 +52,7 @@ jobs:
5152
CIBW_BUILD: cp${{ matrix.major }}${{ matrix.minor }}-*
5253
CIBW_BUILD_VERBOSITY: 1
5354
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test.txt
54-
CIBW_TEST_COMMAND: pytest {project}
55+
CIBW_TEST_COMMAND: pytest {project}/test
5556
- uses: actions/upload-artifact@master
5657
with:
5758
name: dist

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include arraykit/__init__.pyi arraykit/py.typed

README.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11

22

3+
.. image:: https://img.shields.io/pypi/pyversions/arraykit.svg
4+
:target: https://pypi.org/project/arraykit
5+
6+
.. image:: https://img.shields.io/pypi/v/arraykit.svg
7+
:target: https://pypi.org/project/arraykit
8+
9+
.. image:: https://img.shields.io/conda/vn/conda-forge/arraykit.svg
10+
:target: https://anaconda.org/conda-forge/arraykit
11+
12+
.. image:: https://img.shields.io/github/workflow/status/InvestmentSystems/arraykit/CI?label=build&logo=Github
13+
:target: https://github.com/InvestmentSystems/arraykit/actions?query=workflow%3ACI
14+
315

416
arraykit
517
=============
@@ -20,3 +32,26 @@ ArrayKit requires the following:
2032
- NumPy >= 1.16.5
2133

2234

35+
What is New in ArrayKit
36+
-------------------------
37+
38+
0.1.3 dev
39+
............
40+
41+
``array_deepcopy`` now accepts kwargs and makes the ``memo`` dict optional.
42+
43+
44+
0.1.2
45+
..........
46+
47+
Maintenance release of the following interfaces:
48+
49+
``immutable_filter``
50+
``mloc``
51+
``shape_filter``
52+
``column_2d_filter``
53+
``column_1d_filter``
54+
``row_1d_filter``
55+
``array_deepcopy``
56+
``resolve_dtype``
57+
``resolve_dtype_iter``

performance/main.py renamed to performance/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,3 @@ def main():
298298

299299
if __name__ == '__main__':
300300
main()
301-

setup.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ def get_long_description() -> str:
3939
'Programming Language :: Python :: 3.8',
4040
],
4141
keywords='numpy array',
42-
packages=[],
43-
package_data={'': ['*.pyi']},
42+
packages=['arraykit'],
43+
package_dir={'arraykit': 'src'},
44+
package_data={'arraykit': ['__init__.pyi', 'py.typed']},
45+
include_package_data=True,
4446
ext_modules=[
4547
Extension(
46-
name='arraykit',
47-
sources=['arraykit.c'],
48+
name='arraykit._arraykit', # build into module
49+
sources=['src/_arraykit.c'],
4850
include_dirs=[np.get_include()],
49-
define_macros=[("AK_VERSION", AK_VERSION)],
51+
define_macros=[('AK_VERSION', AK_VERSION)],
5052
),
5153
],
5254
)

src/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from ._arraykit import *
2+
from ._arraykit import __version__

arraykit.pyi renamed to src/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import numpy as np # type: ignore
44

55
_T = tp.TypeVar('_T')
66

7+
__version__: str
8+
79
class ArrayGO:
810

911
values: np.array

arraykit.c renamed to src/_arraykit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,11 @@ static PyMethodDef arraykit_methods[] = {
644644
};
645645

646646
static struct PyModuleDef arraykit_module = {
647-
PyModuleDef_HEAD_INIT, "arraykit", NULL, -1, arraykit_methods,
647+
PyModuleDef_HEAD_INIT, "_arraykit", NULL, -1, arraykit_methods,
648648
};
649649

650650
PyObject *
651-
PyInit_arraykit(void)
651+
PyInit__arraykit(void)
652652
{
653653
import_array();
654654
PyObject *m = PyModule_Create(&arraykit_module);

src/py.typed

Whitespace-only changes.

tasks.py

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
import sys
2-
import os
3-
import typing as tp
42

53
import invoke
64

5+
6+
ARTIFACTS = (
7+
'*.egg-info',
8+
'.hypothesis',
9+
'build',
10+
'dist',
11+
'src/*.so'
12+
)
13+
14+
715
@invoke.task
816
def clean(context):
917
'''Clean doc and build artifacts
1018
'''
11-
context.run(f"{sys.executable} setup.py develop --uninstall", echo=True)
19+
cmd = f'{sys.executable} -m pip uninstall --yes arraykit'
20+
context.run(cmd, echo=True, pty=True)
1221

13-
for artifact in ("*.egg-info", "*.so", "build", "dist", ".hypothesis"):
14-
context.run(f"rm -rf {artifact}", echo=True)
22+
for artifact in sorted(ARTIFACTS):
23+
context.run(f'rm -rf {artifact}', echo=True, pty=True)
1524

16-
# context.run("black .", echo=True)@task(clean)
1725

18-
@invoke.task
26+
@invoke.task(clean)
1927
def build(context):
20-
context.run(f"pip install -r requirements.txt", echo=True)
21-
context.run(f"{sys.executable} setup.py develop", echo=True)
28+
context.run('pip install -r requirements.txt', echo=True, pty=True)
29+
context.run(f'{sys.executable} -m pip install .', echo=True, pty=True)
30+
2231

23-
@invoke.task(pre=(clean, build))
32+
@invoke.task(build)
2433
def test(context):
2534
cmd = 'pytest -s --color no --disable-pytest-warnings --tb=native'
26-
context.run(cmd)
35+
context.run(cmd, echo=True, pty=True)
2736

28-
@invoke.task(pre=(clean, build))
37+
38+
@invoke.task(build)
2939
def performance(context):
30-
context.run(f"{sys.executable} performance/main.py", echo=True)
40+
context.run(f'{sys.executable} -m performance', echo=True, pty=True)
41+
3142

32-
@invoke.task(pre=(clean, build))
43+
@invoke.task
3344
def lint(context):
3445
'''Run pylint static analysis.
3546
'''
36-
context.run('pylint -f colorized test performance')
37-
47+
cmd = 'pylint -f colorized *.py performance src test'
48+
context.run(cmd, echo=True, pty=True)

0 commit comments

Comments
 (0)