Skip to content

Commit

Permalink
Cleanup Extension Structure (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daltz333 authored Feb 16, 2021
1 parent c6cd797 commit dcb06b0
Show file tree
Hide file tree
Showing 11 changed files with 251 additions and 148 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
name: Test and Deploy
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
create:
tags:
- '*'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Black
run: |
pip install black
black --check --exclude /docs --diff .
test-extension:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', 'pypy3']
python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3']
sphinx-version: ['2', '3']
name: "Test Extension - Python(${{ matrix.python-version }}), Sphinx(${{ matrix.sphinx-version }})"
steps:
- uses: actions/checkout@v2
- name: Setup Python
Expand All @@ -25,6 +41,7 @@ jobs:
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r dev-requirements.txt
python -m pip install sphinx==${{ matrix.sphinx-version }}
- name: Run Tests for ${{ matrix.python-version }}
run: |
python -m pytest -vv
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# sphinxext-remoteliteralinclude

![CI](https://github.com/wpilibsuite/sphinxext-remoteliteralinclude/workflows/CI/badge.svg)

Sphinx extension that extends the ``literalinclude`` directive to allow remote URLS

## Installation

Please install the extension via pip using the following command:

``python3 -m pip install sphinxext-remoteliteralinclude``

then in your ``conf.py`` under ``extensions``, it should look like the following:

```python
extensions = ["sphinxext.remoteliteralinclude"]
```

## Usage

Simply just use it as you normally would a normal ``literalinclude``
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sphinx
six
pytest==5.4.3
wheel==0.34.2
54 changes: 31 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import setuptools
import subprocess

ret = subprocess.run("git describe --tags --abbrev=0", stdout=subprocess.PIPE,
stderr=subprocess.PIPE, check=True, shell=True)
version = ret.stdout.decode("utf-8").strip()
try:
ret = subprocess.run(
"git describe --tags --abbrev=0",
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=True,
shell=True,
)
version = ret.stdout.decode("utf-8").strip()
except:
version = "main"


with open("README.md", "r", encoding="utf-8") as fh:
Expand All @@ -18,26 +26,26 @@
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/wpilibsuite/sphinxext-remoteliteralinclude",
install_requires = ['sphinx>=2.0'],
packages=['sphinxext'],
install_requires=["sphinx>=2.0", "six"],
packages=["sphinxext"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Environment :: Web Environment',
'Framework :: Sphinx :: Extension',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python',
'Topic :: Documentation :: Sphinx',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
'Topic :: Text Processing',
'Topic :: Utilities',
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Environment :: Web Environment",
"Framework :: Sphinx :: Extension",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python",
"Topic :: Documentation :: Sphinx",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
"Topic :: Text Processing",
"Topic :: Utilities",
],
python_requires='>=3.4',
python_requires=">=3.4",
)
Loading

0 comments on commit dcb06b0

Please sign in to comment.