Skip to content

Commit

Permalink
Merge pull request #61 from apriha/develop
Browse files Browse the repository at this point in the history
v1.1.1
  • Loading branch information
apriha authored Apr 29, 2019
2 parents 8f9397c + 8d3f881 commit 13106a6
Show file tree
Hide file tree
Showing 24 changed files with 1,726 additions and 1,551 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lineage/_version.py export-subst
src/lineage/_version.py export-subst
95 changes: 61 additions & 34 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,81 @@
# https://github.com/sympy/sympy/blob/master/.travis.yml
# https://github.com/twisted/klein/blob/master/.travis.yml
# https://github.com/codecov/example-python
# https://docs.travis-ci.com
# https://stackoverflow.com/a/3237883
# https://stackoverflow.com/a/5688592

language: python

sudo: false

matrix:
include:
- python: 3.5
- python: 3.6
env:
DEPLOY="true"
- python: 3.7
dist: xenial
sudo: true

before_install:
- pip install --upgrade pip setuptools wheel
- pip install pytest-cov codecov
- pip install pytest-cov codecov awscli

install:
- pip install .

script:
# For testing, we want to limit downloads from the resource servers, and we
# achieve this by the following:
# 1) assign each job an ID
# 2) select (identify) one of the jobs based on week of the year
# 3) limit downloading of resources to selected job on master branch
# 4) use cached resources on Amazon S3 for all other jobs
# Note that the master branch is tested weekly via `cron`, so this ensures
# all Python versions will be periodically integration tested with the
# resource servers.
- set -e
- NUM_JOBS=3
- SELECTED_JOB=$(($(date +%V) % $NUM_JOBS))
- |
if [ -z ${DEPLOY+x} ]; then # https://stackoverflow.com/a/13864829/4727627
curl -sSf -o resources.tar.gz https://s3.amazonaws.com/lineage-public/resources.tar.gz
if [ -f resources.tar.gz ]; then
tar -xzf resources.tar.gz
rm resources.tar.gz
if [ $TRAVIS_BRANCH == "master" ]; then
if [ $SELECTED_JOB != $JOB_ID ]; then
aws s3 cp s3://lineage-resources/resources.tar.gz resources.tar.gz
fi
else
aws s3 cp s3://lineage-resources/resources.tar.gz resources.tar.gz
fi
- |
if [ -f resources.tar.gz ]; then
tar -xzf resources.tar.gz
rm resources.tar.gz
fi
- pytest --cov=lineage tests
- |
if [ $SELECTED_JOB == $JOB_ID ]; then
codecov
fi
after_success:
- codecov
stages:
- check formatting
- test
- name: deploy
if: branch = master

# automatically package and deploy to PyPI
# https://www.appneta.com/blog/pypi-deployment-with-travis-ci/
deploy:
# production PyPI
- provider: pypi
user: "apriha"
password:
secure: "ILDxck7IPSffABa4mWFANETAOJgazxXJRJBFoMQ+0TKxsrTKVA6VDtrUBEAgxAdm2Zp9Lwh8vsOKodEToTrcm5J4JmnFsyz+pxBbPNpKE1RU4bn+X0qqd3D//iK6DoATxrQCS73MZA7GoMOEL7dvU2R8d2d8i6H3x4lDCIp3dcPRZm1+YYGo51bwv6MYJGcN9lQOtQlVgFYPp/9TSAiwK5sWjQk8Bfv7ASIJWGb0+oLW5AK468ANk1agof+pg56d041vWYDqTBuuaZs6gEYxJQSk0V0o896NoNoqenfIch39KeHnL4jTBUhftDk/NNT/wGfi8JasGC/ks+ESE7R8BwbWYb0QH9AhBQSraAjIr0IEyoOXYYl2FlghHWFC2/mBKZcmQXuL+Dx6tJxvAP914bB2sb+ZNNcBfuPkfzeOYoVosTly/O/MPoyuj2/Ohmw76hKzeGu2IE4UILQUsggaZvgVk/A+Vu8KmeOx15X+IgHn3ahJ3550K4d5vFTRlvY1EZQP5XY5Mx7OW55Orm71wZKOMIN4Y6COyZA7NCs0tCR5M7EjIk/j401Dm/O75hcYIY0J69eZiifSIXUNsJ+6QmOvhZJA8ZtYNlJ6nyGhBAF22a6wp7E2OQEY2WR2X1ZMRaP9SSr7X8wUbKHTt9JbEVFQwqTQzqdP+8Szj/Hh0nA="
distributions: "sdist bdist_wheel"
on:
branch: master
tags: true
condition: $DEPLOY = "true"
jobs:
include:
- stage: check formatting
python: 3.6
before_install:
- pip install black
script:
- black --check --diff .
- stage: test
python: 3.5
env: JOB_ID=0
- python: 3.6
env: JOB_ID=1
- python: 3.7
dist: xenial
env: JOB_ID=2
- stage: deploy
python: 3.6
script: skip
deploy:
- provider: pypi
user: "apriha"
password:
secure: "ILDxck7IPSffABa4mWFANETAOJgazxXJRJBFoMQ+0TKxsrTKVA6VDtrUBEAgxAdm2Zp9Lwh8vsOKodEToTrcm5J4JmnFsyz+pxBbPNpKE1RU4bn+X0qqd3D//iK6DoATxrQCS73MZA7GoMOEL7dvU2R8d2d8i6H3x4lDCIp3dcPRZm1+YYGo51bwv6MYJGcN9lQOtQlVgFYPp/9TSAiwK5sWjQk8Bfv7ASIJWGb0+oLW5AK468ANk1agof+pg56d041vWYDqTBuuaZs6gEYxJQSk0V0o896NoNoqenfIch39KeHnL4jTBUhftDk/NNT/wGfi8JasGC/ks+ESE7R8BwbWYb0QH9AhBQSraAjIr0IEyoOXYYl2FlghHWFC2/mBKZcmQXuL+Dx6tJxvAP914bB2sb+ZNNcBfuPkfzeOYoVosTly/O/MPoyuj2/Ohmw76hKzeGu2IE4UILQUsggaZvgVk/A+Vu8KmeOx15X+IgHn3ahJ3550K4d5vFTRlvY1EZQP5XY5Mx7OW55Orm71wZKOMIN4Y6COyZA7NCs0tCR5M7EjIk/j401Dm/O75hcYIY0J69eZiifSIXUNsJ+6QmOvhZJA8ZtYNlJ6nyGhBAF22a6wp7E2OQEY2WR2X1ZMRaP9SSr7X8wUbKHTt9JbEVFQwqTQzqdP+8Szj/Hh0nA="
distributions: "sdist bdist_wheel"
on:
branch: master
tags: true
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changelog
=========

The changelog is maintained here: https://github.com/apriha/lineage/releases
75 changes: 75 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

Bug reports
-----------

When `reporting a bug <https://github.com/apriha/lineage/issues>`_ please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Documentation improvements
--------------------------

``lineage`` could always use more documentation, whether as part of the official ``lineage``
docs, in docstrings, or even on the web in blog posts, articles, and such.

Feature requests and feedback
-----------------------------

The best way to send feedback is to file an issue at https://github.com/apriha/lineage/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that code contributions are welcome :)

Development
-----------

To set up ``lineage`` for local development:

1. Fork `lineage <https://github.com/apriha/lineage>`_
(look for the "Fork" button).
2. Clone your fork locally::

git clone git@github.com:your_name_here/lineage.git

3. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

4. Setup a development environment::

pip install pipenv
pipenv install --dev

5. When you're done making changes, run all the tests with::

pipenv run pytest --cov=lineage tests

6. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

Pull request guidelines
```````````````````````

If you need some code review or feedback while you're developing the code, just make the pull
request.

For merging, you should:

1. Ensure tests pass.
2. Update documentation when there's new API, functionality, etc.
3. Add yourself to ``CONTRIBUTORS.rst``.
31 changes: 31 additions & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. Layout based on https://github.com/pydanny/cookiecutter-django/blob/master/CONTRIBUTORS.rst
Contributors
============

`Contributors <https://github.com/apriha/lineage/graphs/contributors>`_ to
``lineage`` are listed below.

Core Developers
---------------

=========== ==========
Name GitHub
=========== ==========
Andrew Riha `@apriha`_
=========== ==========

.. _@apriha: https://github.com/apriha

Other Contributors
------------------

Listed in alphabetical order.

=============== =============
Name GitHub
=============== =============
Anatoli Babenia `@abitrolly`_
=============== =============

.. _@abitrolly: https://github.com/abitrolly
19 changes: 16 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
include *.txt *.rst
recursive-include lineage *.txt *.rst
graft docs
graft src
graft tests

include CHANGELOG.rst
include CONTRIBUTING.rst
include CONTRIBUTORS.rst
include LICENSE.txt
include LICENSES-3RD-PARTY.txt
include README.rst
include versioneer.py
include lineage/_version.py

exclude .git* .travis*

prune docs/images

global-exclude *.py[cod] __pycache__ *.so *.dylib
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pytest = "*"
pytest-cov = "*"

[packages]
lineage = {editable = true,path = "."}

[requires]
python_version = "3.7"
Loading

0 comments on commit 13106a6

Please sign in to comment.