Skip to content

Commit

Permalink
Merge bf80cb0 into e7ac20d
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Nov 6, 2018
2 parents e7ac20d + bf80cb0 commit e72e8c1
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 79 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ __pycache__
.pyre
docs/_build/
.vscode/
dist/
build/
*.egg-info/
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Start with ubuntu:18.04 plus some apt packages
FROM ubuntu:18.04
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y python3 python3-pip python3-setuptools tzdata wget zip git-core
COPY requirements.txt /miniwdl/requirements.txt
RUN pip3 install --user -r /miniwdl/requirements.txt
# pip install the requirements files for run & dev
COPY requirements.txt requirements.dev.txt /miniwdl/
RUN bash -o pipefail -c "pip3 install --user -r <(cat /miniwdl/requirements.txt /miniwdl/requirements.dev.txt)"
# Copy in the local source tree / build context. We've delayed this until after
# requirements so that docker build doesn't reinstall the pip packages on every
# minor source change.
ADD . /miniwdl
WORKDIR /miniwdl
# Run the default make rule, which will trigger typechecking and tests.
ENV PYTHONPATH $PYTHONPATH:/root/.local/lib/python3.6
ENV PATH $PATH:/root/.local/bin
RUN make && make doc
Expand Down
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
test: check
SHELL := /bin/bash

test: typecheck
coverage run --include "WDL/*" -m unittest -v
coverage report

check:
typecheck:
pyre \
--search-path $(HOME)/.local/lib/python3.6/site-packages/lark \
--typeshed $(HOME)/.local/lib/pyre_check/typeshed \
Expand All @@ -11,9 +13,20 @@ check:
docker:
docker build -t miniwdl .

pypi_test: bdist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

pypi: bdist
echo -e "\033[0;31;5m -- Not a test: pushing $$(basename `ls -1 dist/*.tar.gz` .tar.gz) to PyPI! -- \033[0m"
twine upload dist/*

bdist:
rm -rf dist/
python3 setup.py sdist bdist_wheel

doc:
$(MAKE) -C docs html

docs: doc

.PHONY: check test docker doc docs
.PHONY: typecheck test docker doc docs pypi_test pypi bdist
17 changes: 0 additions & 17 deletions examples/analyze_HCAskylab_tasks.py

This file was deleted.

51 changes: 0 additions & 51 deletions examples/analyze_tasks.py

This file was deleted.

11 changes: 11 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Packages needed for miniwdl development, in addition to those in
# requirements.txt which are needed for miniwdl to run in common use.
pyre-check==0.0.16
sphinx
sphinx-autobuild
coverage
python-coveralls
wheel
setuptools
pbr
twine
8 changes: 2 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
wheel
pyre-check==0.0.16
coverage
sphinx
sphinx-autobuild
# Packages needed for miniwdl to run in common use. Additional packages needed
# for miniwdl development are listed in requirements.dev.txt.
lark-parser==0.6.4
python-coveralls
28 changes: 28 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[metadata]
name = miniwdl
description = Workflow Description Language (WDL) static analysis toolkit
description-file = README.md
description-content-type = text/markdown; charset=UTF-8
author = CZI
#author-email = john.doe@example.com
license = MIT
home-page = https://github.com/chanzuckerberg/miniwdl
classifier =
Programming Language :: Python :: 3 :: Only
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Development Status :: 2 - Pre-Alpha
Topic :: Scientific/Engineering :: Bio-Informatics
Topic :: Software Development :: Interpreters

[files]
packages =
WDL

[entry_points]
console_scripts =
miniwdl = WDL.CLI:main

[pbr]
skip_authors = True
skip_changelog = True
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import setuptools

setuptools.setup(
setup_requires=['pbr'],
pbr=True,
python_requires=">3.6.0",
)

0 comments on commit e72e8c1

Please sign in to comment.