Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"
os: linux
dist: focal
install:
- pip install .
- pip install flake8

script:
- py.test
- flake8 . --ignore=E501,E722,E741,W605 --exclude=docs/conf.py
- travis_retry pip install -U tox-travis
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38
- python: 3.7
env: TOXENV=flake8
script: tox
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[![Build Status](https://travis-ci.org/ribozz/sphinx-argparse.svg?branch=master)](https://travis-ci.org/ribozz/sphinx-argparse)
# sphinx-argparse

[![Build Status](https://travis-ci.org/alex-rudakov/sphinx-argparse.svg?branch=master)](https://travis-ci.org/alex-rudakov/sphinx-argparse)
[![Documentation Status](https://readthedocs.org/projects/sphinx-argparse/badge/?version=stable)](http://sphinx-argparse.readthedocs.org/)
[![PyPI version](https://badge.fury.io/py/sphinx-argparse.svg)](https://badge.fury.io/py/sphinx-argparse)
[![Install with conda](https://anaconda.org/conda-forge/sphinx-argparse/badges/installer/conda.svg)](https://github.com/conda-forge/sphinx-argparse-feedstock)
![Conda downloads](https://anaconda.org/conda-forge/sphinx-argparse/badges/downloads.svg)

sphinx-argparse
===============

A sphinx extension that automatically documents argparse commands and options.

For installation and usage details see the [documentation](http://sphinx-argparse.readthedocs.org/en/latest/). The changelog is also [found there](http://sphinx-argparse.readthedocs.org/en/latest/changelog.html).
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import datetime
import os

# If extensions (or extra_modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -52,7 +53,8 @@

# General information about the project.
project = u'sphinx-argparse'
copyright = u'2017, Alex Rudakov, Devon Ryan and contributors'
copyright = u'2017-%d, Alex Rudakov, Devon Ryan and contributors' % (
datetime.datetime.now().year)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 1 addition & 1 deletion docs/contrib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Contributions are gratefully accepted through `github <https://github.com/ribozz

Don't forget to run tests before committing::

py.test
tox
2 changes: 0 additions & 2 deletions docs/markdown.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ The above example renders as follows:
:prog: sample
:markdown:

A random paragraph

Heading 1
=========

Expand Down
4 changes: 0 additions & 4 deletions requirements_dev.txt

This file was deleted.

39 changes: 28 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
from setuptools import setup

MARKDOWN_REQUIREMENTS = ['CommonMark>=0.5.6']
LINT_REQUIREMENTS = ['flake8']
TEST_REQUIREMENTS = ['pytest', 'tox']
DEV_REQUIREMENTS = ['sphinx_rtd_theme==0.4.3'] + \
TEST_REQUIREMENTS + \
LINT_REQUIREMENTS + \
MARKDOWN_REQUIREMENTS

def getVersion():
f = open("sphinxarg/__init__.py")

def get_version():
f = open('sphinxarg/__init__.py')
_ = f.read()
ver = _.split("'")[1]
ver = _.split('\'')[1]
f.close()
return ver


def get_long_description():
f = open('README.md')
long_desc = f.read()
f.close()
return long_desc


setup(
name='sphinx-argparse',
version=getVersion(),
version=get_version(),
packages=[
'sphinxarg',
],
url='https://github.com/ribozz/sphinx-argparse',
url='https://github.com/alex-rudakov/sphinx-argparse',
license='MIT',
author='Aleksandr Rudakov and Devon Ryan',
author_email='[email protected]',
description='A sphinx extension that automatically documents argparse commands and options',
long_description="""A sphinx extension that automatically documents argparse commands and options.

For installation and usage details, see the `documentation <http://sphinx-argparse.readthedocs.org/en/latest/>`_.""",
description='A sphinx extension that automatically documents' +
' argparse commands and options',
long_description=get_long_description(),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand All @@ -31,14 +45,17 @@ def getVersion():
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Documentation :: Sphinx',
'Topic :: Software Development :: Documentation'
],
install_requires=[
'sphinx>=1.2.0'
],
extras_require={
'dev': ['pytest', 'sphinx_rtd_theme'],
'markdown': ['CommonMark>=0.5.6']
'dev': DEV_REQUIREMENTS,
'lint': LINT_REQUIREMENTS,
'test': TEST_REQUIREMENTS,
'markdown': MARKDOWN_REQUIREMENTS
}
)
Loading