Skip to content

Commit 88c76f4

Browse files
committed
Update project setup #77
1 parent 28a5904 commit 88c76f4

23 files changed

Lines changed: 1894 additions & 1511 deletions

.github/workflows/python-package.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/python-unittest.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,23 @@ jobs:
2323
uses: actions/setup-python@v4.7.0
2424
with:
2525
python-version: '3.x'
26-
- name: Install dependencies
26+
27+
- name: Install Poetry
2728
run: |
28-
python -m pip install --upgrade pip
29-
python -m pip install --no-cache-dir -r requirements.txt
29+
pip install poetry
30+
poetry config virtualenvs.create false # Skip creating a virtual environment
31+
env:
32+
POETRY_HOME: ${{ github.workspace }}/.poetry
33+
34+
- name: Install project dependencies
35+
run: |
36+
poetry install
37+
env:
38+
POETRY_HOME: ${{ github.workspace }}/.poetry
3039

3140
- name: Run unittests
3241
run: |
33-
python -m unittest ChurchToolsApi.test_ChurchToolsApi
42+
python -m unittest tests.test_churchtools_api
43+
env:
44+
POETRY_HOME: ${{ github.workspace }}/.poetry
45+

.github/workflows/release.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Create Release
22
on:
33
push:
4-
branches:
5-
- dev_benste
6-
- master
7-
pull_request:
8-
branches:
9-
- dev_benste
10-
- master
4+
tags:
5+
- '*'
6+
117
jobs:
128
build:
139
runs-on: ubuntu-latest
@@ -16,20 +12,31 @@ jobs:
1612
uses: actions/checkout@v3
1713

1814
- name: Version from Python
19-
run: echo "VERSION=$(python3 -c 'import versions; print(versions.VERSION)')" >> $GITHUB_ENV
15+
run: echo "VERSION=$(python3 -c 'import version; print(version.VERSION)')" >> $GITHUB_ENV
2016

2117
- name: Set up Python
2218
uses: actions/setup-python@v4.6.1
2319
with:
2420
python-version: 3.x
2521

26-
- name: Install dependencies
22+
- name: Install Poetry
2723
run: |
28-
python -m pip install --upgrade pip
29-
pip install setuptools wheel
24+
pip install poetry
25+
poetry config virtualenvs.create false # Skip creating a virtual environment
26+
env:
27+
POETRY_HOME: ${{ github.workspace }}/.poetry
3028

31-
- name: Run setup.py
32-
run: python setup.py sdist bdist_wheel
29+
- name: Install project dependencies
30+
run: |
31+
poetry install
32+
env:
33+
POETRY_HOME: ${{ github.workspace }}/.poetry
34+
35+
- name: Build package
36+
run: |
37+
poetry build
38+
env:
39+
POETRY_HOME: ${{ github.workspace }}/.poetry
3340

3441
- name: Create Release
3542
uses: ncipollo/release-action@v1.12.0

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ dmypy.json
134134
# Pyre type checker
135135
.pyre/
136136

137-
# User sessions
138-
flask_session
139137

140138
# Pycharm Run Configurations
141-
/run_configs/
139+
/run_configs/
140+
141+
# Poetry package lock for builds
142+
poetry.lock

.vscode/settings.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
"python.testing.unittestArgs": [
33
"-v",
44
"-s",
5-
".",
5+
"./tests",
66
"-p",
7-
"test*.py"
7+
"test_*.py"
88
],
99
"python.testing.pytestEnabled": false,
10-
"python.testing.unittestEnabled": true
10+
"python.testing.unittestEnabled": true,
11+
"[python]": {
12+
"editor.defaultFormatter": "ms-python.autopep8",
13+
"editor.formatOnSave": true
14+
},
15+
"python.formatting.provider": "none"
1116
}

0 commit comments

Comments
 (0)