Skip to content

Commit b60c1b5

Browse files
committed
make release-tag: Merge branch 'master' into stable
2 parents 6a36438 + 867d660 commit b60c1b5

File tree

44 files changed

+12806
-75
lines changed

Some content is hidden

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

44 files changed

+12806
-75
lines changed

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
python-version: [3.5, 3.6, 3.7]
15+
os: [ubuntu-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install tox tox-gh-actions
29+
30+
- name: Test with tox
31+
run: tox

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# History
22

3+
## 0.2.1 - 2020-06-22
4+
5+
This release curates some of the dependencies and updates the example datasets
6+
and documentation.
7+
38
## 0.2.0 - 2019-11-26
49

510
Second Release:

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ include HISTORY.md
33
include LICENSE
44
include README.md
55

6+
recursive-include autobazaar/templates *.json
7+
68
recursive-include tests *
79
recursive-exclude * __pycache__
810
recursive-exclude * *.py[co]

Makefile

Lines changed: 64 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ BROWSER := python -c "$$BROWSER_PYSCRIPT"
2929
help:
3030
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
3131

32+
3233
# CLEAN TARGETS
3334

3435
.PHONY: clean-build
@@ -48,11 +49,8 @@ clean-pyc: ## remove Python file artifacts
4849

4950
.PHONY: clean-docs
5051
clean-docs: ## remove previously built docs
51-
rm -rf docs/_build
52-
rm -f docs/api/autobazaar.rst
53-
rm -f docs/api/autobazaar.*.rst
54-
rm -f docs/modules.rst
55-
$(MAKE) -C docs clean
52+
rm -f docs/api/*.rst
53+
-$(MAKE) -C docs clean 2>/dev/null # this fails if sphinx is not yet installed
5654

5755
.PHONY: clean-coverage
5856
clean-coverage: ## remove coverage artifacts
@@ -99,12 +97,22 @@ fix-lint: ## fix lint issues using autoflake, autopep8, and isort
9997

10098
# TEST TARGETS
10199

102-
# .PHONY: test
103-
# test: ## run tests quickly with the default Python
100+
# .PHONY: test-unit
101+
# test-unit: ## run tests quickly with the default Python
104102
# python -m pytest --cov=autobazaar tests
105103

104+
.PHONY: test-readme
105+
test-readme: ## run the readme snippets
106+
python -m rundoc run --single-session bash -t bash README.md
107+
108+
.PHONY: test
109+
test: test-readme ## test everything that needs test dependencies
110+
111+
.PHONY: test-devel
112+
test-devel: lint docs ## test everything that needs development dependencies
113+
106114
.PHONY: test-all
107-
test-all: ## run tests on every Python version with tox
115+
test-all: ## test using tox
108116
tox -r
109117

110118
.PHONY: coverage
@@ -119,7 +127,7 @@ coverage: ## check code coverage quickly with the default Python
119127

120128
.PHONY: docs
121129
docs: clean-docs ## generate Sphinx HTML documentation, including API docs
122-
sphinx-apidoc --separate -T -o docs/api/ autobazaar
130+
sphinx-apidoc --module-first --separate -T -o docs/api/ autobazaar
123131
$(MAKE) -C docs html
124132

125133
.PHONY: view-docs
@@ -139,12 +147,19 @@ dist: clean ## builds source and wheel package
139147
python setup.py bdist_wheel
140148
ls -l dist
141149

142-
.PHONY: test-publish
143-
test-publish: dist ## package and upload a release on TestPyPI
150+
.PHONY: publish-confirm
151+
publish-confirm:
152+
@echo "WARNING: This will irreversibly upload a new version to PyPI!"
153+
@echo -n "Please type 'confirm' to proceed: " \
154+
&& read answer \
155+
&& [ "$${answer}" = "confirm" ]
156+
157+
.PHONY: publish-test
158+
publish-test: dist publish-confirm ## package and upload a release on TestPyPI
144159
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
145160

146161
.PHONY: publish
147-
publish: dist ## package and upload a release
162+
publish: dist publish-confirm ## package and upload a release
148163
twine upload dist/*
149164

150165
.PHONY: bumpversion-release
@@ -154,11 +169,12 @@ bumpversion-release: ## Merge master to stable and bumpversion release
154169
bumpversion release
155170
git push --tags origin stable
156171

157-
.PHONY: test-bumpversion-release
158-
test-bumpversion-release: ## Merge master to stable and bumpversion release
172+
.PHONY: bumpversion-release-test
173+
bumpversion-release-test: ## Merge master to stable and bumpversion release
159174
git checkout stable || git checkout -b stable
160175
git merge --no-ff master -m"make release-tag: Merge branch 'master' into stable"
161-
bumpversion release
176+
bumpversion release --no-tag
177+
@echo git push --tags origin stable
162178

163179
.PHONY: bumpversion-patch
164180
bumpversion-patch: ## Merge stable to master and bumpversion patch
@@ -167,11 +183,9 @@ bumpversion-patch: ## Merge stable to master and bumpversion patch
167183
bumpversion --no-tag patch
168184
git push
169185

170-
.PHONY: test-bumpversion-patch
171-
test-bumpversion-patch: ## Merge stable to master and bumpversion patch
172-
git checkout master
173-
git merge stable
174-
bumpversion --no-tag patch
186+
.PHONY: bumpversion-candidate
187+
bumpversion-candidate: ## Bump the version to the next candidate
188+
bumpversion candidate --no-tag
175189

176190
.PHONY: bumpversion-minor
177191
bumpversion-minor: ## Bump the version the next minor skipping the release
@@ -181,21 +195,49 @@ bumpversion-minor: ## Bump the version the next minor skipping the release
181195
bumpversion-major: ## Bump the version the next major skipping the release
182196
bumpversion --no-tag major
183197

198+
.PHONY: bumpversion-revert
199+
bumpversion-revert: ## Undo a previous bumpversion-release
200+
git checkout master
201+
git branch -D stable
202+
203+
CLEAN_DIR := $(shell git status --short | grep -v ??)
184204
CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
185205
CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l)
186206

187-
.PHONY: check-release
188-
check-release: ## Check if the release can be made
207+
.PHONY: check-clean
208+
check-clean: ## Check if the directory has uncommitted changes
209+
ifneq ($(CLEAN_DIR),)
210+
$(error There are uncommitted changes)
211+
endif
212+
213+
.PHONY: check-master
214+
check-master: ## Check if we are in master branch
189215
ifneq ($(CURRENT_BRANCH),master)
190216
$(error Please make the release from master branch\n)
191217
endif
218+
219+
.PHONY: check-history
220+
check-history: ## Check if HISTORY.md has been modified
192221
ifeq ($(CHANGELOG_LINES),0)
193222
$(error Please insert the release notes in HISTORY.md before releasing)
194223
endif
195224

225+
.PHONY: check-release
226+
check-release: check-clean check-master check-history ## Check if the release can be made
227+
@echo "A new release can be made"
228+
196229
.PHONY: release
197230
release: check-release bumpversion-release publish bumpversion-patch
198231

232+
.PHONY: release-test
233+
release-test: check-release bumpversion-release-test publish-test bumpversion-revert
234+
235+
.PHONY: release-candidate
236+
release-candidate: check-master publish bumpversion-candidate
237+
238+
.PHONY: release-candidate-test
239+
release-candidate-test: check-clean check-master publish-test
240+
199241
.PHONY: release-minor
200242
release-minor: check-release bumpversion-minor release
201243

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
<i>An open source project from Data to AI Lab at MIT.</i>
44
</p>
55

6+
[![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)
67
[![PyPi](https://img.shields.io/pypi/v/autobazaar.svg)](https://pypi.python.org/pypi/autobazaar)
78
[![Travis](https://travis-ci.org/HDI-Project/AutoBazaar.svg?branch=master)](https://travis-ci.org/HDI-Project/AutoBazaar)
89
[![Downloads](https://pepy.tech/badge/autobazaar)](https://pepy.tech/project/autobazaar)
910

1011
# AutoBazaar
1112

1213
* License: [MIT](https://github.com/HDI-Project/AutoBazaar/blob/master/LICENSE)
14+
* Development Status: [Pre-Alpha](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)
1315
* Documentation: https://HDI-Project.github.io/AutoBazaar/
1416
* Homepage: https://github.com/HDI-Project/AutoBazaar
1517
* Paper: https://arxiv.org/pdf/1905.08942.pdf
@@ -39,7 +41,7 @@ interfering with other software installed in the system where **AutoBazaar** is
3941
The easiest and recommended way to install **AutoBazaar** is using
4042
[pip](https://pip.pypa.io/en/stable/):
4143

42-
```bash
44+
```
4345
pip install autobazaar
4446
```
4547

@@ -64,8 +66,8 @@ refer to the [Schema Documentation](https://github.com/mitll/d3m-schema/tree/mas
6466

6567
As an example, you can browse some datasets which have been included in this repository for
6668
demonstration purposes:
67-
- [185_baseball](https://github.com/HDI-Project/AutoBazaar/tree/master/data/185_baseball): Single Table Regression
68-
- [196_autoMpg](https://github.com/HDI-Project/AutoBazaar/tree/master/data/196_autoMpg): Single Table Classification
69+
- [185_baseball](https://github.com/HDI-Project/AutoBazaar/tree/master/input/185_baseball): Single Table Regression
70+
- [196_autoMpg](https://github.com/HDI-Project/AutoBazaar/tree/master/input/196_autoMpg): Single Table Classification
6971

7072
<!--Additionally, you can find a collection with ~500 datasets already formatted in the
7173
[d3m-data-dai S3 Bucket](https://d3m-data-dai.s3.amazonaws.com/index.html).-->
@@ -89,7 +91,10 @@ If your dataset is in a different place than inside a folder called `data` withi
8991
current working directory, do not forget to add the `-i` argument to your command indicating
9092
the path to the folder that contains your dataset.
9193

92-
```bash
94+
Assuming that the data is inside a folder called `input` within your current folder,
95+
you can run:
96+
97+
```
9398
$ abz list -i /path/to/your/datasets/folder
9499
```
95100

@@ -110,7 +115,7 @@ dataset
110115
dataset format and make sure to have indicated the right path.
111116

112117
For the rest of this quickstart, we will be using the `185_baseball` dataset that you can
113-
find inside the [data folder](https://github.com/HDI-Project/AutoBazaar/tree/master/data)
118+
find inside the [input folder](https://github.com/HDI-Project/AutoBazaar/tree/master/input)
114119
contained in this repository.
115120

116121
## 2. Start the search process
@@ -120,7 +125,9 @@ command.
120125
To do this, you will need to provide again the path to where your datasets are contained, as
121126
well as the name of the datasets that you want to process.
122127

123-
```bash
128+
For example if you want to search for the best
129+
130+
```
124131
$ abz search -i /path/to/your/datasets/folder name_of_your_dataset
125132
```
126133

autobazaar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
__copyright__ = 'Copyright (c) 2019, MIT Data To AI Lab'
2020
__email__ = '[email protected]'
2121
__license__ = 'MIT'
22-
__version__ = '0.2.0'
22+
__version__ = '0.2.1.dev3'
2323

2424

2525
def _get_commit():

autobazaar/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ def _search(args):
339339
columns = REPORT_COLUMNS[1:]
340340
print(report.set_index('dataset').to_string(columns=columns))
341341

342+
return report.error.notnull().all()
343+
342344

343345
def _get_datasets(args):
344346
if args.all:
@@ -528,8 +530,8 @@ def main():
528530
logging_setup(args.verbose, args.logfile)
529531
gc.enable()
530532

531-
args.command(args)
533+
return int(bool(args.command(args)))
532534

533535

534536
if __name__ == '__main__':
535-
main()
537+
sys.exit(main())

0 commit comments

Comments
 (0)