Skip to content

Commit

Permalink
Merge pull request #82 from UCL-ARC/80-packaging
Browse files Browse the repository at this point in the history
80 packaging
  • Loading branch information
shiyingwucl authored Jan 17, 2025
2 parents 606bbfe + 71e46e5 commit f9479fc
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -e .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tests/shortlist.pickle
.pytest_cache/
.ruff_cache/
shortlister/*.ipynb
ranked.pickle
ranked.pickle
dist/
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "shortlister"
description = "Tool to assist with shortlisting applications"
version = "0.1.0"
dependencies = ["PyMuPDF==1.24.13",
"pytest==8.3.3",
"readchar==4.2.0",
"ruff==0.7.3",
"tabulate==0.9.0",
"universal-startfile==0.2",
"pyreadline3==3.5.4",
"pathvalidate==3.2.3",
"openpyxl==3.1.5"]

[tool.hatch.build.targets.wheel]
packages = [
"src/shortlister",
]

[project.scripts]
shortlist = "shortlister.main:run"
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions shortlister/main.py → src/shortlister/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def run_controller(wv_window: webview.Window=None):
if wv_window is not None:
wv_window.destroy()


if cli_args.webview and webview is not None:
window = setup_webview()
webview.start(run_controller, args=[window])
else:
run_controller(None)
def run():
if cli_args.webview and webview is not None:
window = setup_webview()
webview.start(run_controller, args=[window])
else:
run_controller(None)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f9479fc

Please sign in to comment.