Skip to content

Commit

Permalink
Add more types
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Jun 23, 2022
1 parent f4f22ed commit 02ce963
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Build and Publish to PyPI

on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /

jobs:
build-n-publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v2
- name: Setup Python3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build
run: python setup.py sdist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# https://hynek.me/articles/python-github-actions/
name: Test

on:
push:
branches: ['master']
pull_request:
branches: ['master']
workflow_dispatch:

jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
- name: Run tox targets for ${{ matrix.python-version }}
run: python -m tox
9 changes: 9 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
python:
version: "3.8"
install:
- requirements: doc/requirements.txt
- requirements: requirements.txt
- method: setuptools
path: .
system_packages: true
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"restructuredtext.syntaxHighlighting.disabled": true
"restructuredtext.syntaxHighlighting.disabled": true,
"esbonio.sphinx.confDir": ""
}
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sphinx==5.0.2
3 changes: 2 additions & 1 deletion tmep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from tmep import template
from tmep._version import get_versions

__version__ = get_versions()['version']

__version__: str = get_versions()['version']
del get_versions

doc
Expand Down

0 comments on commit 02ce963

Please sign in to comment.