-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate with copier template. (#16)
- Loading branch information
Showing
32 changed files
with
684 additions
and
32 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 @@ | ||
github: [{{ repo_namespace }}] |
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,17 @@ | ||
name: Read the Docs Pull Request Preview | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
documentation-links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: readthedocs/actions/preview@v1 | ||
with: | ||
project-slug: "{{ repo_name }}" |
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,6 +1,7 @@ | ||
# Custom | ||
*.swp | ||
.DS_Store | ||
.copier-answers.yml | ||
Pipfile | ||
|
||
# Byte-compiled / optimized / DLL files | ||
|
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,137 @@ | ||
# Custom | ||
*.swp | ||
.DS_Store | ||
{%- if project_name == "Serious Scaffold Python" %} | ||
.copier-answers.yml | ||
{%- endif %} | ||
Pipfile | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
"autofix", | ||
"automodule", | ||
"codecov", | ||
"huxuan", | ||
"isort", | ||
"mypy", | ||
"pipenv", | ||
|
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,80 @@ | ||
.PHONY: clean deepclean install dev version pre-commit lint black mypy ruff toml-sort tests freeze build upload docs docs-autobuild | ||
|
||
# Construct pipenv run command with or without site-packages flag when not in CI environment and pipenv command exists. | ||
SITE_PACKAGES_FLAG = $(shell [ "${SS_SITE_PACKAGES}" = "true" ] && echo --site-packages) | ||
PIPRUN := $(shell [ "${CI}" != "true" ] && command -v pipenv > /dev/null 2>&1 && echo pipenv ${SITE_PACKAGES_FLAG} run) | ||
|
||
# Remove common intermediate files. | ||
clean: | ||
-rm -rf \ | ||
{%- if project_name == "Serious Scaffold Python" %} | ||
.copier-answers.yml \ | ||
{%- endif %} | ||
.coverage \ | ||
.mypy_cache \ | ||
.pytest_cache \ | ||
.ruff_cache \ | ||
Pipfile* \ | ||
coverage.xml \ | ||
dist \ | ||
docs/_build | ||
find . -name '*.egg-info' -print0 | xargs -0 rm -rf | ||
find . -name '*.pyc' -print0 | xargs -0 rm -f | ||
find . -name '*.swp' -print0 | xargs -0 rm -f | ||
find . -name '.DS_Store' -print0 | xargs -0 rm -r | ||
find . -name '__pycache__' -print0 | xargs -0 rm -rf | ||
|
||
deepclean: clean | ||
-pre-commit uninstall --hook-type pre-push | ||
-pipenv --venv >/dev/null 2>&1 && pipenv --rm | ||
|
||
install: | ||
${PIPRUN} pip install -e . -c constraints/$(or $(SS_CONSTRAINTS_VERSION),default).txt | ||
|
||
dev-%: | ||
${PIPRUN} pip install -e .[$*] -c constraints/$(or $(SS_CONSTRAINTS_VERSION),default).txt | ||
|
||
dev: | ||
${PIPRUN} pip install -e .[docs,lint,package,tests] -c constraints/$(or $(SS_CONSTRAINTS_VERSION),default).txt | ||
-[ "${CI}" != "true" ] && pre-commit install --hook-type pre-push | ||
|
||
version: | ||
${PIPRUN} python -m setuptools_scm | ||
|
||
pre-commit: | ||
pre-commit run --all-files | ||
|
||
black: | ||
${PIPRUN} python -m black docs tests src | ||
|
||
lint: isort mypy ruff toml-sort | ||
|
||
isort: | ||
${PIPRUN} python -m isort . | ||
|
||
mypy: | ||
${PIPRUN} python -m mypy docs tests src | ||
|
||
ruff: | ||
${PIPRUN} python -m ruff docs tests src | ||
|
||
toml-sort: | ||
${PIPRUN} toml-sort -a -i pyproject.toml | ||
|
||
tests: | ||
${PIPRUN} python -m pytest . | ||
|
||
freeze: | ||
@${PIPRUN} pip freeze --exclude-editable | ||
|
||
build: | ||
${PIPRUN} python -m build | ||
|
||
upload: | ||
${PIPRUN} python -m twine upload dist/* | ||
|
||
docs: | ||
${PIPRUN} python -m sphinx.cmd.build docs docs/_build | ||
|
||
docs-autobuild: | ||
${PIPRUN} python -m sphinx_autobuild docs docs/_build |
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
Oops, something went wrong.