-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 make sure version is available in wheels distribution (#10)
* 🐛 change steup.json file location * 🔧 manage 1 file for version inside module * 🎨 clean up a bit * 🎨 clean up setup.cfg * 👕 remove unused statements in MANIFEST.in * 🔧 remove unused imports in __init__.py * 🔧 remove unused imports in __init__.py * 🐛 pydocstyle was checking the wrong directory * 🐛 use absolute paths in setup.py * 🐛 use absolute paths in __init__.py * 🔧 simplify tox.ini * 👕 clean up tox.ini
- Loading branch information
1 parent
66c5d16
commit 278ad08
Showing
10 changed files
with
37 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
language: python | ||
|
||
sudo: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,5 @@ | ||
graft tests | ||
graft docker | ||
|
||
include CONTRIBUTING.md | ||
include LICENSE | ||
include README.md | ||
|
||
include .coveragerc | ||
include .pylintrc | ||
|
||
include pytest.ini | ||
include setup.json | ||
include tox.ini | ||
include Makefile | ||
|
||
global-exclude *.dylib | ||
global-exclude *.py[cod] | ||
global-exclude *.so | ||
global-exclude __pycache__ | ||
|
||
recursive-include toil_container * | ||
recursive-include setup.json Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
[bumpversion] | ||
current_version = 0.1.0 | ||
commit = True | ||
tag = True | ||
|
||
[bumpversion:file:setup.py] | ||
search = version='{current_version}' | ||
replace = version='{new_version}' | ||
|
||
[bumpversion:file:toil_container/__init__.py] | ||
search = __version__ = '{current_version}' | ||
replace = __version__ = '{new_version}' | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[flake8] | ||
exclude = docs | ||
[metadata] | ||
license_file = LICENSE | ||
|
||
[aliases] | ||
test = pytest | ||
# Define setup.py command aliases here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""toil_container setup.py.""" | ||
|
||
from os.path import join | ||
from os.path import abspath | ||
from os.path import dirname | ||
from os.path import join | ||
import io | ||
import json | ||
|
||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
ROOT = abspath(dirname(__file__)) | ||
CONF = join(ROOT, "setup.json") | ||
|
||
|
||
def read(path, **kwargs): | ||
"""Return content of a file.""" | ||
return io.open(path, encoding=kwargs.get("encoding", "utf8")).read() | ||
|
||
# make sure we use absolute paths | ||
ROOT = abspath(dirname(__file__)) | ||
|
||
# Please put setup keywords in the setup.json to keep this file clean. | ||
with open(CONF, "r") as f: | ||
# please put setup keywords in the setup.json to keep this file clean | ||
with open(join(ROOT, "setup.json"), "r") as f: | ||
SETUP = json.load(f) | ||
|
||
setup( | ||
# Load description from README. | ||
# load description from README | ||
long_description=read(join(ROOT, "README.md")), | ||
|
||
# In combination with MANIFEST.in, package non-python files included | ||
# in combination with MANIFEST.in, non-python files included | ||
# inside the toil_container will be copied to the | ||
# site-packages installation directory. | ||
# site-packages and wheels installation directory | ||
include_package_data=True, | ||
|
||
# Return a list all Python packages found within the ROOT directory. | ||
# return a list all Python packages found within the ROOT directory | ||
packages=find_packages(), | ||
|
||
# Pass parameters loaded from setup.json including author and version. | ||
# The version is only defined in one place | ||
version=read(join(ROOT, "toil_container", "VERSION")).strip(), | ||
|
||
# pass parameters loaded from setup.json including author and version | ||
**SETUP | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
"""toil_container module.""" | ||
|
||
from os.path import join | ||
from os.path import abspath | ||
from os.path import dirname | ||
import json | ||
from os.path import join | ||
|
||
from toil_container.jobs import ( | ||
ContainerCallJob | ||
) | ||
|
||
from toil_container.jobs import ContainerCallJob | ||
from toil_container.parsers import ( | ||
ContainerArgumentParser, | ||
ContainerShortArgumentParser, | ||
ToilShortArgumentParser | ||
) | ||
|
||
with open(join("setup.json"), "r") as f: | ||
SETUP = json.load(f) | ||
# make sure we use absolute paths | ||
ROOT = abspath(dirname(__file__)) | ||
|
||
__version__ = SETUP.get("version") | ||
with open(join(ROOT, "VERSION"), "r") as f: | ||
VERSION = f.read().strip() | ||
|
||
__author__ = SETUP.get("author") | ||
__version__ = VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,17 @@ | ||
[tox] | ||
envlist = py27, lint | ||
envlist = py27 | ||
|
||
|
||
[travis] | ||
python = | ||
2.7: py27 | ||
python = 2.7: py27 | ||
|
||
|
||
[testenv] | ||
usedevelop=false | ||
passenv=* | ||
deps=-r{toxinidir}/requirements.txt | ||
basepython={lint,py27,report,clean}: {env:TOXPYTHON27:python2.7} | ||
commands= | ||
pip install -U pip | ||
usedevelop = True | ||
passenv = * | ||
deps = -r./requirements.txt | ||
basepython = {py27}: {env:TOXPYTHON27:python2.7} | ||
commands = | ||
py.test {env:TOX_PYTEST_ARGS:-s --cov=toil_container --cov-report=term-missing -vv tests} | ||
|
||
|
||
[testenv:lint] | ||
skip_install=True | ||
commands= | ||
pylint toil_container --rcfile={toxinidir}/.pylintrc | ||
pydocstyle --config={toxinidir}/.pydocstylerc click_pileup | ||
|
||
|
||
[testenv:report] | ||
skip_install=True | ||
commands= | ||
coverage erase | ||
{[testenv]commands} | ||
coverage combine --append | ||
coverage report | ||
coverage html | ||
|
||
|
||
[testenv:clean] | ||
skip_install=true | ||
commands=coverage erase | ||
|
||
|
||
|
||
|
||
pydocstyle toil_container --config={toxinidir}/.pydocstylerc |