Skip to content

Commit

Permalink
Merge pull request #94 from simelo/stdevHan_t85_release_0.25
Browse files Browse the repository at this point in the history
refs #85 Deploy to PyPI from Travis
  • Loading branch information
olemis authored Dec 29, 2018
2 parents 14ba433 + 77c74a2 commit 30e2d65
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 106 deletions.
172 changes: 88 additions & 84 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,97 @@
# this file is *not* meant to cover or endorse the use of travis, but rather to
# help confirm pull requests to this project.

matrix:
include:
- os: linux
language: python
python: 2.7
env:
- TOXENV=py27
- PYTHON=2.7
- os: linux
language: python
python: 3.4
env:
- TOXENV=py34
- PYTHON=3.4
- os: linux
language: python
python: 3.5
env:
- TOXENV=py35
- PYTHON=3.5
- os: linux
language: python
python: 3.6
env:
- TOXENV=py36
- PYTHON=3.6
- os: linux
language: python
dist: xenial
python: 3.7
sudo: true
env:
- TOXENV=py37
- PYTHON=3.7
- os: osx
languague: generic
env:
- PYTHON=2.7
- TOXENV=py27
- os: osx
languague: generic
env:
- PYTHON=3.4.8
- TOXENV=py34
- os: osx
languague: generic
env:
- PYTHON=3.5.5
- TOXENV=py35
- os: osx
languague: generic
env:
- PYTHON=3.6.5
- TOXENV=py36
- os: osx
languague: generic
env:
- PYTHON=3.7.1
- TOXENV=py37

- os: linux
language: python
python: 2.7
env:
- TOXENV=py27
- PYTHON=2.7
- os: linux
language: python
python: 3.4
env:
- TOXENV=py34
- PYTHON=3.4
- os: linux
language: python
python: 3.5
env:
- TOXENV=py35
- PYTHON=3.5
- os: linux
language: python
python: 3.6
env:
- TOXENV=py36
- PYTHON=3.6
- os: linux
language: python
dist: xenial
python: 3.7
sudo: true
env:
- TOXENV=py37
- PYTHON=3.7
- os: osx
languague: generic
env:
- PYTHON=2.7
- TOXENV=py27
- os: osx
languague: generic
env:
- PYTHON=3.4.8
- TOXENV=py34
- os: osx
languague: generic
env:
- PYTHON=3.5.5
- TOXENV=py35
- os: osx
languague: generic
env:
- PYTHON=3.6.5
- TOXENV=py36
- os: osx
languague: generic
env:
- PYTHON=3.7.1
- TOXENV=py37
before_install:
# Sync to develop branch
# FIXME: Checkout skycoin/skycoin:master
- cd gopath/src/github.com/skycoin/skycoin && git checkout develop && cd ${TRAVIS_BUILD_DIR}
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then bash ./.travis/install-linux.sh ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then bash ./.travis/install-osx.sh; fi
# Setup environment and PATH in MacOS
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PYCMD_VERSION="$(echo ${PYTHON} | cut -d . -f 1,2)" ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PYCMD_PATH="$(pyenv which python${PYCMD_VERSION})" ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PYCMD_DIRPATH="$( dirname ${PYCMD_PATH} )" ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PATH="${PYCMD_DIRPATH}:/Users/travis/.pyenv/shims:${PATH}" ; fi
# Define command aliases
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then eval "alias python${PYCMD_VERSION}=$(pyenv which python${PYCMD_VERSION})" && eval "alias python2.7=$(pyenv which python2.7)"; fi
# Print system env info
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then pyenv versions ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then pyenv which python${PYCMD_VERSION} ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then eval "python${PYCMD_VERSION} --version" ; fi
- echo "PATH=$PATH"

- cd gopath/src/github.com/skycoin/skycoin && git checkout develop && cd ${TRAVIS_BUILD_DIR}
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then bash ./.travis/install-linux.sh ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then bash ./.travis/install-osx.sh; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PYCMD_VERSION="$(echo ${PYTHON} |
cut -d . -f 1,2)" ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PYCMD_PATH="$(pyenv which python${PYCMD_VERSION})"
; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PYCMD_DIRPATH="$( dirname ${PYCMD_PATH}
)" ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PATH="${PYCMD_DIRPATH}:/Users/travis/.pyenv/shims:${PATH}"
; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then eval "alias python${PYCMD_VERSION}=$(pyenv
which python${PYCMD_VERSION})" && eval "alias python2.7=$(pyenv which python2.7)";
fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then pyenv versions ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then pyenv which python${PYCMD_VERSION} ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then eval "python${PYCMD_VERSION} --version"
; fi
- echo "PATH=$PATH"
install:
- eval "$(gimme 1.10)"

- eval "$(gimme 1.10)"
after_failure:
- cat ./.tox/${TOXENV}/log/${TOXENV}-*.log

- cat ./.tox/${TOXENV}/log/${TOXENV}-*.log
script: make test-ci

notifications:
email: false
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
deploy:
provider: pypi
user: olemis
distributions: sdist bdist_wheel
password:
secure: oWPiupPzGPN4jIn8cPAus5XuQ5/sSwLs3mewMoDpnBt/N7rhvJU2QcWbKcWffKAimcOK+BEjGiqFRR2zi8J6HWa7dgumovyVX9Ojp+y8yPWeTkQ2tHLa4vlf/DaMtGTxSVqIWlpr2RANJ/aFmc7gLthnl7PiuC+EZ5mqRTRgirQkXDk+3I1BevQtvjXlYQMTSu9UaabxjX9RCHgB3uDSYTKwQhmv4ye5X501RkgB+dziq3okGbBtmGDD7I195sc0veeq7lgcCJnTC0CL9HUZKPj8i7j4zfk14ID/cv+XC3A4zZCoD5BnR3+c0PoG1vs/cLWqCgJb3GnbadEN9cDLXLLSCqCRkbOav4SpMIskOTfEjgCVkLocDaJLen3MEmj/4hyc8ayUjSulKuLgndWYTCYvQ0mXWHDHgTlsNw4zR8x+ETJPBMp69wGhHqgLivWdjdkfgMCgn5cUR47l1OD0TIWWvHMvqoXY2rL9OVT+iXdiqBvt6hQvqZQBs0BT+3DiiqTlCxi0czzhDklp/WkwA9WDo05A3SQ9CB1XjbZhcw0ulYxeOV8jC8JeWIXPH6F0ahzJqTjWXcze+AR21lbJkVgythJplRjvIPZGQRPaodNZ/jqOHARAFI5hm2Hme21K2U7UvdmsSjLSNgPN4ElzNjdIPuqCGJ5meIZYrWLmdcY=
on:
tags: true
repo: skycoin/pyskycoin
condition: "$TOXENV = py37"
47 changes: 44 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,64 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## PySkycoin 0.25.0 - 2019/01/01

### Added

- Feature compatible with Skycoin `v0.25.0`
- Add `make build` target to build PySkycoin C extension module
- Add `make help`
- Add Python-specific SWIG interface files
- Add versions of Python3.4, 3.5 and 3.6 in skycoindev-cli:py3 image.
- Add `skycoin/skycoindev-python:develop` Docker image including Python `3.4`, `3.5`, `3.6`, and `3.7`

### Fixed

- Fix #73 - Wrong number or type of arguments for overloaded function `SKY_cipher_GenerateDeterministicKeyPairs`

### Changed

### Removed
- Generate error codes from SWIG interfaces
- Define PySkycoin __version__ in a single place

## PySkycoin 0.24.6 - 2018/08/06

### Added

- Feature compatible with Skycoin `v0.24.1`
- PySkycoin usage explained in README.md
- Error code constants
- Implement functions receiving pointer to functions or GoSlices of type different than byte

### Fixed

- Fix #54 - Fix pip installation issue

## PySkycoin 0.24.1 - 2018/07/23

### Added

- Install from source with `make install`
- Implement `libskycoin` handles in Pyskycoin using SWIG typemaps
- Add comparison methods for cipher structure
- Treat as lists the functions parameters being go slices of type other than byte

### Fixed

- Fix #28 - Fix libskycoin C build using `make build-libc-static`
- Fix #30 - Fix random error in `SKY_cipher_GenerateDeterministicKeyPairs`
- Fix #38 - Pyskycoin compilation should reflect changes in skycoin header file

## PySkycoin 0.24 - 2018/06/23

### Added

- Feature compatible with Skycoin `v0.24.0`
- Initial source code base with generated C code for Skycoin Python extension module
- Feature compatible with Skycoin `v0.24.1`

### Known issues

Expand Down
19 changes: 0 additions & 19 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
Copyright (c) 2016 The Python Packaging Authority (PyPA)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ A Python extension generated with SWIG to access Skycoin API from Python.
- [Memory Managemanet](#memory-management)
- [Make rules](#make-rules)
- [Development setup](#development-setup)
- [Running tests](#running-tests)
- [Releases](#releases)
- [Update the version](#update-the-version)
- [Pre-release testing](#pre-release-testing)
- [Creating release builds](#creating-release-builds)
<!-- /MarkdownTOC -->

## Installation
Expand Down Expand Up @@ -180,3 +185,70 @@ the available Docker images.
Read the [PySkycoin Docker docs](docker/images/dev-cli/README.md) for further
details.

The project has two branches: `master` and `develop`.

- `develop` is the default branch and will always have the latest code.
The submodule at `gopath/src/github.com/skycoin/skycoin` has to be
in sync with `skycoin/skycoin` `develop` branch.
- `master` will always be equal to the current stable release on the website, and should correspond with the latest release tag.
The submodule at `gopath/src/github.com/skycoin/skycoin` has to be
in sync with `skycoin/skycoin` `master` branch.

Separate stable development branches will be created to work on releases for supporting the
most recent stable version of Skycoin. The name of these branches should be the Skycoin
imajor and minor version numbers followed by `dev` suffix e.g. `0.25dev`.
These branches may be forked out of either `master` or `develop` branches, and
the submodule at `gopath/src/github.com/skycoin/skycoin` has to be
in sync with the corresponding tag of `skycoin/skycoin` official repository.

Stable development branches are created most of the time for the following reasons:

- A Skycoin release increasing [patch version number](https://semver.org/).
- Enhanced support and bug fixes for a version of PySkycoin compiled against an
stable version of Skycoin
- Backporting useful features added in `develop`.

### Running tests

```sh
$ make test
```

### Releases

#### Update the version

0. If the `master` branch has commits that are not in `develop` (e.g. due to a hotfix applied to `master`), merge `master` into `develop` (and fix any build or test failures)
0. Switch to a new release branch named `release-X.Y.Z` for preparing the release.
0. Ensure that the submodule at `gopath/src/github.com/skycoin/skycoin` is in sync with respect to the corresponding tag in https://github.com/skycoin/skycoin repository.
0. Update `__version__` in `skycoin/__init__.py`
0. Run `make build` to make sure that the code base is up to date
0. Update `CHANGELOG.md`: move the "unreleased" changes to the version and add the date.
0. Update files in https://github.com/skycoin/repo-info/tree/master/repos/skycoin/remote for `skycoin/skycoin-python` Docker image, adding a new file for the new version and adjusting any configuration text that may have changed
0. Follow the steps in [pre-release testing](#pre-release-testing)
0. Make a PR merging the release branch into `master`
0. Review the PR and merge it
0. Tag the `master` branch with the version number. Version tags start with `v`, e.g. `v0.20.0`. Sign the tag. If you have your GPG key in github, creating a release on the Github website will automatically tag the release. It can be tagged from the command line with `git tag -as v0.20.0 $COMMIT_ID`, but Github will not recognize it as a "release".
0. Release builds are created and uploaded by travis. To do it manually, checkout the master branch and follow the [create release builds instructions](#creating-release-builds).
0. Checkout `develop` branch and bump `__version__` to next [`dev` version number](https://www.python.org/dev/peps/pep-0440/#developmental-releases).

#### Pre-release testing

Perform these actions before releasing:

```sh
make check
make integration-test
```

#### Creating release builds

Release builds should be created from `master` branch . After [updating release version](#update-the-version) it is necessary to follow these steps

```sh
cd /path/to/pyskycoin
python3 setup.py sdist bdist_wheel
python3 -m pip install --user --upgrade twine
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

0 comments on commit 30e2d65

Please sign in to comment.