Skip to content

Commit 6d41353

Browse files
committed
make release-tag: Merge branch 'master' into stable
2 parents 16ba53c + a4ba9c4 commit 6d41353

File tree

8 files changed

+50
-18
lines changed

8 files changed

+50
-18
lines changed

.github/workflows/tests.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v1
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
19+
uses: actions/setup-python@v2
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install package
@@ -29,11 +29,11 @@ jobs:
2929
strategy:
3030
matrix:
3131
python-version: [3.6, 3.7, 3.8]
32-
os: [ubuntu-latest, macos-latest]
32+
os: [ubuntu-20.04, macos-latest]
3333
steps:
3434
- uses: actions/checkout@v1
3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v1
36+
uses: actions/setup-python@v2
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939
- name: Install package and dependencies
@@ -46,31 +46,48 @@ jobs:
4646
strategy:
4747
matrix:
4848
python-version: [3.6, 3.7, 3.8]
49-
os: [ubuntu-latest, macos-latest]
49+
os: [ubuntu-20.04, macos-latest]
5050
steps:
5151
- uses: actions/checkout@v1
5252
- name: Set up Python ${{ matrix.python-version }}
53-
uses: actions/setup-python@v1
53+
uses: actions/setup-python@v2
5454
with:
5555
python-version: ${{ matrix.python-version }}
5656
- name: Install package and dependencies
57-
run: pip install .[test]
57+
run: pip install .[unit]
5858
- name: make test-unit
5959
run: make test-unit
6060

61+
unit-mlprimitives:
62+
runs-on: ${{ matrix.os }}
63+
strategy:
64+
matrix:
65+
python-version: [3.6, 3.7, 3.8]
66+
os: [ubuntu-20.04, macos-latest]
67+
steps:
68+
- uses: actions/checkout@v1
69+
- name: Set up Python ${{ matrix.python-version }}
70+
uses: actions/setup-python@v2
71+
with:
72+
python-version: ${{ matrix.python-version }}
73+
- name: Install package and dependencies
74+
run: pip install .[test]
75+
- name: make test-mlprimitives
76+
run: make test-mlprimitives
77+
6178
tutorials:
6279
runs-on: ${{ matrix.os }}
6380
strategy:
6481
matrix:
6582
python-version: [3.6, 3.7, 3.8]
66-
os: [ubuntu-latest]
83+
os: [ubuntu-20.04]
6784
steps:
6885
- uses: actions/checkout@v1
6986
- name: Set up Python ${{ matrix.python-version }}
70-
uses: actions/setup-python@v1
87+
uses: actions/setup-python@v2
7188
with:
7289
python-version: ${{ matrix.python-version }}
73-
- if: matrix.os == 'ubuntu-latest'
90+
- if: matrix.os == 'ubuntu-20.04'
7491
name: Install dependencies - Ubuntu
7592
run: sudo apt-get install graphviz
7693
- name: Install package and dependencies

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
0.5.0 - 2023-01-22
5+
------------------
6+
7+
* Update `numpy` dependency and isolate tests - [Issue #139](https://github.com/MLBazaar/MLBlocks/issues/139) by @sarahmish
8+
49
0.4.1 - 2021-10-08
510
------------------
611

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ lint-docs: ## check docs formatting with doc8 and pydocstyle
118118

119119
.PHONY: test-unit
120120
test-unit: ## run tests quickly with the default Python
121+
python -m pytest --cov=mlblocks --ignore=tests/features/
122+
123+
.PHONY: test-mlprimitives
124+
test-mlprimitives: ## run tests quickly with the default Python
121125
python -m pytest --cov=mlblocks
122126

123127
.PHONY: test-readme
@@ -132,7 +136,7 @@ test-tutorials: ## run the tutorial notebooks
132136
jupyter nbconvert --execute --ExecutePreprocessor.timeout=3600 --stdout --to html {} > /dev/null +
133137

134138
.PHONY: test
135-
test: test-unit test-readme ## test everything that needs test dependencies
139+
test: test-unit test-mlprimitives test-readme ## test everything that needs test dependencies
136140

137141
.PHONY: check-dependencies
138142
check-dependencies: ## test if there are any broken dependencies

docs/getting_started/quickstart.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ To do this, we first call the ``fit`` method passing the training data and the c
102102
labels.
103103

104104
.. ipython:: python
105+
:okwarning:
105106
106107
from mlprimitives.datasets import load_census
107108
dataset = load_census()
@@ -112,6 +113,7 @@ Once we have fitted our model to our data, we can call the ``predict`` method pa
112113
to obtain predictions from the pipeline.
113114

114115
.. ipython:: python
116+
:okwarning:
115117
116118
predictions = pipeline.predict(X_test)
117119
predictions

mlblocks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
__copyright__ = 'Copyright (c) 2018, MIT Data To AI Lab'
2121
__email__ = '[email protected]'
2222
__license__ = 'MIT'
23-
__version__ = '0.4.1'
23+
__version__ = '0.5.0.dev0'
2424

2525
__all__ = [
2626
'MLBlock',

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.4.1
2+
current_version = 0.5.0.dev0
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
install_requires = [
1616
'graphviz>=0.9,<1',
17-
'numpy>=1.17.1,<1.21',
17+
'numpy>=1.17.1,<2',
1818
'psutil>=5,<6',
1919
]
2020

@@ -23,6 +23,7 @@
2323
'mlprimitives>=0.3.0,<0.4',
2424
'h5py<2.11.0,>=2.10.0', # <- tensorflow 2.3.2 conflict
2525
'matplotlib<3.2.2,>=2.2.2', # <- copulas 0.3.3
26+
'protobuf<4', # <- importlib
2627
]
2728

2829
examples_require = mlprimitives_requires + [
@@ -34,7 +35,6 @@
3435
tests_require = [
3536
'pytest>=3.4.2',
3637
'pytest-cov>=2.6.0',
37-
'mlprimitives>=0.3.0.dev0,<0.4',
3838
'setuptools>=41.0.0',
3939
'rundoc>=0.4.3',
4040
'prompt-toolkit>=2.0,<3.0',
@@ -56,8 +56,11 @@
5656
'm2r>=0.2.0,<0.3',
5757
'Sphinx>=1.7.1,<3',
5858
'sphinx_rtd_theme>=0.2.4,<0.5',
59+
'docutils>=0.12,<0.18',
5960
'ipython>=6.5.0',
6061
'autodocsumm>=0.1.10',
62+
'Jinja2>=2,<3', # >=3 makes sphinx theme fail
63+
'markupsafe<2.1.0',
6164

6265
# style check
6366
'flake8>=3.7.7,<4',
@@ -97,6 +100,7 @@
97100
description='Pipelines and primitives for machine learning and data science.',
98101
extras_require={
99102
'dev': development_requires + tests_require + examples_require,
103+
'unit': tests_require,
100104
'test': tests_require + examples_require,
101105
'examples': examples_require,
102106
'mlprimitives': mlprimitives_requires,
@@ -114,6 +118,6 @@
114118
test_suite='tests',
115119
tests_require=tests_require,
116120
url='https://github.com/MLBazaar/MLBlocks',
117-
version='0.4.1',
121+
version='0.5.0.dev0',
118122
zip_safe=False,
119123
)

tests/test_mlpipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ def test_get_diagram_simple(self):
11241124
]
11251125
pipeline.blocks['a_primitive#1'].produce_output = output
11261126

1127-
assert str(pipeline.get_diagram()) == expected
1127+
assert str(pipeline.get_diagram()).strip() == expected.strip()
11281128

11291129
@patch('mlblocks.mlpipeline.MLBlock', new=get_mlblock_mock)
11301130
def test_get_diagram_fit(self):
@@ -1155,7 +1155,7 @@ def test_get_diagram_fit(self):
11551155
]
11561156
pipeline.blocks['a_primitive#1'].produce_output = output
11571157

1158-
assert str(pipeline.get_diagram()) == expected
1158+
assert str(pipeline.get_diagram()).strip() == expected.strip()
11591159

11601160
@patch('mlblocks.mlpipeline.MLBlock', new=get_mlblock_mock)
11611161
def test_get_diagram_multiple_blocks(self):
@@ -1189,7 +1189,7 @@ def test_get_diagram_multiple_blocks(self):
11891189
pipeline.blocks['b_primitive#1'].produce_args = first_output
11901190
pipeline.blocks['b_primitive#1'].produce_output = second_output
11911191

1192-
assert str(pipeline.get_diagram()) == expected
1192+
assert str(pipeline.get_diagram()).strip() == expected.strip()
11931193

11941194
def test_fit(self):
11951195
pass

0 commit comments

Comments
 (0)