Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

80 packaging #82

Merged
merged 15 commits into from
Jan 17, 2025
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.
Loading