Merge branch 'master' into post

This commit is contained in:
Glyph 2019-08-27 17:45:53 -07:00 committed by GitHub
commit b4b919057d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 27 deletions

View File

@ -8,15 +8,6 @@ env:
global:
- secure: LecqzHkkjNJ0GbLgvr/5YFy2U90JB1GAThqwr6WAab0c30z5w2EVJOubkASzREfMj6LKzUIdublskQC0x5kge46RVhsqVGZFIywR/7fUmqpaeaV3VvHBLk5vVLvFFYfbnRZQ9AtBEg6M7YAZwgAKRjE0mtJxKDP1Ksn5aV4wox4WZfeYKwPnjkHZQb/GrSdS93Uzi4Xe3TrtQ2m5lSMAaoeUFeKJbUEX6avqlfrsU1RZqvFTmDWhLiHSIvCVtG6DtrA2kGovC7qP6xVcjPcpx8D4aVpHzr7LqcCGaRQwLmO0aMe1YdegFQQeU7L7/c6m+UbVsobhxdjR8SWchdzAkmoE2QTdNTRTVbouvQL+uF8LvVKZoNBjUYxoeng0MqJLFfJUks8SnhN/wFujZmmlYv6Nm559GiR63i7hqCjbn2XFyE1mrvBPEpIMxpBc6kxN3GhCAyfHHRniyNbdD0e1eQ7JxQfzqqkQVMkdh2HRvpINIMZNM7247gsXEaGiJV/5ntGl138vuEXWjj8o0wdp0wBcqrHbEcPnjWBZIqexdevjiSpIJyMP0q4F2kv7eIfZLViLVfygRPQBpPcmETiNJtPJkXsxGFmTEtt/gdjT8dU/FvROTJRo3Iiz3rxHNsXJG8TGsZduLbBuzvGVadywLqD+Mb74CsizvdK0tdsP5Tg=
matrix:
- TOX_ENV=py27-flake8
- TOX_ENV=py27-tests
- TOX_ENV=py33-tests
- TOX_ENV=py34-tests
- TOX_ENV=apidocs
- TOX_ENV=check-manifest
- PUSH_DOCS=true
matrix:
fast_finish: true
include:
@ -24,6 +15,12 @@ matrix:
env: TOX_ENV=py35-tests
- python: 3.5
env: TOX_ENV=py35-flake8
- python: 2.7
env: TOX_ENV=py27-flake8
- python: 2.7
env: TOX_ENV=apidocs
- env: PUSH_DOCS=true
- env: TOX_ENV=check-manifest
script:
- if [[ -n "${TOX_ENV}" ]]; then tox -e $TOX_ENV; fi

View File

@ -10,7 +10,7 @@ if [[ ${TRAVIS_PULL_REQUEST} == "false" ]] && [[ ${TRAVIS_BRANCH} == "master" ]]
tox -e apidocs
# Make the directory
git clone --branch gh-pages https://github.com/hawkowl/incremental.git /tmp/tmp-docs
git clone --branch gh-pages https://github.com/twisted/incremental.git /tmp/tmp-docs
# Copy the docs
rsync -rt --del --exclude=".git" apidocs/* /tmp/tmp-docs/docs/
@ -31,8 +31,11 @@ if [[ ${TRAVIS_PULL_REQUEST} == "false" ]] && [[ ${TRAVIS_BRANCH} == "master" ]]
git commit -m "Built from ${REV}";
# Push it up
git push -q "https://${GH_TOKEN}@github.com/hawkowl/incremental.git" gh-pages
if [[ ${TRAVIS_REPO_SLUG} == "twisted/incremental" ]];
then
# Push it up
git push -q "https://${GH_TOKEN}@github.com/twisted/incremental.git" gh-pages
fi
else
echo "skipping docs upload"
fi;

View File

@ -7,7 +7,7 @@ Incremental
Incremental is a small library that versions your Python projects.
API documentation can be found `here <https://hawkowl.github.io/incremental/docs/>`_.
API documentation can be found `here <https://twisted.github.io/incremental/docs/>`_.
Quick Start
@ -25,7 +25,8 @@ Add this to your ``setup.py``\ 's ``setup()`` call, removing any other versionin
}
Then run ``python -m incremental.update <projectname> --create`` (you will need ``click`` installed from PyPI).
Install Incremental to your local environment with ``pip install incremental[scripts]``.
Then run ``python -m incremental.update <projectname> --create``.
It will create a file in your package named ``_version.py`` and look like this:
.. code::
@ -58,10 +59,7 @@ It is made up of the following elements (which are given during instantiation):
- ``post`` (optional), set to 0 or higher to mark this ``Version`` as a postrelease.
- ``dev`` (optional), set to 0 or higher to mark this ``Version`` as a development release.
You can extract a PEP-440 compatible version string by using the following methods:
- ``.local()``, which returns a ``str`` containing the full version plus any Git or SVN information, if available. An example output would be ``"17.1.1rc1+r123"`` or ``"3.7.0+rb2e812003b5d5fcf08efd1dffed6afa98d44ac8c"``.
- ``.public()``, which returns a ``str`` containing the full version, without any Git or SVN information. This is the version you should provide to users, or publicly use. An example output would be ``"13.2.0"``, ``"17.1.2dev1"``, or ``"18.8.0rc2"``.
You can extract a PEP-440 compatible version string by using the ``.public()`` method, which returns a ``str`` containing the full version. This is the version you should provide to users, or publicly use. An example output would be ``"13.2.0"``, ``"17.1.2dev1"``, or ``"18.8.0rc2"``.
Calling ``repr()`` with a ``Version`` will give a Python-source-code representation of it, and calling ``str()`` with a ``Version`` will provide a string similar to ``'[Incremental, version 16.10.1]'``.
@ -100,11 +98,11 @@ Once the final version is made, it will become:
- ``<projectname> 17.1.0``
.. |coverage| image:: https://codecov.io/github/hawkowl/incremental/coverage.svg?branch=master
.. _coverage: https://codecov.io/github/hawkowl/incremental
.. |coverage| image:: https://codecov.io/github/twisted/incremental/coverage.svg?branch=master
.. _coverage: https://codecov.io/github/twisted/incremental
.. |travis| image:: https://travis-ci.org/hawkowl/incremental.svg?branch=master
.. _travis: http://travis-ci.org/hawkowl/incremental
.. |travis| image:: https://travis-ci.org/twisted/incremental.svg?branch=master
.. _travis: https://travis-ci.org/twisted/incremental
.. |pypi| image:: http://img.shields.io/pypi/v/incremental.svg
.. _pypi: https://pypi.python.org/pypi/incremental

View File

@ -2,7 +2,8 @@
from __future__ import absolute_import, division, print_function
import os, sys
import os
import sys
from setuptools import setup, find_packages
@ -20,14 +21,12 @@ setup(
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/twisted/incremental",
classifiers = [
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",

View File

@ -9,6 +9,7 @@ from __future__ import division, absolute_import
from twisted.trial.unittest import TestCase
class ExampleProjTests(TestCase):
def test_version(self):

View File

@ -1,7 +1,7 @@
[tox]
envlist =
{py27,py35}-flake8,
{py27,pypy,py33,py34,py35,py36}-tests,
{py27,pypy,py35,py36}-tests,
check-manifest,
apidocs
@ -31,3 +31,7 @@ commands =
tests: coverage combine
tests: coverage report
tests: coverage html
[testenv:apidocs]
basepython = python2.7