Skip to content

Commit

Permalink
Merge branch 'release-2.0.1rc1'
Browse files Browse the repository at this point in the history
  • Loading branch information
bskinn committed Feb 1, 2019
2 parents 34eaeb5 + dc46fe3 commit f9c3301
Show file tree
Hide file tree
Showing 32 changed files with 1,562 additions and 1,157 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
install:
- pip install -r requirements-travis.txt
- pip install -U pip setuptools
- pip install -U --force-reinstall -r requirements-travis.txt
- pip install -e .
- sh -c 'cd doc; make html; mkdir scratch'
language: python
Expand All @@ -9,8 +10,11 @@ python:
- 3.6
- 3.7-dev
script:
- python --version
- pip list
- coverage run tests.py -a --testall
- flake8 sphobjinv
- echo $TRAVIS_PYTHON_VERSION | grep -e '^3\.6' && sh -c 'cd doc; make doctest' || echo 'No doctest.'
- echo $TRAVIS_PYTHON_VERSION | grep -e '^3\.6' && codecov || echo "No codecov."
- do_rest=$( echo $TRAVIS_PYTHON_VERSION | grep -e '^3\.6' | wc -l )
- if [ $do_rest -gt 0 ]; then pip install black; black --check setup.py tests.py sphobjinv sphobjinv/test -l 79; else echo "No black."; fi
- if [ $do_rest -gt 0 ]; then sh -c 'cd doc; make doctest'; else echo "No doctest."; fi
- if [ $do_rest -gt 0 ]; then codecov; else echo "No codecov."; fi

14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
and this project strives to adhere to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).


### Unreleased Changes

...


### [2.0.1rc1] - 2019-02-01

#### Fixed

* Sphinx *can* generate inventories with empty-string values for
`project` and `version`; `sphobjinv` now can import such
inventories without error.


### [2.0.0] - 2018-08-16

#### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2018 Brian Skinn
Copyright (c) 2016-2019 Brian Skinn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ sphobjinv: Manipulate and inspect Sphinx objects.inv files
.. image:: https://img.shields.io/github/license/mashape/apistatus.svg
:target: https://github.com/bskinn/sphobjinv/blob/master/LICENSE.txt

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black

----

**Using Sphinx?**
Expand Down Expand Up @@ -134,7 +137,7 @@ Source on `GitHub <https://github.com/bskinn/sphobjinv>`__. Bug reports
and feature requests are welcomed at the
`Issues <https://github.com/bskinn/sphobjinv/issues>`__ page there.

Copyright (c) Brian Skinn 2016-2018
Copyright (c) Brian Skinn 2016-2019

License: The MIT License. See `LICENSE.txt <https://github.com/bskinn/sphobjinv/blob/master/LICENSE.txt>`__
for full license terms.
4 changes: 4 additions & 0 deletions black
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash

black $1 setup.py tests.py sphobjinv sphobjinv/test -l 79

4 changes: 4 additions & 0 deletions black.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off

black.exe %1 setup.py tests.py sphobjinv sphobjinv\test -l 79

4 changes: 2 additions & 2 deletions doc/source/cli/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ The options for the parent |soi| command are:

>>> cli_run('sphobjinv --version')
<BLANKLINE>
sphobjinv v2.0
sphobjinv v2.0.1rc1
<BLANKLINE>
Copyright (c) Brian Skinn 2016-2018
Copyright (c) Brian Skinn 2016-2019
License: The MIT License
<BLANKLINE>
Bug reports & feature requests: https://github.com/bskinn/sphobjinv
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

# General information about the project.
project = 'sphobjinv'
copyright = '2016-2018, Brian Skinn'
copyright = '2016-2019, Brian Skinn'
author = 'Brian Skinn'

# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 1 addition & 1 deletion doc/source/customfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ can be found at the GitHub repo
>>> import sphobjinv as soi
>>> inv = soi.Inventory()
>>> print(inv)
<Inventory (manual): None vNone, 0 objects>
<Inventory (manual): <no project> <no version>, 0 objects>

* Define the :attr:`~sphobjinv.inventory.Inventory.project`
and :attr:`~sphobjinv.inventory.Inventory.version` attributes:
Expand Down
5 changes: 3 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
attrs>=17,<18
certifi
coverage
flake8==3.5.0
flake8-docstrings==1.3.0
flake8
flake8-docstrings
fuzzywuzzy>=0.3
ipython
jsonschema==2.6
Expand All @@ -13,5 +13,6 @@ sphinx-issues
sphinx-rtd-theme==0.4.1
stdio-mgr
timeout-decorator==0.4.0
tox
twine
wget
2 changes: 1 addition & 1 deletion requirements-rtd.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
attrs>=17.1,<18
attrs>=17.1<18
sphinx==1.7.6
sphinx-issues
sphinx-rtd-theme==0.4.1
4 changes: 2 additions & 2 deletions requirements-travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ codecov
coverage
fuzzywuzzy>=0.3
jsonschema==2.6
flake8==3.5.0
flake8-docstrings==1.3.0
flake8
flake8-docstrings
sphinx==1.7.6
sphinx-issues
sphinx-rtd-theme==0.4.1
Expand Down
92 changes: 53 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@

from sphobjinv import __version__

NAME='sphobjinv'
NAME = "sphobjinv"


version_override = "2.0"


def readme():
with open('README.rst', 'r') as f:
with open("README.rst", "r") as f:
content = f.read()

new_ver = version_override if version_override else __version__

# Helper function
def content_update(content, pattern, sub):
return re.sub(pattern, sub, content, flags=re.M | re.I)
Expand All @@ -17,53 +23,61 @@ def content_update(content, pattern, sub):
# This one gets the badge image
content = content_update(
content,
r'(?<=/readthedocs/{0}/)\S+?(?=\.svg$)'.format(NAME),
'v' + __version__)
r"(?<=/readthedocs/{0}/)\S+?(?=\.svg$)".format(NAME),
"v" + new_ver,
)

# This one gets the RtD links
content = content_update(
content,
r'(?<={0}\.readthedocs\.io/en/)\S+?(?=/)'.format(NAME),
'v' + __version__)
r"(?<={0}\.readthedocs\.io/en/)\S+?(?=/)".format(NAME),
"v" + new_ver,
)

return content


setup(
name=NAME,
version=__version__,
description='Sphinx objects.inv Inspection/Manipulation Tool',
description="Sphinx objects.inv Inspection/Manipulation Tool",
long_description=readme(),
url='https://github.com/bskinn/sphobjinv',
license='MIT License',
author='Brian Skinn',
author_email='bskinn@alum.mit.edu',
packages=['sphobjinv'],
provides=['sphobjinv'],
python_requires='>=3.4',
requires=['attrs (>=17.1)', 'certifi', 'fuzzywuzzy (>=0.3)',
'jsonschema (>=2.0)'],
install_requires=['attrs>=17.1', 'certifi', 'fuzzywuzzy>=0.3',
'jsonschema>=2.0'],
classifiers=['License :: OSI Approved',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Environment :: Console',
'Framework :: Sphinx',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities',
'Development Status :: 5 - Production/Stable'],
entry_points={
'console_scripts': [
'sphobjinv = sphobjinv.cmdline:main'
]
}
url="https://github.com/bskinn/sphobjinv",
license="MIT License",
author="Brian Skinn",
author_email="bskinn@alum.mit.edu",
packages=["sphobjinv"],
provides=["sphobjinv"],
python_requires=">=3.4",
requires=[
"attrs (>=17.1,<18.0)",
"certifi",
"fuzzywuzzy (>=0.3)",
"jsonschema (>=2.0)",
],
install_requires=[
"attrs>=17.1,<18.0",
"certifi",
"fuzzywuzzy>=0.3",
"jsonschema>=2.0",
],
classifiers=[
"License :: OSI Approved",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Environment :: Console",
"Framework :: Sphinx",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Utilities",
"Development Status :: 5 - Production/Stable",
],
entry_points={"console_scripts": ["sphobjinv = sphobjinv.cmdline:main"]},
)
37 changes: 25 additions & 12 deletions sphobjinv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
17 May 2016
**Copyright**
\(c) Brian Skinn 2016-2018
\(c) Brian Skinn 2016-2019
**Source Repository**
http://www.github.com/bskinn/sphobjinv
Expand All @@ -27,16 +27,29 @@

from __future__ import absolute_import

__all__ = ['readbytes', 'writebytes', 'readjson', 'writejson', 'urlwalk',
'compress', 'decompress',
'pb_comments', 'pb_data', 'pb_version', 'pb_project',
'p_data',
'DataFields', 'HeaderFields',
'SourceTypes',
'SphobjinvError', 'VersionError',
'DataObjStr', 'DataObjBytes',
'Inventory',
'json_schema']
__all__ = [
"readbytes",
"writebytes",
"readjson",
"writejson",
"urlwalk",
"compress",
"decompress",
"pb_comments",
"pb_data",
"pb_version",
"pb_project",
"p_data",
"DataFields",
"HeaderFields",
"SourceTypes",
"SphobjinvError",
"VersionError",
"DataObjStr",
"DataObjBytes",
"Inventory",
"json_schema",
]

from .data import DataObjStr, DataObjBytes, DataFields
from .inventory import Inventory, SourceTypes, HeaderFields
Expand All @@ -48,4 +61,4 @@
from .zlib import compress, decompress


__version__ = '2.0'
__version__ = "2.0.1rc1"
Loading

0 comments on commit f9c3301

Please sign in to comment.