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 26, 2020
2 parents 4d83685 + 890a3d1 commit 55654b5
Show file tree
Hide file tree
Showing 12 changed files with 208 additions and 129 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Generate Docs

on:
push:
branches: [ master ]

jobs:

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Python
uses: actions/setup-python@v1
with:
python-version: '3.7'

- name: Build
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
make docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: docs/_build/html
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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, macos-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
21 changes: 2 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
# Config file for automatic testing at travis-ci.org
dist: trusty
dist: bionic
language: python
python:
- 3.7
- 3.6
- 3.5

matrix:
include:
- python: 3.7
dist: xenial
sudo: required

# Command to install dependencies
install: pip install -U tox-travis codecov

after_success: codecov

# Command to run tests
script: tox

deploy:

- provider: pages
skip-cleanup: true
github-token: "$GITHUB_TOKEN"
keep-history: true
local-dir: docs/_build/html
target-branch: gh-pages
on:
branch: master
python: 3.6
6 changes: 6 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# History

## 0.2.2 - 2020-06-26

### Bugs Fixed

* Escape `column_name` in hypertransformer - Issue [#110](https://github.com/sdv-dev/RDT/issues/110) by @csala

## 0.2.1 - 2020-01-17

### Bugs Fixed
Expand Down
77 changes: 59 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,31 @@ lint: ## check style with flake8 and isort

.PHONY: fix-lint
fix-lint: ## fix lint issues using autoflake, autopep8, and isort
find rdt -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
autopep8 --in-place --recursive --aggressive rdt
isort --apply --atomic --recursive rdt

find tests -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
autopep8 --in-place --recursive --aggressive tests
isort --apply --atomic --recursive tests
find rdt tests -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
autopep8 --in-place --recursive --aggressive rdt tests
isort --apply --atomic --recursive rdt tests


# TEST TARGETS

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

.PHONY: test-readme
test-readme: ## run the readme snippets
rm -rf tests/readme_test && mkdir tests/readme_test
cd tests/readme_test && rundoc run --single-session python3 -t python3 ../../README.md
rm -rf tests/readme_test

.PHONY: test
test: ## run tests quickly with the default Python
python -m pytest --basetemp=${ENVTMPDIR} --cov=rdt
test: test-unit 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 Down Expand Up @@ -142,28 +150,46 @@ 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
bumpversion-release: ## Merge master to stable and bumpversion release
git checkout stable || (git checkout -b stable && git push --set-upstream origin stable)
git checkout stable || git checkout -b stable
git merge --no-ff master -m"make release-tag: Merge branch 'master' into stable"
bumpversion release
git push --tags origin stable

.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 --no-tag
@echo git push --tags origin stable

.PHONY: bumpversion-patch
bumpversion-patch: ## Merge stable to master and bumpversion patch
git checkout master
git merge stable
bumpversion --no-tag patch
git push

.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
bumpversion --no-tag minor
Expand All @@ -172,13 +198,21 @@ 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-candidate
bumpversion-candidate: ## Bump the version to the next candidate
bumpversion candidate --no-tag
.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-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)
Expand All @@ -192,14 +226,21 @@ ifeq ($(CHANGELOG_LINES),0)
endif

.PHONY: check-release
check-release: check-master check-history ## Check if the release can be made
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
Loading

0 comments on commit 55654b5

Please sign in to comment.