Skip to content

Commit 85fd0d1

Browse files
authored
Merge pull request #41 from nexB/improve-resources
Improve resources
2 parents d618737 + 9d24b3c commit 85fd0d1

File tree

9 files changed

+356
-178
lines changed

9 files changed

+356
-178
lines changed

.github/workflows/docs-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.7]
12+
python-version: [3.9]
1313

1414
steps:
1515
- name: Checkout code

.github/workflows/pypi-release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release library as a PyPI wheel and sdist on GH release creation
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-and-publish-to-pypi:
9+
name: Build and publish library to PyPI
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.9
17+
- name: Install pypa/build
18+
run: python -m pip install build --user
19+
- name: Build a binary wheel and a source tarball
20+
run: python -m build --sdist --wheel --outdir dist/
21+
.
22+
- name: Publish distribution to PyPI
23+
if: startsWith(github.ref, 'refs/tags')
24+
uses: pypa/gh-action-pypi-publish@master
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}
27+

configure

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ CLI_ARGS=$1
3030
# Requirement arguments passed to pip and used by default or with --dev.
3131
REQUIREMENTS="--editable . --constraint requirements.txt"
3232
DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
33+
DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"
3334

3435
# where we create a virtualenv
3536
VIRTUALENV_DIR=venv
@@ -54,7 +55,7 @@ CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin
5455
################################
5556
# Thirdparty package locations and index handling
5657
# Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
57-
if [ -f "$CFG_ROOT_DIR/thirdparty" ]; then
58+
if [ -d "$CFG_ROOT_DIR/thirdparty" ]; then
5859
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty"
5960
fi
6061
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS --find-links https://thirdparty.aboutcode.org/pypi/simple/links.html"
@@ -177,6 +178,7 @@ while getopts :-: optchar; do
177178
help ) cli_help;;
178179
clean ) find_python && clean;;
179180
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
181+
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
180182
esac;;
181183
esac
182184
done

configure.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
@rem # Requirement arguments passed to pip and used by default or with --dev.
2929
set "REQUIREMENTS=--editable . --constraint requirements.txt"
3030
set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
31+
set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"
3132

3233
@rem # where we create a virtualenv
3334
set "VIRTUALENV_DIR=venv"
@@ -77,6 +78,9 @@ if not "%1" == "" (
7778
if "%1" EQU "--dev" (
7879
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
7980
)
81+
if "%1" EQU "--docs" (
82+
set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%"
83+
)
8084
shift
8185
goto again
8286
)

docs/skeleton-usage.rst

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)