mirror of
https://github.com/Steffo99/io-beep-boop.git
synced 2024-11-21 07:54:20 +00:00
Initial commit
This commit is contained in:
commit
d60af86530
26 changed files with 991 additions and 0 deletions
93
.github/dependabot.yml
vendored
Normal file
93
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
# Dependabot configuration file
|
||||
# See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#allow
|
||||
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
|
||||
# We're using Poetry
|
||||
- package-ecosystem: pip
|
||||
|
||||
# The root directory of the project
|
||||
directory: "/"
|
||||
|
||||
# Check every day for updates at 08:00 UTC
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
timezone: "UTC"
|
||||
|
||||
# Do not alert for indirect dependencies, as there may be too many
|
||||
allow:
|
||||
- dependency-type: direct
|
||||
|
||||
# Use Gitmoji in the commit message
|
||||
commit-message:
|
||||
prefix: "⬆️ "
|
||||
include: "scope"
|
||||
|
||||
# Set the pull request label
|
||||
labels:
|
||||
- "dependencies"
|
||||
|
||||
# Stay updated to the main branch
|
||||
rebase-strategy: auto
|
||||
|
||||
# Pip does not support any other versioning strategy
|
||||
versioning-strategy: lockfile-only
|
||||
|
||||
# Additionally, keep GitHub Actions updated
|
||||
- package-ecosystem: github-actions
|
||||
|
||||
# The root directory of the actions
|
||||
directory: "/"
|
||||
|
||||
# Check every day for updates at 08:00 UTC
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
timezone: "UTC"
|
||||
|
||||
# GitHub Actions only has direct dependencies
|
||||
allow:
|
||||
- dependency-type: direct
|
||||
|
||||
# Use Gitmoji in the commit message
|
||||
commit-message:
|
||||
prefix: "🔨️ "
|
||||
include: "scope"
|
||||
|
||||
# Set the pull request label
|
||||
labels:
|
||||
- "automation"
|
||||
|
||||
# Stay updated to the main branch
|
||||
rebase-strategy: auto
|
||||
|
||||
# Finally, keep Git submodules updated
|
||||
- package-ecosystem: gitsubmodule
|
||||
|
||||
# The root directory of the repository
|
||||
directory: "/"
|
||||
|
||||
# Check every day for updates at 08:00 UTC
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
timezone: "UTC"
|
||||
|
||||
# GitHub Actions only has direct dependencies
|
||||
allow:
|
||||
- dependency-type: direct
|
||||
|
||||
# Use Gitmoji in the commit message
|
||||
commit-message:
|
||||
prefix: "⬆️ "
|
||||
include: "scope"
|
||||
|
||||
# Set the pull request label
|
||||
labels:
|
||||
- "dependencies"
|
||||
|
||||
# Stay updated to the main branch
|
||||
rebase-strategy: auto
|
29
.github/workflows/analysis.yml
vendored
Normal file
29
.github/workflows/analysis.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: "Periodic analysis"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Change this in your project to a random time.
|
||||
# Every monday at 06:09 UTC
|
||||
- cron: "9 6 * * 1"
|
||||
|
||||
jobs:
|
||||
codeql:
|
||||
name: "🔍 Perform CodeQL analysis"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
security-events: write
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: "⬇️ Checkout repository"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "🔨 Initialize CodeQL"
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: python
|
||||
|
||||
- name: "🔍 Perform CodeQL analysis"
|
||||
uses: github/codeql-action/analyze@v2
|
89
.github/workflows/release.yml
vendored
Normal file
89
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
name: "Automated release"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
uses: "./.github/workflows/tests.yml"
|
||||
|
||||
build-package:
|
||||
name: "📦 Build Python package"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "⬇️ Checkout repository"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "🔨 Setup Python"
|
||||
uses: actions/setup-python@v3
|
||||
|
||||
- name: "🔨 Setup Poetry"
|
||||
uses: abatilo/actions-poetry@v2.1.4
|
||||
|
||||
- name: "🔨 Setup Poetry Python environment"
|
||||
uses: Steffo99/actions-poetry-deps@v0.2.4
|
||||
|
||||
- name: "🏗 Build package with Poetry"
|
||||
run: poetry build --no-interaction
|
||||
|
||||
- name: "⬆️ Upload code package to artifacts"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "Build"
|
||||
path: dist/*.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: "⬆️ Upload wheel package to artifacts"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "Build"
|
||||
path: dist/*.whl
|
||||
if-no-files-found: warn
|
||||
|
||||
publish-github:
|
||||
name: "🌐 Publish release on GitHub"
|
||||
needs:
|
||||
- "tests"
|
||||
- "build-package"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "⬇️ Download built packages from artifacts"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: "Build"
|
||||
path: dist/
|
||||
|
||||
- name: "🌐 Create release"
|
||||
uses: ncipollo/release-action@v1.10.0
|
||||
with:
|
||||
artifactErrorsFailBuild: true
|
||||
artifacts: dist/*
|
||||
draft: true
|
||||
generateReleaseNotes: true
|
||||
|
||||
publish-pypi:
|
||||
name: "🌐 Publish release on PyPI"
|
||||
needs:
|
||||
- "tests"
|
||||
- "build-package"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "⬇️ Download built packages from artifacts"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: "Build"
|
||||
path: dist/
|
||||
|
||||
- name: "🌐 Upload package"
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: "__token__"
|
||||
password: ${{ secrets.PYPI_TOKEN }}
|
64
.github/workflows/tests.yml
vendored
Normal file
64
.github/workflows/tests.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
name: "Test suite"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
workflow_call:
|
||||
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
pytest:
|
||||
name: "🧪 Test package using pytest"
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
||||
|
||||
# If you need a database to perform your tests
|
||||
# services:
|
||||
# postgres:
|
||||
# image: postgres
|
||||
# env:
|
||||
# POSTGRES_USER: username
|
||||
# POSTGRES_PASSWORD: password
|
||||
# POSTGRES_DB: db
|
||||
# options: >-
|
||||
# --health-cmd pg_isready
|
||||
# --health-interval 10s
|
||||
# --health-timeout 5s
|
||||
# --health-retries 5
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
|
||||
steps:
|
||||
- name: "⬇️ Checkout repository"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "🔨 Setup Python"
|
||||
uses: actions/setup-python@v3
|
||||
|
||||
- name: "🔨 Setup Poetry"
|
||||
uses: abatilo/actions-poetry@v2.1.4
|
||||
|
||||
- name: "🔨 Setup Poetry Python environment"
|
||||
id: pyenv
|
||||
uses: Steffo99/actions-poetry-deps@v0.2.4
|
||||
|
||||
- name: "🧪 Run tests"
|
||||
run: |
|
||||
source ${{ steps.pyenv.outputs.pyenv }}/activate
|
||||
pytest --verbose --cov=. --cov-report=html
|
||||
|
||||
- name: "⬆️ Upload coverage"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "Coverage"
|
||||
path: htmlcov
|
169
.gitignore
vendored
Normal file
169
.gitignore
vendored
Normal file
|
@ -0,0 +1,169 @@
|
|||
# Gitignore file
|
||||
# See https://git-scm.com/docs/gitignore for more details
|
||||
|
||||
###################
|
||||
# Project ignores #
|
||||
###################
|
||||
|
||||
# Add your own ignores here!
|
||||
|
||||
|
||||
|
||||
##################
|
||||
# Python ignores #
|
||||
##################
|
||||
|
||||
# From https://github.com/github/gitignore/blob/main/Python.gitignore
|
||||
|
||||
# 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/
|
||||
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/
|
||||
cover/
|
||||
|
||||
# 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
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .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
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.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/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
6
.idea/compiler.xml
Normal file
6
.idea/compiler.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="TypeScriptCompiler">
|
||||
<option name="recompileOnChanges" value="true" />
|
||||
</component>
|
||||
</project>
|
7
.idea/discord.xml
Normal file
7
.idea/discord.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="ASK" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
10
.idea/markdown.xml
Normal file
10
.idea/markdown.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MarkdownSettings">
|
||||
<enabledExtensions>
|
||||
<entry key="MermaidLanguageExtension" value="false" />
|
||||
<entry key="PlantUMLLanguageExtension" value="false" />
|
||||
</enabledExtensions>
|
||||
<option name="splitLayout" value="SHOW_EDITOR" />
|
||||
</component>
|
||||
</project>
|
9
.idea/misc.xml
Normal file
9
.idea/misc.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ClojureProjectResolveSettings">
|
||||
<currentScheme>IDE</currentScheme>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/template-poetry.iml" filepath="$PROJECT_DIR$/template-poetry.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
13
.idea/vcs.xml
Normal file
13
.idea/vcs.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitSharedSettings">
|
||||
<option name="FORCE_PUSH_PROHIBITED_PATTERNS">
|
||||
<list>
|
||||
<option value="master main" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
10
.readthedocs.yml
Normal file
10
.readthedocs.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
version: 2
|
||||
|
||||
python:
|
||||
install:
|
||||
- path: "."
|
||||
|
||||
build:
|
||||
os: "ubuntu-20.04"
|
||||
tools:
|
||||
python: "3.10"
|
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"ms-python.python"
|
||||
]
|
||||
}
|
12
.vscode/settings.json
vendored
Normal file
12
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"files.exclude": {
|
||||
".idea/": true,
|
||||
"**/*.iml": true,
|
||||
"**/.pytest_cache/": true,
|
||||
"**/__pycache__/": true,
|
||||
".venv/": true,
|
||||
"dist/": true,
|
||||
"out/": true,
|
||||
"poetry.lock": true,
|
||||
}
|
||||
}
|
5
PACKAGE_NAME/__init__.py
Normal file
5
PACKAGE_NAME/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
# If you are building a **library**, use this file to export objects!
|
||||
|
||||
__all__ = (
|
||||
# "",
|
||||
)
|
8
PACKAGE_NAME/__main__.py
Normal file
8
PACKAGE_NAME/__main__.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
# If you are building an **application**, use this file to run code!
|
||||
|
||||
def main():
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
2
PACKAGE_NAME/tests/conftest.py
Normal file
2
PACKAGE_NAME/tests/conftest.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Pytest configuration file
|
||||
# Add global fixtures and things here
|
2
PACKAGE_NAME/tests/test_something.py
Normal file
2
PACKAGE_NAME/tests/test_something.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
def test_something_so_pytest_does_not_exit_with_1():
|
||||
assert 1+1 == 2
|
21
README.md
Normal file
21
README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# `PACKAGE_NAME`
|
||||
|
||||
You should probably update this description to reflect your project :)
|
||||
|
||||
## Installation
|
||||
|
||||
```console
|
||||
$ pip install PACKAGE_NAME
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
$ PACKAGE-NAME
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```console
|
||||
$ poetry install
|
||||
```
|
22
docs/Makefile
Normal file
22
docs/Makefile
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Slightly extended makefile for Sphinx documentation
|
||||
|
||||
# Sphinx options
|
||||
export SPHINXOPTS =
|
||||
export SPHINXBUILD = "sphinx-build"
|
||||
export SOURCEDIR = "source"
|
||||
export BUILDDIR = "build"
|
||||
|
||||
# LaTeX builder options
|
||||
export LATEXMKOPTS =
|
||||
export LATEXOPTS = "-interaction=nonstopmode"
|
||||
|
||||
# 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)
|
36
docs/make.bat
Normal file
36
docs/make.bat
Normal file
|
@ -0,0 +1,36 @@
|
|||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Slightly extended command file for Sphinx documentation
|
||||
|
||||
set SPHINXOPTS=
|
||||
set SPHINXBUILD=sphinx-build
|
||||
set SOURCEDIR=source
|
||||
set BUILDDIR=build
|
||||
set LATEXMKOPTS=
|
||||
set LATEXOPTS=-interaction=nonstopmode
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
goto end
|
||||
|
||||
:help
|
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
|
||||
:end
|
||||
popd
|
151
docs/source/conf.py
Normal file
151
docs/source/conf.py
Normal file
|
@ -0,0 +1,151 @@
|
|||
# Extended Sphinx configuration
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
|
||||
###########
|
||||
# Imports #
|
||||
###########
|
||||
|
||||
import datetime
|
||||
|
||||
|
||||
###########################
|
||||
# Developer configuration #
|
||||
###########################
|
||||
# Alter these to reflect the nature of your project!
|
||||
|
||||
# Project name
|
||||
project = 'PROJECT NAME'
|
||||
# Project author
|
||||
author = 'Your Name'
|
||||
# Project copyright
|
||||
project_copyright = f'{datetime.date.today().year}, {author}'
|
||||
|
||||
# Sphinx language
|
||||
language = "en"
|
||||
|
||||
# Configuration for the theme
|
||||
html_theme_options = {
|
||||
# Set this to the main color of your project
|
||||
"style_nav_header_background": "#FF7F00",
|
||||
}
|
||||
html_context = {
|
||||
"display_github": True,
|
||||
# Set this to the name of the organization this GitHub repository is in
|
||||
"github_user": "Steffo99",
|
||||
# Set this to the name of this repository
|
||||
"github_repo": "template-poetry",
|
||||
# Set this to the name of the main branch slash docs slash
|
||||
"github_version": "main/docs/",
|
||||
}
|
||||
|
||||
|
||||
##########################
|
||||
# Advanced configuration #
|
||||
##########################
|
||||
# Change these options only if you need further customization
|
||||
|
||||
# Sphinx extensions
|
||||
extensions = [
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.autosectionlabel",
|
||||
"sphinx.ext.todo",
|
||||
]
|
||||
|
||||
# Source files encoding
|
||||
source_encoding = "UTF-8"
|
||||
# Source file extensions
|
||||
source_suffix = {
|
||||
".rst": "restructuredtext",
|
||||
}
|
||||
# Source files parsers
|
||||
source_parsers = {}
|
||||
|
||||
# The doc from which to start rendering
|
||||
root_doc = "index"
|
||||
# Files to ignore when rendering
|
||||
exclude_patterns = [
|
||||
"build",
|
||||
"_build",
|
||||
"Thumbs.db",
|
||||
".DS_Store",
|
||||
]
|
||||
# Sphinx template files
|
||||
templates_path = [
|
||||
'_templates',
|
||||
]
|
||||
|
||||
# Prologue of all rst files
|
||||
rst_prolog = ""
|
||||
# Epilogue of all rst files
|
||||
rst_epilog = ""
|
||||
|
||||
# Default domain
|
||||
primary_domain = "py"
|
||||
# Default role
|
||||
default_role = "any"
|
||||
|
||||
# Print warnings on the page
|
||||
keep_warnings = False
|
||||
# Display more warnings than usual
|
||||
nitpicky = False
|
||||
|
||||
# Intersphinx URLs
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3.10", None),
|
||||
}
|
||||
# Manpages URL
|
||||
manpages_url = "https://man.archlinux.org/"
|
||||
|
||||
# HTML builder theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
# Title of the HTML page
|
||||
html_title = f"{project}"
|
||||
# Short title of the HTML page
|
||||
html_short_title = f"{project}"
|
||||
# Path of the documentation static files
|
||||
html_static_path = [
|
||||
"_static",
|
||||
]
|
||||
# Path of extra files to add to the build
|
||||
html_extra_path = [
|
||||
"_extra",
|
||||
]
|
||||
# Disable additional indexes
|
||||
html_domain_indices = False
|
||||
|
||||
# LaTeX rendering engine to use
|
||||
latex_engine = "lualatex"
|
||||
# LaTeX top level title type
|
||||
latex_toplevel_sectioning = "chapter"
|
||||
# LaTeX URLs rendering
|
||||
latex_show_urls = "footnote"
|
||||
# LaTeX theme
|
||||
latex_theme = "manual"
|
||||
|
||||
# TODOs
|
||||
todo_include_todos = True
|
||||
todo_emit_warnings = True
|
||||
todo_link_only = False
|
||||
|
||||
# Smartquotes
|
||||
smartquotes_excludes = {
|
||||
"languages": [
|
||||
# Smartquotes is completely broken in italian!
|
||||
"it",
|
||||
# Keep the default, just in case
|
||||
"ja",
|
||||
],
|
||||
"builders": [
|
||||
"man",
|
||||
"text",
|
||||
]
|
||||
}
|
||||
|
||||
# Autodoc
|
||||
autodoc_member_order = "bysource"
|
||||
autodoc_default_options = {
|
||||
"members": True,
|
||||
"undoc-members": True,
|
||||
}
|
16
docs/source/index.rst
Normal file
16
docs/source/index.rst
Normal file
|
@ -0,0 +1,16 @@
|
|||
.. Write your documentation in this file!
|
||||
|
||||
Welcome to PROJECT_NAME's documentation!
|
||||
========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
174
pyproject.toml
Normal file
174
pyproject.toml
Normal file
|
@ -0,0 +1,174 @@
|
|||
[build-system]
|
||||
#######################
|
||||
# Python build system #
|
||||
#######################
|
||||
# The build system to use when installing this package.
|
||||
# Used when installing the package with `pip install .`.
|
||||
# See also: https://www.python.org/dev/peps/pep-0517/
|
||||
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
|
||||
|
||||
[tool.poetry]
|
||||
###################
|
||||
# Poetry settings #
|
||||
###################
|
||||
# See https://python-poetry.org/docs/pyproject/ for more details!
|
||||
|
||||
# The name of your project.
|
||||
# Ensure that it is available on PyPI: https://pypi.org/
|
||||
name = "PACKAGE_NAME"
|
||||
|
||||
# The version of the package.
|
||||
version = "0.1.0"
|
||||
|
||||
# A brief, one-sentence description about your project.
|
||||
description = ""
|
||||
|
||||
# A list of the authors of the project.
|
||||
authors = [
|
||||
"Your Name <you@example.org>",
|
||||
]
|
||||
|
||||
# A list of maintainers of the project.
|
||||
# Often, it is the same as the authors list.
|
||||
maintainers = [
|
||||
"Your Name <you@example.org>",
|
||||
]
|
||||
|
||||
# The license of the package.
|
||||
# Uses SPDX format: https://spdx.org/licenses/
|
||||
license = ""
|
||||
|
||||
# The README file.
|
||||
readme = "README.md"
|
||||
|
||||
# The URL of the project website.
|
||||
# Not the GitHub repository!
|
||||
homepage = "https://example.org/"
|
||||
|
||||
# The URL of the project repository.
|
||||
repository = "https://github.com/"
|
||||
|
||||
# The URL of the project documentation location.
|
||||
documentation = "https://example.org/docs"
|
||||
|
||||
# Up to five keywords related to your project.
|
||||
# See also: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#keywords
|
||||
keywords = [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
]
|
||||
|
||||
# Any number of trove classifiers that apply to your project.
|
||||
# See the list at: https://pypi.org/classifiers/
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
]
|
||||
|
||||
# ADVANCED: specify the packages exported by your project
|
||||
# See also: https://python-poetry.org/docs/pyproject/#packages
|
||||
# packages = [
|
||||
# # Regular packages
|
||||
# { include = "OTHER_PACKAGE_NAME" },
|
||||
# # Namespace packages
|
||||
# { include = "EXTEND/OTHER/NAMESPACE/**/*.py" }
|
||||
# ]
|
||||
|
||||
# ADVANCED: include additional files in the build
|
||||
# include = [
|
||||
# "FILENAME.txt"
|
||||
# ]
|
||||
|
||||
# ADVANCED: exclude files from the build
|
||||
# exclude = [
|
||||
# "PACKAGE_NAME/test.py"
|
||||
# ]
|
||||
|
||||
|
||||
|
||||
[tool.poetry.urls]
|
||||
##################
|
||||
# URLs #
|
||||
##################
|
||||
# Additional project URLs in a name → link mapping.
|
||||
|
||||
|
||||
|
||||
[tool.poetry.scripts]
|
||||
#####################
|
||||
# Scripts #
|
||||
#####################
|
||||
# Poetry can create "binaries" to add to the PATH when the project is installed.
|
||||
# They are specified in the form of a mapping with the command name as key and the function to execute as value.
|
||||
|
||||
# If you are building a library, comment this.
|
||||
# If you are building an application, replace PACKAGE-NAME and PACKAGE_NAME with your package name in kebab-case and snake_case respectively.
|
||||
|
||||
PACKAGE-NAME = "PACKAGE_NAME.__main__:main"
|
||||
|
||||
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
##########################
|
||||
# Dependencies #
|
||||
##########################
|
||||
# A mapping of dependencies of the project
|
||||
# It should be maintained by `poetry add` / `poetry remove`, but it currently adds things after all comments...
|
||||
# You can manually specify allowed version numbers:
|
||||
# * means "any release"
|
||||
# * → any
|
||||
# ^X.X.X means "newer releases with this major version"
|
||||
# ^3.10.1 → == 3 && >= 3.10.1
|
||||
# ~X.X.X means "newer releases with this minor version"
|
||||
# ~3.10.1 → == 3.10 && >= 3.10.1
|
||||
# nothing means "this specific release"
|
||||
# 3.10.1 → == 3.10.1
|
||||
|
||||
python = "^3.10"
|
||||
|
||||
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
##############################
|
||||
# Development dependencies #
|
||||
##############################
|
||||
# Same as above, but these dependencies are installed only if the project is being installed in development mode.
|
||||
# They are excluded from the final build.
|
||||
|
||||
Sphinx = "^4.3.2"
|
||||
sphinx-rtd-theme = "^1.0.0"
|
||||
pytest = "^6.2.5"
|
||||
pytest-github-actions-annotate-failures = "^0.1.6"
|
||||
pytest-cov = "^3.0.0"
|
||||
|
||||
|
||||
|
||||
[tool.poetry.extras]
|
||||
####################
|
||||
# Package extras #
|
||||
####################
|
||||
# ADVANCED: specify optional dependency groups.
|
||||
# See: https://python-poetry.org/docs/pyproject/#extras
|
||||
|
||||
|
||||
|
||||
[tool.poetry.plugins]
|
||||
#####################
|
||||
# Poetry plugins #
|
||||
#####################
|
||||
# ADVANCED: extend Poetry's functionality.
|
||||
# See: https://python-poetry.org/docs/pyproject/#plugins
|
||||
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
#########################
|
||||
# Pytest configuration #
|
||||
#########################
|
22
template-poetry.iml
Normal file
22
template-poetry.iml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/PACKAGE_NAME" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/PACKAGE_NAME/tests" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/docs/source" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/docs/source/_static" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/docs/build" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_FOLDERS">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/docs/source/_templates" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in a new issue