Skip to content

Commit f9479fc

Browse files
authored
Merge pull request #82 from UCL-ARC/80-packaging
80 packaging
2 parents 606bbfe + 71e46e5 commit f9479fc

File tree

10 files changed

+34
-7
lines changed

10 files changed

+34
-7
lines changed

.github/workflows/python-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade pip
3131
python -m pip install flake8 pytest
32+
pip install -e .
3233
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3334
- name: Lint with flake8
3435
run: |

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ tests/shortlist.pickle
66
.pytest_cache/
77
.ruff_cache/
88
shortlister/*.ipynb
9-
ranked.pickle
9+
ranked.pickle
10+
dist/

pyproject.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "shortlister"
7+
description = "Tool to assist with shortlisting applications"
8+
version = "0.1.0"
9+
dependencies = ["PyMuPDF==1.24.13",
10+
"pytest==8.3.3",
11+
"readchar==4.2.0",
12+
"ruff==0.7.3",
13+
"tabulate==0.9.0",
14+
"universal-startfile==0.2",
15+
"pyreadline3==3.5.4",
16+
"pathvalidate==3.2.3",
17+
"openpyxl==3.1.5"]
18+
19+
[tool.hatch.build.targets.wheel]
20+
packages = [
21+
"src/shortlister",
22+
]
23+
24+
[project.scripts]
25+
shortlist = "shortlister.main:run"
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def run_controller(wv_window: webview.Window=None):
3333
if wv_window is not None:
3434
wv_window.destroy()
3535

36-
37-
if cli_args.webview and webview is not None:
38-
window = setup_webview()
39-
webview.start(run_controller, args=[window])
40-
else:
41-
run_controller(None)
36+
def run():
37+
if cli_args.webview and webview is not None:
38+
window = setup_webview()
39+
webview.start(run_controller, args=[window])
40+
else:
41+
run_controller(None)

0 commit comments

Comments
 (0)