Skip to content

Commit

Permalink
Add Makefile to enable "quickstart" workflow
Browse files Browse the repository at this point in the history
Nothing too complex, but it's nice to be able to show up in a new
project, `make test` and have it "just work".
Documented in the readme.

Gets rid of test.sh . Since `make test` is a superior replacement,
there's no reason to keep it.
  • Loading branch information
sirosen authored and katrinabrock committed Nov 11, 2017
1 parent dcdd581 commit e12b892
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 48 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# control the py version used to install tox
# use like
# NOSE2_PYTHON_VERSION=python3.6 make docs
NOSE2_PYTHON_VERSION?=python
VIRTUALENV=.venv-$(NOSE2_PYTHON_VERSION)

.PHONY: help docs test clean

help:
@echo 'Easy setup for local nose2 development'
@echo 'make help Show this help'
@echo 'make docs Build docs'
@echo 'make test Test nose2'
@echo 'make clean Cleanup'

$(VIRTUALENV)/bin/tox:
virtualenv --python "$(NOSE2_PYTHON_VERSION)" $(VIRTUALENV)
$(VIRTUALENV)/bin/pip install tox==2.9.1

test: $(VIRTUALENV)/bin/tox
$(VIRTUALENV)/bin/tox
docs: $(VIRTUALENV)/bin/tox
$(VIRTUALENV)/bin/tox -e docs

clean:
$(MAKE) -C docs/ clean
rm -rf .venv-*
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,15 @@ plugins branch, and overrides various unittest2 objects.
You are witnesses at the new birth of nose, mark 2. Hope you enjoy our
new direction!

Workflow
--------

If you want to make contributions, you can use the ``Makefile`` to get started
quickly and easily::

# no prior setup necessary!
make test

Use ``make help`` to see other options.

.. _differences: https://nose2.readthedocs.io/en/latest/differences.html
48 changes: 0 additions & 48 deletions test.sh

This file was deleted.

0 comments on commit e12b892

Please sign in to comment.