@@ -12,6 +12,22 @@ The core `AFKParser` uses [parsedatetime](https://pypi.org/project/parsedatetime
1212- "afk on monday"
1313
1414
15+ ## Table of contents
16+
17+ - [ Features] ( #features )
18+ - [ Installation] ( #installation )
19+ - [ Quick start] ( #quick-start )
20+ - [ Supported phrase patterns] ( #supported-phrase-patterns-examples )
21+ - [ Development] ( #development )
22+ - [ Testing] ( #testing )
23+ - [ Project structure] ( #project-structure )
24+ - [ API reference] ( #api-reference )
25+ - [ Requirements] ( #requirements )
26+ - [ Limitations and notes] ( #limitations-and-notes )
27+ - [ Contributing] ( #contributing )
28+ - [ License] ( #license )
29+
30+
1531### Features
1632
1733- ** Natural language parsing** powered by [ parsedatetime] ( https://pypi.org/project/parsedatetime/ )
@@ -22,25 +38,26 @@ The core `AFKParser` uses [parsedatetime](https://pypi.org/project/parsedatetime
2238
2339## Installation
2440
25- ### From source (recommended until first PyPI release)
41+ ### From source
2642
2743``` bash
2844git clone https://github.com/astr0n0mer/afk_parser.git
2945cd afk_parser
30- python -m venv .venv && . .venv/bin/activate
31- pip install -r requirements.txt
46+ uv sync
3247```
3348
34- For development (linters, tests, tooling):
49+ This creates a local ` .venv ` and installs the package with its locked dependencies.
50+
51+ For runtime dependencies only:
3552
3653``` bash
37- make install_dev
54+ uv sync --no-dev
3855```
3956
4057### From PyPI (once published)
4158
4259``` bash
43- pip install afk_parser
60+ uv add afk-parser
4461```
4562
4663
7491Run the helper script with your phrase. It automatically infers your local UTC offset.
7592
7693``` bash
77- python main.py " afk from 5pm"
94+ uv run python main.py " afk from 5pm"
7895```
7996
8097Example output (two lines; ISO-8601 repr may vary):
@@ -100,24 +117,30 @@ These examples are covered by tests and illustrate the behavior. Actual values d
100117
101118## Development
102119
103- This repository includes a ` Makefile ` to simplify common tasks. Use a virtual environment .
120+ Use ` uv ` to scaffold the environment and install dependencies from ` pyproject.toml ` and ` uv.lock ` .
104121
105122``` bash
106- python -m venv .venv
107- . .venv/bin/activate
123+ # Install runtime + dev dependencies
124+ uv sync
108125
109- # Install runtime deps
110- make install
111-
112- # Install dev deps (pytest, ruff, pyright, etc.)
113- make install_dev
126+ # Install runtime dependencies only
127+ uv sync --no-dev
114128```
115129
116130Useful commands:
117131
118- - ` make requirements ` — regenerate ` requirements.txt ` and ` requirements-dev.txt ` from ` requirements.in ` files
119- - ` make install ` — install runtime dependencies
120- - ` make install_dev ` — install runtime + dev dependencies
132+ - ` uv sync ` — create/update ` .venv ` with runtime and dev dependencies
133+ - ` uv sync --no-dev ` — install runtime dependencies only
134+ - ` uv sync --upgrade ` — upgrade locked dependencies
135+ - ` uv run python main.py "afk from 5pm" ` — run the source CLI
136+ - ` uv run pytest ./afk_parser/tests -vv ` — run the test suite
137+ - ` uv run pyright . ` — run type checks
138+ - ` uv run ruff format . ` — format the codebase
139+
140+ The ` Makefile ` wraps the same common tasks if you prefer ` make ` :
141+
142+ - ` make install ` — run ` uv sync --no-dev `
143+ - ` make install_dev ` — run ` uv sync `
121144- ` make test ` — run the test suite
122145- ` make lint ` — run type checks with Pyright
123146- ` make format ` — format with Ruff
@@ -128,14 +151,13 @@ Useful commands:
128151Run the full test suite:
129152
130153``` bash
131- make test
154+ uv run pytest ./afk_parser/tests -vv
132155```
133156
134- Or directly via pytest :
157+ Or via the Makefile :
135158
136159``` bash
137- . .venv/bin/activate
138- python -m pytest ./afk_parser/tests -vv
160+ make test
139161```
140162
141163
@@ -150,7 +172,8 @@ afk_parser/
150172 test_afk_parser.py
151173 main.py # Simple CLI wrapper (from source)
152174 Makefile # Dev tasks (install, test, lint, format)
153- requirements*.txt
175+ pyproject.toml # Project metadata and dependencies
176+ uv.lock # Locked dependency versions
154177 setup.py
155178```
156179
@@ -169,8 +192,9 @@ class AFKParser:
169192
170193# # Requirements
171194
172- - Python 3.10 +
173- - `parsedatetime` (installed via requirements)
195+ - Python 3.14 +
196+ - `uv`
197+ - `parsedatetime` (installed by `uv sync` )
174198
175199
176200# # Limitations and notes
@@ -185,14 +209,12 @@ class AFKParser:
185209Issues and PRs are welcome. Before opening a PR , please:
186210
187211```bash
188- make format
189- make lint
190- make test
212+ uv run ruff format .
213+ uv run pyright .
214+ uv run pytest . / afk_parser / tests - vv
191215```
192216
193217
194218# # License
195219
196220MIT © Imran Khan. See [LICENSE ](./ LICENSE ) for details.
197-
198-
0 commit comments