Setup Python project template.
This commit is contained in:
parent
e7b7ee181b
commit
6329d05bfe
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,5 @@
|
|||||||
|
/.*
|
||||||
|
/*.egg-info
|
||||||
website-output
|
website-output
|
||||||
|
__pycache__
|
||||||
|
coverage.xml
|
||||||
|
0
gsitegen/__init__.py
Normal file
0
gsitegen/__init__.py
Normal file
32
setup.py
Normal file
32
setup.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="gsitegen",
|
||||||
|
author="Govindas",
|
||||||
|
author_email="govindas@govindas.invalid",
|
||||||
|
description="File and message encryption GUI and CLI",
|
||||||
|
long_description=open("README.md").read(),
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="https://git.limework.net/Govindas/SiteGenerator",
|
||||||
|
use_scm_version=True,
|
||||||
|
setup_requires=["setuptools_scm"],
|
||||||
|
packages=find_packages(),
|
||||||
|
python_requires=">=3.8",
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: Public Domain",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
],
|
||||||
|
install_requires=[
|
||||||
|
"html5tagger>=1.1.0",
|
||||||
|
"markdown>=3.3.6",
|
||||||
|
],
|
||||||
|
extras_require={
|
||||||
|
"test": ["pytest", "pytest-sugar", "pytest-mock", "coverage", "mypy", "bandit", "types-Markdown"],
|
||||||
|
"dev": ["tox", "isort", "yapf"],
|
||||||
|
},
|
||||||
|
include_package_data=True,
|
||||||
|
entry_points=dict(
|
||||||
|
console_scripts=["gsitegen = gsitegen.generate:main"],
|
||||||
|
),
|
||||||
|
)
|
7
tests/test_generate.py
Normal file
7
tests/test_generate.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from gsitegen.generate import *
|
||||||
|
from html5tagger import E
|
||||||
|
|
||||||
|
def test_something():
|
||||||
|
doc = E()
|
||||||
|
parseMarkdown(doc, "## Heading 2")
|
||||||
|
assert str(doc) == "<h2>Heading 2</h2>"
|
31
tox.ini
Normal file
31
tox.ini
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[tox]
|
||||||
|
envlist = clean, py39, py310, coverage, security, type-checking
|
||||||
|
|
||||||
|
[coverage:run]
|
||||||
|
include = gsitegen/*.py
|
||||||
|
branch = true
|
||||||
|
|
||||||
|
[testenv:clean]
|
||||||
|
whitelist_externals = rm
|
||||||
|
commands =
|
||||||
|
rm -f .coverage
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
usedevelop = true
|
||||||
|
extras = test
|
||||||
|
commands =
|
||||||
|
coverage run --append -m pytest {posargs:tests}
|
||||||
|
|
||||||
|
[testenv:coverage]
|
||||||
|
commands =
|
||||||
|
coverage report -i
|
||||||
|
coverage html -i
|
||||||
|
coverage xml -i
|
||||||
|
|
||||||
|
[testenv:type-checking]
|
||||||
|
commands =
|
||||||
|
mypy gsitegen --ignore-missing-imports
|
||||||
|
|
||||||
|
[testenv:security]
|
||||||
|
commands =
|
||||||
|
bandit --recursive gsitegen --skip B101
|
Loading…
Reference in New Issue
Block a user