-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from tillahoffmann/update
Maintenance updates.
- Loading branch information
Showing
12 changed files
with
358 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.coverage | ||
.git | ||
.pytest_cache | ||
*.egg-info | ||
*/__pycache__ | ||
docs | ||
htmlcov | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ARG version | ||
FROM python:${version} | ||
WORKDIR /workdir | ||
COPY README.rst requirements.txt setup.py ./ | ||
RUN pip install -r requirements.txt | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
.PHONY : clean dist docs lint tests | ||
.PHONY : dist docs doctests docker-image lint tests | ||
|
||
# Build documentation, lint the code, and run tests | ||
build : setup.py docs lint tests | ||
# Build documentation, lint the code, and run tests. | ||
build : setup.py docs doctests lint tests | ||
python setup.py sdist | ||
twine check dist/*.tar.gz | ||
|
||
lint : | ||
flake8 | ||
black --check . | ||
|
||
docs : | ||
sphinx-build -b doctest . docs/_build | ||
sphinx-build -b html . docs/_build | ||
# Always build from scratch because of dodgy Sphinx caching. | ||
rm -rf docs/_build | ||
sphinx-build -nW -b html . docs/_build | ||
|
||
clean : | ||
doctests : | ||
# Always build from scratch because of dodgy Sphinx caching. | ||
rm -rf docs/_build | ||
sphinx-build -nW -b doctest . docs/_build | ||
|
||
tests : | ||
pytest -v --cov localscope --cov-report=html --cov-report=term-missing \ | ||
--cov-fail-under=100 tests | ||
--cov-fail-under=100 | ||
|
||
# Build pinned requirements file | ||
# Build pinned requirements file. | ||
requirements.txt : requirements.in setup.py | ||
pip-compile -v $< | ||
pip-sync $@ | ||
|
||
# Docker versions. | ||
VERSIONS = 3.8 3.9 3.10 3.11 3.12 | ||
IMAGES = ${addprefix docker-image/,${VERSIONS}} | ||
|
||
docker-images : ${IMAGES} | ||
${IMAGES} : docker-image/% : | ||
docker build --build-arg version=$* -t localscope:$* . | ||
|
||
$(addprefix docker-shell/,${VERSIONS}) : docker-shell/% : docker-image/% | ||
docker run --rm -it localscope:$* bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,15 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'localscope' | ||
copyright = '2020, Till Hoffmann' | ||
author = 'Till Hoffmann' | ||
master_doc = 'README' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
project = "localscope" | ||
copyright = "2020, Till Hoffmann" | ||
author = "Till Hoffmann" | ||
extensions = [ | ||
'sphinx.ext.napoleon', | ||
'sphinx.ext.doctest', | ||
'sphinx.ext.autodoc', | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.doctest", | ||
"sphinx.ext.napoleon", | ||
] | ||
exclude_patterns = [ | ||
"_build", | ||
"*.egg-info", | ||
"README.rst", | ||
"venv", | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'alabaster' | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = [] | ||
|
||
doctest_global_setup = "from localscope import localscope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README.rst |
Oops, something went wrong.