Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
posita committed Mar 14, 2017
1 parent 4c5258b commit 88f2855
Show file tree
Hide file tree
Showing 22 changed files with 72 additions and 69 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Expand Up @@ -16,11 +16,11 @@
/.tox/
/build/
/dist/
/doc/_build/
/doc/_static/
/doc/modules.rst
/doc/dimgx.rst
/doc/dimgx.*.rst
/docs/_build/
/docs/_static/
/docs/modules.rst
/docs/dimgx.rst
/docs/dimgx.*.rst
/htmlcov/
__pycache__/
_trial_temp
Expand Down
11 changes: 11 additions & 0 deletions .pylintrc
@@ -1,3 +1,14 @@
# -*- encoding: utf-8; mode: ini -*-

# ========================================================================
# Copyright and other protections apply. Please see the accompanying
# ``LICENSE`` and ``CREDITS`` files for rights and restrictions governing
# use of this software. All rights not expressly waived or licensed are
# reserved. If those files are missing or appear to be modified from their
# originals, then please contact the author before viewing or using this
# software in any capacity.
# ========================================================================

[MESSAGES CONTROL]
disable=C,R,fixme,locally-disabled,missing-super-argument,no-init,no-member
enable=useless-suppression
Expand Down
7 changes: 4 additions & 3 deletions .travis.yml
Expand Up @@ -9,16 +9,17 @@
# software in any capacity.
# ========================================================================

sudo: false
language: python

python:
- "2.7"
- pypy
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- pypy3
- "pypy"
- "pypy3"

install:
- pip install coveralls tox-travis
Expand All @@ -29,7 +30,7 @@ matrix:
- python: "3.6"

# PyPy3 is experimental
- python: pypy3
- python: "pypy3"

script:
- tox
Expand Down
5 changes: 3 additions & 2 deletions CREDITS
@@ -1,6 +1,9 @@
``CREDITS``
===========

Contributors
------------

The following individuals or entities have contributed to this software.

By adding your name to this list, you grant a nonexclusive, perpetual
Expand All @@ -13,7 +16,5 @@ by a third party for this software's owner's otherwise lawful use of your
contribution, whether or not such use was contemplated by you at the time
you made it.

Contributors:

.. Entry format:
.. * `NAME <CONTACT_URL>`__ (see `REPO_URL <REPO_URL>`__)
11 changes: 0 additions & 11 deletions MANIFEST.in
Expand Up @@ -12,17 +12,6 @@
include \
CREDITS \
LICENSE \
doc/CREDITS.rst \
doc/LICENSE.rst \
doc/Makefile \
doc/cli.rst \
doc/conf.py \
doc/contrib.rst \
doc/index.rst \
doc/intro.rst \
doc/py.rst \
doc/release_checklist.md \
doc/requirements.txt \
test/requirements.txt

graft test/data
6 changes: 3 additions & 3 deletions dimgx.py
Expand Up @@ -503,15 +503,15 @@ def _is_broken():

_LOGGER.debug('patching broken %s from %s, %s', tarfile.TarFile.next, tarfile.__file__, sys_version)

def _wrap_next(_f):
def _wrap_next(f):
from functools import wraps

@wraps(_f)
@wraps(f)
def __patched_next(self, *args, **kw):
if self.offset < self.fileobj.tell():
self.fileobj.seek(self.offset)

return _f(self, *args, **kw)
return f(self, *args, **kw)

return __patched_next

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 8 additions & 6 deletions doc/contrib.rst → docs/contrib.rst
Expand Up @@ -36,11 +36,13 @@ Submission Guidelines
If you're willing and able, consider `submitting a pull request <https://github.com/posita/dimgx/pulls>`__ (PR) with a fix.
There are only a few guidelines:

* If it isn't already there, please add your name (and optionally your GitHub username, email, website address, or other contact information) to the ``CREDITS`` file::
* If it isn't already there, please add your name (and optionally your GitHub username, email, website address, or other contact information) to the ``CREDITS`` file:

...
* Gordon the Turtle <https://github.com/GordonTheTurtle>
...
.. code-block:: rst
...
* `Gordon the Turtle <https://github.com/GordonTheTurtle>`_
...
* Try to follow the source conventions as you observe them.
(Note: I have purposely avoided aspects of `PEP8 <https://www.python.org/dev/peps/pep-0008/>`_, in part because I have adopted conventions developed from my experiences with other languages, but mostly because I'm growing older and more stubborn.)
Expand All @@ -50,9 +52,9 @@ There are only a few guidelines:
* Provide unit tests where feasible and appropriate.
At the very least, existing tests should not fail.
(There are exceptions, but if there is any doubt, they probably don't apply.)
Tests can be run with ``./runtests.sh`` (requires `tox <https://tox.readthedocs.org/en/latest/>`__) or ``python setup.py test``.

..
Unit tests live in ``./test``.
Tests can be run with ``./helpers/runtests.sh`` (requires `tox <https://tox.readthedocs.org/en/latest/>`__) or ``python setup.py test``.

* If you need me, mention me (|@posita|_) in your comment, and describe specifically how I can help.

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions doc/intro.rst → docs/intro.rst
Expand Up @@ -26,6 +26,7 @@ License
-------

``dimgx`` is licensed under the `MIT License <http://opensource.org/licenses/MIT>`_.
See the :doc:`LICENSE <LICENSE>` file for details.
Source code is `available on GitHub <https://github.com/posita/dimgx>`__.

Installation
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions doc/release_checklist.md → docs/release_checklist.md
Expand Up @@ -11,9 +11,9 @@ Please see the accompanying [`LICENSE`](../LICENSE) and [`CREDITS`](../CREDITS)
All rights not expressly waived or licensed are reserved.
If those files are missing or appear to be modified from their originals, then please contact the author before viewing or using this software in any capacity.

- [ ] If necessary, update copyright in [`LICENSE`](../LICENSE) and [`doc/conf.py`](../doc/conf.py)
- [ ] If necessary, update copyright in [`LICENSE`](../LICENSE) and [`docs/conf.py`](../docs/conf.py)

- [ ] [`./release.sh`](../release.sh)
- [ ] [`./helpers/release.sh`](../helpers/release.sh)

- [ ] `git push --tags`

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions release.sh → helpers/release.sh
@@ -1,14 +1,14 @@
#!/usr/bin/env sh
#-*- encoding: utf-8; mode: sh; grammar-ext: sh -*-
# -*- encoding: utf-8; grammar-ext: sh; mode: shell-script -*-

#=========================================================================
# ========================================================================
# Copyright and other protections apply. Please see the accompanying
# ``LICENSE`` and ``CREDITS`` files for rights and restrictions governing
# use of this software. All rights not expressly waived or licensed are
# reserved. If those files are missing or appear to be modified from their
# originals, then please contact the author before viewing or using this
# software in any capacity.
#=========================================================================
# ========================================================================

if [ "${#}" -ne 3 ] ; then
echo 1>&2 "usage: $( basename "${0}" ) MAJOR MINOR PATCH"
Expand Down
6 changes: 3 additions & 3 deletions runtests.sh → helpers/runtests.sh
@@ -1,14 +1,14 @@
#!/usr/bin/env sh
#-*- encoding: utf-8; mode: sh; grammar-ext: sh -*-
# -*- encoding: utf-8; grammar-ext: sh; mode: shell-script -*-

#=========================================================================
# ========================================================================
# Copyright and other protections apply. Please see the accompanying
# ``LICENSE`` and ``CREDITS`` files for rights and restrictions governing
# use of this software. All rights not expressly waived or licensed are
# reserved. If those files are missing or appear to be modified from their
# originals, then please contact the author before viewing or using this
# software in any capacity.
#=========================================================================
# ========================================================================

_MY_DIR="$( cd "$( dirname "${0}" )" && pwd )"
set -ex
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
@@ -1,3 +1,5 @@
# -*- encoding: utf-8; mode: ini -*-

# ========================================================================
# Copyright and other protections apply. Please see the accompanying
# ``LICENSE`` and ``CREDITS`` files for rights and restrictions governing
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Expand Up @@ -50,11 +50,15 @@
'python-dateutil',
)

TESTS_REQUIRE = [
'pytest',
]

# WARNING: This imposes limitations on test/requirements.txt such that the
# full Pip syntax is not supported. See also
# <http://stackoverflow.com/questions/14399534/>.
with open(ospath_join(_MY_DIR, 'test', 'requirements.txt')) as f:
TESTS_REQUIRE = f.read().splitlines()
TESTS_REQUIRE.extend(f.read().splitlines())

# ---- Initialization ----------------------------------------------------

Expand Down Expand Up @@ -94,6 +98,8 @@
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: System :: Archiving :: Packaging',
Expand Down
1 change: 0 additions & 1 deletion test/requirements.txt
@@ -1 +0,0 @@
pytest
49 changes: 20 additions & 29 deletions tox.ini
Expand Up @@ -11,32 +11,36 @@

[tox] # -----------------------------------------------------------------

envlist = reset,py{27,33,34,35,36,py,py3},lint,check
envlist = py{27,33,34,35,36,py,py3}, lint, check
skip_missing_interpreters = true

[tox:travis] # ----------------------------------------------------------
[travis] # --------------------------------------------------------------

# "check" permanently broken for 3.3. TODO: Add back "check" to py27 and
# py34 after Travis updates Python
2.7 = py27, lint
# "check" permanently broken for 3.3
2.7 = py27, lint, check
3.3 = py33, lint
3.4 = py34, lint
3.4 = py34, lint, check
3.5 = py35, lint, check
3.6 = py36, lint, check
pypy = pypy, lint, check
pypy3 = pypy3, lint, check

[testenv] # -------------------------------------------------------------

commands =
coverage run --append -m py.test {posargs}

deps =
py36: pytest >= 2.0
coverage
pytest
# This probably breaks on Windows. See
# <https://github.com/tox-dev/tox/issues/384>.
-rtest/requirements.txt

passenv = COVERAGE_PROCESS_START LOG_FMT LOG_LVL
passenv =
COVERAGE_PROCESS_START
LOG_FMT
LOG_LVL

setenv =
PYTHONWARNINGS = all
Expand All @@ -47,18 +51,21 @@ basepython = {env:PYTHON:python}

commands =
python setup.py check -m -r -s -v
rm -frv doc/modules.rst doc/dimgx.rst doc/_dimgx.*.rst
sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
rm -frv docs/modules.rst docs/dimgx.rst docs/_dimgx.*.rst
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html

deps =
docutils
# TODO: Unpin this after Travis updates Python
docutils <= 0.12.0
sphinx
-rdoc/requirements.txt
# This probably breaks on Windows. See
# <https://github.com/tox-dev/tox/issues/384>.
-rdocs/requirements.txt

setenv =
PYTHONWARNINGS =

usedevelop = true
skip_install = true

whitelist_externals =
rm
Expand All @@ -83,22 +90,6 @@ setenv =

usedevelop = true

[testenv:reset] # -------------------------------------------------------

basepython = {env:PYTHON:python}

commands =
coverage erase
rm -frv doc/modules.rst doc/dimgx.rst doc/_dimgx.*.rst

deps =
coverage

skip_install = true

whitelist_externals =
rm

[flake8] # --------------------------------------------------------------

ignore = E201,E202,E302,E305,E501
Expand Down

0 comments on commit 88f2855

Please sign in to comment.