generated from JacksonBurns/blank-python-project
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ca2f7af
Showing
92 changed files
with
20,087 additions
and
0 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,129 @@ | ||
name: Continuous Integration | ||
on: | ||
schedule: | ||
- cron: "0 8 * * 1-5" | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: actions-id-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-formatting: | ||
name: Check Formatting Errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install pycodestyle autopep8 | ||
python -m pip install . | ||
- name: Run pycodestyle | ||
run: | | ||
pycodestyle --statistics --count --max-line-length=150 --show-source . | ||
build-and-test: | ||
needs: check-formatting | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
name: ${{ matrix.os }} Python ${{ matrix.python-version }} Subtest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: mamba-org/setup-micromamba@main | ||
with: | ||
environment-name: temp | ||
condarc: | | ||
channels: | ||
- defaults | ||
- conda-forge | ||
channel_priority: flexible | ||
create-args: | | ||
python=${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install . | ||
python -m pip install coverage pytest | ||
- name: Run Tests | ||
run: | | ||
coverage run --source=. -m pytest -v | ||
- name: Show Coverage | ||
run: | | ||
coverage report -m | ||
ci-report-status: | ||
name: report CI status | ||
needs: build-and-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
result="${{ needs.build-and-test.result }}" | ||
if [[ $result == "success" ]] ; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
check-for-new-release: | ||
runs-on: ubuntu-latest | ||
needs: build-and-test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check PyPI version | ||
uses: maybe-hello-world/pyproject-check-version@v3 | ||
id: versioncheck | ||
with: | ||
pyproject-path: "./pyproject.toml" | ||
|
||
- name: Report Results | ||
run: | | ||
echo "New Release found? ${{ steps.versioncheck.outputs.local_version_is_higher }}" | ||
echo "Local version: ${{ steps.versioncheck.outputs.local_version }}" | ||
echo "Public version: ${{ steps.versioncheck.outputs.public_version }}" | ||
outputs: | ||
do_publish: ${{ steps.versioncheck.outputs.local_version_is_higher }} | ||
|
||
pypi-package: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
needs: [check-for-new-release, ci-report-status] | ||
if: ${{ needs.check-for-new-release.outputs.do_publish == 'true' && github.ref == 'refs/heads/main' && github.repository == 'JacksonBurns/blank-python-project'}} | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
. | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip-existing: true | ||
verbose: true | ||
|
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,44 @@ | ||
name: Generate Docs | ||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Dependencies | ||
run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
conda install python=3.8 | ||
python -m pip install -e . | ||
python -m pip install sphinx sphinx-rtd-theme m2r mistune==0.8.4 | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: docs | ||
- name: Update Docs to Main | ||
run: | | ||
git fetch --all | ||
git reset --hard origin/main | ||
- name: Generate Documentation | ||
run: | | ||
cd docs | ||
rm *.html *.doctree || true | ||
sphinx-apidoc -f -o . .. | ||
make clean | ||
make html | ||
cp -r _build/html/* . | ||
cp -r _build/doctrees/* . | ||
echo "" > .nojekyll | ||
- name: Push to Docs Branch | ||
run: | | ||
git add . | ||
git commit -m "Automated Docs Update" -a || true | ||
git push -f |
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,129 @@ | ||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Jackson Burns | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,25 @@ | ||
# blank-python-project | ||
## Using this template: | ||
1. Run `start_project.py`, which will gather some info and rename everything. | ||
2. Add tests. | ||
3. Add your source code to your source directory. | ||
4. Add your requirements to `./requirements.txt`. | ||
5. Curate examples as python notebooks and add them to `./examples/`. | ||
6. Replace `./blankpythonproject_logo.png` with your logo. | ||
7. Delete this line and everything above it, as well as `start_project.py`. | ||
|
||
<h1 align="center">BlankPythonProject</h1> | ||
<h3 align="center">Catchy slogan.</h3> | ||
|
||
<p align="center"> | ||
<img alt="blankpythonprojectlogo" src="https://github.com/JacksonBurns/blank-python-project/blob/main/blankpythonproject_logo.png"> | ||
</p> | ||
<p align="center"> | ||
<img alt="GitHub Repo Stars" src="https://img.shields.io/github/stars/JacksonBurns/blank-python-project?style=social"> | ||
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/blankpythonproject"> | ||
<img alt="PyPI" src="https://img.shields.io/pypi/v/blankpythonproject"> | ||
<img alt="PyPI - License" src="https://img.shields.io/github/license/JacksonBurns/blank-python-project"> | ||
</p> | ||
|
||
## Online Documentation | ||
[Click here to read the documentation](https://JacksonBurns.github.io/blank-python-project/) |
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,3 @@ | ||
from .blankpythonproject import placeholder | ||
|
||
__version__ = "0.0.0" |
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,3 @@ | ||
|
||
def placeholder(): | ||
return |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
|
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Oops, something went wrong.