Skip to content

Commit 7ff8047

Browse files
Merge branch 'master' of github.com:Transparency-Information-Language/python-tilt
2 parents 35e724d + 41bb3b3 commit 7ff8047

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

.github/workflows/python-app.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python 3.8
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.8
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install flake8 pytest
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
- name: Lint with flake8
29+
run: |
30+
# stop the build if there are Python syntax errors or undefined names
31+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34+
# - name: Test with pytest
35+
# run: |
36+
# pytest
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Successfully installed tilt-0.0.1
2020

2121
## Basic usage
2222

23-
See here for an [interactive playground](https://nbviewer.jupyter.org/github/Transparency-Information-Language/python-tilt/blob/master/python-tilt-example.ipynb), that you can run in a Juypter notebook.
23+
See here for an interactive playground [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Transparency-Information-Language/python-tilt/master?filepath=python-tilt-example.ipynb), in which you can run python-tilt in a Juypter notebook.
24+
2425

2526
1) Import the transparency information language binding/library.
2627
2) Create your first object, e.g. a Data Protection Officer with their contact details.

0 commit comments

Comments
 (0)