a0a2db7c32
* wip: reformatting for pypi * wip: missing setup fields, meta * wip: fix classifiers
33 lines
598 B
Python
33 lines
598 B
Python
from invoke import Collection, task
|
|
|
|
|
|
@task
|
|
def format_all(ctx):
|
|
ctx.run("black src *.py")
|
|
|
|
|
|
@task
|
|
def typecheck(ctx):
|
|
ctx.run("mypy src")
|
|
|
|
|
|
@task
|
|
def package(ctx):
|
|
ctx.run("rm -rf dist && python setup.py sdist bdist_wheel")
|
|
|
|
|
|
@task(optional=["test"])
|
|
def publish(ctx, test=False):
|
|
if test:
|
|
ctx.run(
|
|
"twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*"
|
|
)
|
|
else:
|
|
ctx.run("twine upload dist/*")
|
|
|
|
|
|
ns = Collection()
|
|
ns.add_task(format_all, name="format")
|
|
ns.add_task(typecheck)
|
|
ns.add_task(package)
|
|
ns.add_task(publish)
|