Skip to content

Commit 030998e

Browse files
committed
make release-tag: Merge branch 'master' into stable
2 parents b0cd380 + 2c1e9a3 commit 030998e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+5915
-948
lines changed

.github/workflows/docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Generate Docs
2+
3+
on:
4+
push:
5+
branches: [ stable ]
6+
7+
jobs:
8+
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
19+
- name: Build
20+
run: |
21+
sudo apt-get install graphviz pandoc
22+
python -m pip install --upgrade pip
23+
pip install -e .[dev]
24+
make docs
25+
- name: Deploy
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{secrets.GITHUB_TOKEN}}
29+
publish_dir: docs/_build/html

.github/workflows/tests.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
devel:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
python-version: [3.8]
15+
os: [ubuntu-latest]
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install package
23+
run: pip install .[dev]
24+
- name: make test-devel
25+
run: make test-devel
26+
27+
readme:
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
python-version: [3.6, 3.7, 3.8]
32+
os: [ubuntu-latest, macos-latest]
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v1
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
- name: Install package and dependencies
40+
run: pip install rundoc .[mlprimitives]
41+
- name: make test-readme
42+
run: make test-readme
43+
44+
unit:
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
matrix:
48+
python-version: [3.6, 3.7, 3.8]
49+
os: [ubuntu-latest, macos-latest]
50+
steps:
51+
- uses: actions/checkout@v1
52+
- name: Set up Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v1
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
- name: Install package and dependencies
57+
run: pip install .[test]
58+
- name: make test-unit
59+
run: make test-unit
60+
61+
tutorials:
62+
runs-on: ${{ matrix.os }}
63+
strategy:
64+
matrix:
65+
python-version: [3.6, 3.7, 3.8]
66+
os: [ubuntu-latest]
67+
steps:
68+
- uses: actions/checkout@v1
69+
- name: Set up Python ${{ matrix.python-version }}
70+
uses: actions/setup-python@v1
71+
with:
72+
python-version: ${{ matrix.python-version }}
73+
- if: matrix.os == 'ubuntu-latest'
74+
name: Install dependencies - Ubuntu
75+
run: sudo apt-get install graphviz
76+
- name: Install package and dependencies
77+
run: pip install .[examples]
78+
- name: make test-tutorials
79+
run: make test-tutorials

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ ENV/
109109
.*.swp
110110

111111
mlblocks/data
112+
examples/tutorials/pipeline.pkl

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Contributors
1010
* William Xue <[email protected]>
1111
* Akshay Ravikumar <[email protected]>
1212
* Laura Gustafson <[email protected]>
13+
* Erica Chiu <[email protected]>

CONTRIBUTING.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Types of Contributions
1515
Report Bugs
1616
~~~~~~~~~~~
1717

18-
Report bugs at https://github.com/HDI-Project/MLBlocks/issues.
18+
Report bugs at https://github.com/MLBazaar/MLBlocks/issues.
1919

2020
If you are reporting a bug, please include:
2121

@@ -45,7 +45,7 @@ articles, and such.
4545
Submit Feedback
4646
~~~~~~~~~~~~~~~
4747

48-
The best way to send feedback is to file an issue at https://github.com/HDI-Project/MLBlocks/issues.
48+
The best way to send feedback is to file an issue at https://github.com/MLBazaar/MLBlocks/issues.
4949

5050
If you are proposing a feature:
5151

@@ -120,8 +120,8 @@ Before you submit a pull request, check that it meets these guidelines:
120120
4. If the pull request adds functionality, the docs should be updated. Put
121121
your new functionality into a function with a docstring, and add the
122122
feature to the list in README.rst.
123-
5. The pull request should work for Python2.7, 3.4, 3.5 and 3.6. Check
124-
https://travis-ci.org/HDI-Project/MLBlocks/pull_requests
123+
5. The pull request should work for all the supported python version. Check
124+
https://travis-ci.org/MLBazaar/MLBlocks/pull_requests
125125
and make sure that all the checks pass.
126126

127127
Unit Testing Guidelines

HISTORY.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,45 @@
11
Changelog
22
=========
33

4+
0.4.0 - 2021-01-09
5+
------------------
6+
7+
* Stop pipeline fitting after the last block - [Issue #131](https://github.com/MLBazaar/MLBlocks/issues/131) by @sarahmish
8+
* Add memory debug and profiling - [Issue #130](https://github.com/MLBazaar/MLBlocks/issues/130) by @pvk-developer
9+
* Update Python support - [Issue #129](https://github.com/MLBazaar/MLBlocks/issues/129) by @csala
10+
* Get execution time for each block - [Issue #127](https://github.com/MLBazaar/MLBlocks/issues/127) by @sarahmish
11+
* Allow loading a primitive or pipeline directly from the JSON path - [Issue #114](https://github.com/MLBazaar/MLBlocks/issues/114) by @csala
12+
* Pipeline Diagrams - [Issue #113](https://github.com/MLBazaar/MLBlocks/issues/113) by @erica-chiu
13+
* Get Pipeline Inputs - [Issue #112](https://github.com/MLBazaar/MLBlocks/issues/112) by @erica-chiu
14+
415
0.3.4 - 2019-11-01
516
------------------
617

7-
* Ability to return intermediate context - [Issue #110](https://github.com/HDI-Project/MLBlocks/issues/110) by @csala
8-
* Support for static or class methods - [Issue #107](https://github.com/HDI-Project/MLBlocks/issues/107) by @csala
18+
* Ability to return intermediate context - [Issue #110](https://github.com/MLBazaar/MLBlocks/issues/110) by @csala
19+
* Support for static or class methods - [Issue #107](https://github.com/MLBazaar/MLBlocks/issues/107) by @csala
920

1021
0.3.3 - 2019-09-09
1122
------------------
1223

13-
* Improved intermediate outputs management - [Issue #105](https://github.com/HDI-Project/MLBlocks/issues/105) by @csala
24+
* Improved intermediate outputs management - [Issue #105](https://github.com/MLBazaar/MLBlocks/issues/105) by @csala
1425

1526
0.3.2 - 2019-08-12
1627
------------------
1728

18-
* Allow passing fit and produce arguments as `init_params` - [Issue #96](https://github.com/HDI-Project/MLBlocks/issues/96) by @csala
19-
* Support optional fit and produce args and arg defaults - [Issue #95](https://github.com/HDI-Project/MLBlocks/issues/95) by @csala
20-
* Isolate primitives from their hyperparameters dictionary - [Issue #94](https://github.com/HDI-Project/MLBlocks/issues/94) by @csala
21-
* Add functions to explore the available primitives and pipelines - [Issue #90](https://github.com/HDI-Project/MLBlocks/issues/90) by @csala
22-
* Add primitive caching - [Issue #22](https://github.com/HDI-Project/MLBlocks/issues/22) by @csala
29+
* Allow passing fit and produce arguments as `init_params` - [Issue #96](https://github.com/MLBazaar/MLBlocks/issues/96) by @csala
30+
* Support optional fit and produce args and arg defaults - [Issue #95](https://github.com/MLBazaar/MLBlocks/issues/95) by @csala
31+
* Isolate primitives from their hyperparameters dictionary - [Issue #94](https://github.com/MLBazaar/MLBlocks/issues/94) by @csala
32+
* Add functions to explore the available primitives and pipelines - [Issue #90](https://github.com/MLBazaar/MLBlocks/issues/90) by @csala
33+
* Add primitive caching - [Issue #22](https://github.com/MLBazaar/MLBlocks/issues/22) by @csala
2334

2435
0.3.1 - Pipelines Discovery
2536
---------------------------
2637

27-
* Support flat hyperparameter dictionaries - [Issue #92](https://github.com/HDI-Project/MLBlocks/issues/92) by @csala
28-
* Load pipelines by name and register them as `entry_points` - [Issue #88](https://github.com/HDI-Project/MLBlocks/issues/88) by @csala
29-
* Implement partial re-fit -[Issue #61](https://github.com/HDI-Project/MLBlocks/issues/61) by @csala
30-
* Move argument parsing to MLBlock - [Issue #86](https://github.com/HDI-Project/MLBlocks/issues/86) by @csala
31-
* Allow getting intermediate outputs - [Issue #58](https://github.com/HDI-Project/MLBlocks/issues/58) by @csala
38+
* Support flat hyperparameter dictionaries - [Issue #92](https://github.com/MLBazaar/MLBlocks/issues/92) by @csala
39+
* Load pipelines by name and register them as `entry_points` - [Issue #88](https://github.com/MLBazaar/MLBlocks/issues/88) by @csala
40+
* Implement partial re-fit -[Issue #61](https://github.com/MLBazaar/MLBlocks/issues/61) by @csala
41+
* Move argument parsing to MLBlock - [Issue #86](https://github.com/MLBazaar/MLBlocks/issues/86) by @csala
42+
* Allow getting intermediate outputs - [Issue #58](https://github.com/MLBazaar/MLBlocks/issues/58) by @csala
3243

3344
0.3.0 - New Primitives Discovery
3445
--------------------------------

Makefile

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ clean: clean-build clean-pyc clean-test clean-coverage clean-docs ## remove all
7272
install: clean-build clean-pyc ## install the package to the active Python's site-packages
7373
pip install .
7474

75+
.PHONY: install-examples
76+
install-examples: clean-build clean-pyc ## install the package and the examples dependencies
77+
pip install .[examples]
78+
7579
.PHONY: install-test
7680
install-test: clean-build clean-pyc ## install the package and test dependencies
7781
pip install .[test]
@@ -80,6 +84,12 @@ install-test: clean-build clean-pyc ## install the package and test dependencies
8084
install-develop: clean-build clean-pyc ## install the package in editable mode and dependencies for development
8185
pip install -e .[dev]
8286

87+
MINIMUM := $(shell sed -n '/install_requires = \[/,/]/p' setup.py | grep -v -e '[][]' | sed 's/ *\(.*\),$?$$/\1/g' | tr '>' '=')
88+
89+
.PHONY: install-minimum
90+
install-minimum: ## install the minimum supported versions of the package dependencies
91+
pip install $(MINIMUM)
92+
8393

8494
# LINT TARGETS
8595

@@ -106,10 +116,31 @@ lint-docs: ## check docs formatting with doc8 and pydocstyle
106116

107117
# TEST TARGETS
108118

109-
.PHONY: test
110-
test: ## run tests quickly with the default Python
119+
.PHONY: test-unit
120+
test-unit: ## run tests quickly with the default Python
111121
python -m pytest --cov=mlblocks
112122

123+
.PHONY: test-readme
124+
test-readme: ## run the readme snippets
125+
rm -rf tests/readme_test && mkdir tests/readme_test
126+
cd tests/readme_test && rundoc run --single-session python3 -t python3 ../../README.md
127+
rm -rf tests/readme_test
128+
129+
.PHONY: test-tutorials
130+
test-tutorials: ## run the tutorial notebooks
131+
find examples/tutorials -path "*/.ipynb_checkpoints" -prune -false -o -name "*.ipynb" -exec \
132+
jupyter nbconvert --execute --ExecutePreprocessor.timeout=3600 --stdout --to html {} > /dev/null +
133+
134+
.PHONY: test
135+
test: test-unit test-readme ## test everything that needs test dependencies
136+
137+
.PHONY: check-dependencies
138+
check-dependencies: ## test if there are any broken dependencies
139+
pip check
140+
141+
.PHONY: test-devel
142+
test-devel: check-dependencies lint docs ## test everything that needs development dependencies
143+
113144
.PHONY: test-all
114145
test-all: ## run tests on every Python version with tox
115146
tox -r
@@ -129,11 +160,11 @@ docs: clean-docs ## generate Sphinx HTML documentation, including API docs
129160
$(MAKE) -C docs html
130161

131162
.PHONY: view-docs
132-
view-docs: docs ## view docs in browser
163+
view-docs: ## view the docs in a browser
133164
$(BROWSER) docs/_build/html/index.html
134165

135166
.PHONY: serve-docs
136-
serve-docs: view-docs ## compile the docs watching for changes
167+
serve-docs: ## compile the docs watching for changes
137168
watchmedo shell-command -W -R -D -p '*.rst;*.md' -c '$(MAKE) -C docs html' docs
138169

139170

@@ -145,12 +176,19 @@ dist: clean ## builds source and wheel package
145176
python setup.py bdist_wheel
146177
ls -l dist
147178

148-
.PHONY: test-publish
149-
test-publish: dist ## package and upload a release on TestPyPI
179+
.PHONY: publish-confirm
180+
publish-confirm:
181+
@echo "WARNING: This will irreversibly upload a new version to PyPI!"
182+
@echo -n "Please type 'confirm' to proceed: " \
183+
&& read answer \
184+
&& [ "$${answer}" = "confirm" ]
185+
186+
.PHONY: publish-test
187+
publish-test: dist publish-confirm ## package and upload a release on TestPyPI
150188
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
151189

152190
.PHONY: publish
153-
publish: dist ## package and upload a release
191+
publish: dist publish-confirm ## package and upload a release
154192
twine upload dist/*
155193

156194
.PHONY: bumpversion-release
@@ -179,9 +217,21 @@ bumpversion-minor: ## Bump the version the next minor skipping the release
179217
bumpversion-major: ## Bump the version the next major skipping the release
180218
bumpversion --no-tag major
181219

220+
.PHONY: bumpversion-revert
221+
bumpversion-revert: ## Undo a previous bumpversion-release
222+
git checkout master
223+
git branch -D stable
224+
225+
CLEAN_DIR := $(shell git status --short | grep -v ??)
182226
CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
183227
CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l)
184228

229+
.PHONY: check-clean
230+
check-clean: ## Check if the directory has uncommitted changes
231+
ifneq ($(CLEAN_DIR),)
232+
$(error There are uncommitted changes)
233+
endif
234+
185235
.PHONY: check-master
186236
check-master: ## Check if we are in master branch
187237
ifneq ($(CURRENT_BRANCH),master)
@@ -195,15 +245,21 @@ ifeq ($(CHANGELOG_LINES),0)
195245
endif
196246

197247
.PHONY: check-release
198-
check-release: check-master check-history ## Check if the release can be made
248+
check-release: check-clean check-master check-history ## Check if the release can be made
199249
@echo "A new release can be made"
200250

201251
.PHONY: release
202252
release: check-release bumpversion-release publish bumpversion-patch
203253

254+
.PHONY: release-test
255+
release-test: check-release bumpversion-release-test publish-test bumpversion-revert
256+
204257
.PHONY: release-candidate
205258
release-candidate: check-master publish bumpversion-candidate
206259

260+
.PHONY: release-candidate-test
261+
release-candidate-test: check-clean check-master publish-test
262+
207263
.PHONY: release-minor
208264
release-minor: check-release bumpversion-minor release
209265

0 commit comments

Comments
 (0)