Skip to content

Commit

Permalink
make release-tag: Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
csala committed Jun 22, 2020
2 parents 6a36438 + 867d660 commit b60c1b5
Show file tree
Hide file tree
Showing 44 changed files with 12,806 additions and 75 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run Tests

on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.5, 3.6, 3.7]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# History

## 0.2.1 - 2020-06-22

This release curates some of the dependencies and updates the example datasets
and documentation.

## 0.2.0 - 2019-11-26

Second Release:
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ include HISTORY.md
include LICENSE
include README.md

recursive-include autobazaar/templates *.json

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
Expand Down
86 changes: 64 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ BROWSER := python -c "$$BROWSER_PYSCRIPT"
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)


# CLEAN TARGETS

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

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

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

# TEST TARGETS

# .PHONY: test
# test: ## run tests quickly with the default Python
# .PHONY: test-unit
# test-unit: ## run tests quickly with the default Python
# python -m pytest --cov=autobazaar tests

.PHONY: test-readme
test-readme: ## run the readme snippets
python -m rundoc run --single-session bash -t bash README.md

.PHONY: test
test: test-readme ## test everything that needs test dependencies

.PHONY: test-devel
test-devel: lint docs ## test everything that needs development dependencies

.PHONY: test-all
test-all: ## run tests on every Python version with tox
test-all: ## test using tox
tox -r

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

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

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

.PHONY: test-publish
test-publish: dist ## package and upload a release on TestPyPI
.PHONY: publish-confirm
publish-confirm:
@echo "WARNING: This will irreversibly upload a new version to PyPI!"
@echo -n "Please type 'confirm' to proceed: " \
&& read answer \
&& [ "$${answer}" = "confirm" ]

.PHONY: publish-test
publish-test: dist publish-confirm ## package and upload a release on TestPyPI
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.PHONY: publish
publish: dist ## package and upload a release
publish: dist publish-confirm ## package and upload a release
twine upload dist/*

.PHONY: bumpversion-release
Expand All @@ -154,11 +169,12 @@ bumpversion-release: ## Merge master to stable and bumpversion release
bumpversion release
git push --tags origin stable

.PHONY: test-bumpversion-release
test-bumpversion-release: ## Merge master to stable and bumpversion release
.PHONY: bumpversion-release-test
bumpversion-release-test: ## Merge master to stable and bumpversion release
git checkout stable || git checkout -b stable
git merge --no-ff master -m"make release-tag: Merge branch 'master' into stable"
bumpversion release
bumpversion release --no-tag
@echo git push --tags origin stable

.PHONY: bumpversion-patch
bumpversion-patch: ## Merge stable to master and bumpversion patch
Expand All @@ -167,11 +183,9 @@ bumpversion-patch: ## Merge stable to master and bumpversion patch
bumpversion --no-tag patch
git push

.PHONY: test-bumpversion-patch
test-bumpversion-patch: ## Merge stable to master and bumpversion patch
git checkout master
git merge stable
bumpversion --no-tag patch
.PHONY: bumpversion-candidate
bumpversion-candidate: ## Bump the version to the next candidate
bumpversion candidate --no-tag

.PHONY: bumpversion-minor
bumpversion-minor: ## Bump the version the next minor skipping the release
Expand All @@ -181,21 +195,49 @@ bumpversion-minor: ## Bump the version the next minor skipping the release
bumpversion-major: ## Bump the version the next major skipping the release
bumpversion --no-tag major

.PHONY: bumpversion-revert
bumpversion-revert: ## Undo a previous bumpversion-release
git checkout master
git branch -D stable

CLEAN_DIR := $(shell git status --short | grep -v ??)
CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l)

.PHONY: check-release
check-release: ## Check if the release can be made
.PHONY: check-clean
check-clean: ## Check if the directory has uncommitted changes
ifneq ($(CLEAN_DIR),)
$(error There are uncommitted changes)
endif

.PHONY: check-master
check-master: ## Check if we are in master branch
ifneq ($(CURRENT_BRANCH),master)
$(error Please make the release from master branch\n)
endif

.PHONY: check-history
check-history: ## Check if HISTORY.md has been modified
ifeq ($(CHANGELOG_LINES),0)
$(error Please insert the release notes in HISTORY.md before releasing)
endif

.PHONY: check-release
check-release: check-clean check-master check-history ## Check if the release can be made
@echo "A new release can be made"

.PHONY: release
release: check-release bumpversion-release publish bumpversion-patch

.PHONY: release-test
release-test: check-release bumpversion-release-test publish-test bumpversion-revert

.PHONY: release-candidate
release-candidate: check-master publish bumpversion-candidate

.PHONY: release-candidate-test
release-candidate-test: check-clean check-master publish-test

.PHONY: release-minor
release-minor: check-release bumpversion-minor release

Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
<i>An open source project from Data to AI Lab at MIT.</i>
</p>

[![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)
[![PyPi](https://img.shields.io/pypi/v/autobazaar.svg)](https://pypi.python.org/pypi/autobazaar)
[![Travis](https://travis-ci.org/HDI-Project/AutoBazaar.svg?branch=master)](https://travis-ci.org/HDI-Project/AutoBazaar)
[![Downloads](https://pepy.tech/badge/autobazaar)](https://pepy.tech/project/autobazaar)

# AutoBazaar

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

```bash
```
pip install autobazaar
```

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

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

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

```bash
Assuming that the data is inside a folder called `input` within your current folder,
you can run:

```
$ abz list -i /path/to/your/datasets/folder
```

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

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

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

```bash
For example if you want to search for the best

```
$ abz search -i /path/to/your/datasets/folder name_of_your_dataset
```

Expand Down
2 changes: 1 addition & 1 deletion autobazaar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
__copyright__ = 'Copyright (c) 2019, MIT Data To AI Lab'
__email__ = 'dailabmit@gmail.com'
__license__ = 'MIT'
__version__ = '0.2.0'
__version__ = '0.2.1.dev3'


def _get_commit():
Expand Down
6 changes: 4 additions & 2 deletions autobazaar/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ def _search(args):
columns = REPORT_COLUMNS[1:]
print(report.set_index('dataset').to_string(columns=columns))

return report.error.notnull().all()


def _get_datasets(args):
if args.all:
Expand Down Expand Up @@ -528,8 +530,8 @@ def main():
logging_setup(args.verbose, args.logfile)
gc.enable()

args.command(args)
return int(bool(args.command(args)))


if __name__ == '__main__':
main()
sys.exit(main())

0 comments on commit b60c1b5

Please sign in to comment.