Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Oct 4, 2018
1 parent dbb323f commit 7fe0e95
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 38 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install: all
$(PYTHON) setup.py install

dist: FORCE
rm -rf dist/ build sourmash.egg-info
$(PYTHON) setup.py sdist

test: all
Expand Down
66 changes: 28 additions & 38 deletions doc/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Michael Crusoe.
Remember to update release numbers/RC in:

* this document
* setup.py
* sourmash/VERSION

## Testing a release

Expand All @@ -27,7 +27,7 @@ cd sourmash
and then tag the release candidate with the new version number prefixed by
the letter 'v':
```
git tag v${new_version}-${rc}
git tag -a v${new_version}-${rc}
git push --tags git@github.com:dib-lab/sourmash.git
```
3\. Test the release candidate. Bonus: repeat on Mac OS X:
Expand All @@ -45,70 +45,59 @@ cd sourmash
cd sourmash
pip install -r requirements.txt
make test
pip uninstall -y sourmash; pip uninstall -y sourmash; make install
mkdir ../not-sourmash # if there is a subdir named 'sourmash' py.test will execute tests
# there instead of the installed sourmash module's tests
pushd ../not-sourmash; py.test --pyargs sourmash; popd
# Secondly we test via pip
cd ../../testenv2
deactivate
source bin/activate
pip install -U setuptools==3.4.1
pip install -U setuptools
pip install -e git+https://github.com/dib-lab/sourmash.git@v${new_version}-${rc}#egg=sourmash[test]
cd src/sourmash
make test
make dist
cp dist/sourmash*tar.gz ../../../testenv3/
pip uninstall -y sourmash; pip uninstall -y sourmash; make install
cd ../.. # no subdir named sourmash here, safe for testing installed sourmash module
py.test --pyargs sourmash
# Is the distribution in testenv2 complete enough to build another
# functional distribution?
cd ../testenv3/
deactivate
source bin/activate
pip install -U setuptools==3.4.1
pip install -U setuptools
pip install sourmash*tar.gz
pip install pytest
tar xzf sourmash*tar.gz
cd sourmash*
pip install -r requirements.txt
make dist
make test
pip uninstall -y sourmash; pip uninstall -y sourmash; make install
mkdir ../not-sourmash
pushd ../not-sourmash ; py.test --pyargs sourmash ; popd
```
4\. Publish the new release on the testing PyPI server. You will need
to change your PyPI credentials as documented here:
https://wiki.python.org/moin/TestPyPI. You may need to re-register:
```
python setup.py register --repository test
```
Now, upload the new release:
https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
We will be using `twine` to upload the package to TestPyPI and verify
everything works before sending it to PyPI:
```
python setup.py sdist upload -r test
pip install twine
twine upload --repository-url https://test.pypi.org/legacy/ sourmash*.tar.gz
```
Test the PyPI release in a new virtualenv:
```
cd ../../testenv4
deactivate
source bin/activate
pip install -U setuptools==3.4.1
pip install -U setuptools
# install as much as possible from non-test server!
pip install screed pytest numpy matplotlib scipy
pip install -i https://testpypi.python.org/pypi --pre --no-clean sourmash
py.test --pyargs sourmash
pip install screed pytest numpy matplotlib scipy khmer ijson
pip install -i https://test.pypi.org/simple --pre sourmash
```
5\. Do any final testing:

* check that the binder demo notebook is up to date

## How to make a final release


When you've got a thoroughly tested release candidate, cut a release like
so:

Expand All @@ -117,7 +106,8 @@ so:
```
cd ../sourmash
git tag v${new_version}
python setup.py register sdist upload
make dist
twine upload dist/*.tar.gz
```
2\. Delete the release candidate tag and push the tag updates to GitHub:
```
Expand All @@ -128,21 +118,21 @@ so:
3\. Add the release on GitHub, using the tag you just pushed. Name
it 'version X.Y.Z', and copy and paste in the release notes:

4\. Make a binary wheel on OS X:
```
virtualenv build
cd build
source bin/activate
pip install -U setuptools==3.4.1 wheel
pip install --no-clean sourmash==${new_version}
cd ../
python ./setup.py bdist_wheel upload
```
## Bioconda

Open a new PR in Bioconda. This is the file that needs to be changed:
https://github.com/bioconda/bioconda-recipes/blob/master/recipes/sourmash/meta.yaml

Usually you need to change the `version` variable in the first line
and the `sha256` under the `source` section.

This is an example PR (for `2.0.0a10`): https://github.com/bioconda/bioconda-recipes/pull/11197

## To test on a blank Ubuntu system


```
apt-cache update && apt-get -y install python-dev libfreetype6-dev && \
pip install sourmash[test] && py.test --pyargs sourmash
pip install sourmash[test]
```

0 comments on commit 7fe0e95

Please sign in to comment.