-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (120 loc) · 3.77 KB
/
pyproject.toml
File metadata and controls
142 lines (120 loc) · 3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# see https://github.com/karlicoss/pymplate for up-to-date reference
[project]
dynamic = ["version"] # version is managed by build backend
name = "promnesia"
dependencies = [
"platformdirs", # for portable user directories detection
"tzlocal", # guessling local timezone
"more_itertools",
"typing-extensions",
"sqlalchemy>=2.0", # DB api
##
# NOTE: ideally we don't need to install them by default?
# i.e. server and indexer can run on different hosts/containers etc
# keeping here for backwards compatibility for now
"promnesia[indexer]",
"promnesia[server]",
##
]
requires-python = ">=3.12"
## these are only useful for pypi
description = "Enhancement of your browsing history"
license = {file = "LICENSE"}
authors = [{name = "Dima Gerasimov (@karlicoss)", email = "karlicoss@gmail.com"}]
maintainers = [{name = "Dima Gerasimov (@karlicoss)", email = "karlicoss@gmail.com"}]
[project.urls]
Homepage = "https://github.com/karlicoss/promnesia"
##
[project.optional-dependencies]
indexer = [
# indexer only dependencies
"urlextract",
]
server = [
# server only dependencies
"fastapi",
"uvicorn[standard]",
]
optional = [
# dependencies that bring some bells & whistles
"logzero" , # pretty colored logging
"python-magic", # better mimetype decetion
]
HPI = [
# dependencies for https://github.com/karlicoss/HPI
"HPI", # pypi version
# TODO add notes how to override with github version?
]
html = [
# dependencies for sources.html
"beautifulsoup4", # extracting links from the page
"lxml" , # bs4 backend
]
markdown = [
# dependencies for sources.html
"mistletoe",
]
org = [
# dependencies for sources.org
"orgparse>=0.3.0",
]
telegram = [
# used to depend on 'dataset', keeping for backwards compatibility
]
all = [
"promnesia[indexer,server,optional,HPI,html,markdown,org]",
]
[dependency-groups]
# TODO: not sure, on the one hand could just use 'standard' dev dependency group
# On the other hand, it's a bit annoying that it's always included by default?
# To make sure it's not included, need to use `uv run --exact --no-default-groups ...`
testing = [
"pytest>=9", # need version 9 for proper namespace package support
"ruff",
"hypothesis",
"psutil",
"requests",
# NOTE: markdown is only used for test_cli... might be nice to decouple
"promnesia[markdown]",
]
testing-all = [
"promnesia[all]",
{ include-group = "testing" },
]
testing-end2end = [
"selenium", # browser automations
"loguru", # used in addon_helper... not sure if should just use promnesia's logger?
"click", # confirmations for end2end test
"pyautogui", # for keyboard automation during end2end tests
"ipdb" , # optional but a bit nicer for breakpoints
"pytest-timeout", # for PYTEST_TIMEOUT env variable
"pytest-xdist" , # not used atm, but helpful to parallelise end2end tests
"pytest-repeat" , # helpful to debug flaky tests
{ include-group = "testing-all" },
]
typecheck = [
"mypy",
"lxml", # for mypy html coverage
"ty>=0.0.29",
"types-requests",
"types-psutil",
{ include-group = "testing" },
]
typecheck-all = [
"types-PyAutoGUI",
{ include-group = "typecheck" },
{ include-group = "testing-end2end" },
]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# unfortunately have to duplicate project name here atm, see https://github.com/pypa/hatch/issues/1894
[tool.hatch.build.targets.wheel]
packages = ["src/promnesia"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
version_scheme = "python-simplified-semver"
local_scheme = "dirty-tag"
[project.scripts]
promnesia = "promnesia.__main__:main"