Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pyci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ jobs:
run: make lint
- name: Run tests
run: make test
- name: Run doctests
run: make doctest
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ lint:
test:
@uv run pytest test

check: install lint test
doctest:
@uv run pytest --doctest-glob='*.md' README.md

check: install lint test doctest

build:
@uv build

publish: build
@uv publish --trusted-publishing always

.PHONY: install lint test check build publish
.PHONY: install lint test doctest check build publish
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ pip install hexlet-points

## Usage example

<!-- This code will be doctested. Do not touch the markup! -->

from hexlet import points
p = points.make(100, 200)
print(points.to_string(p)) # (100, 200)
points.get_x(p) # 100
points.get_y(p) # 200
points.get_quadrant(p) # 1
```python
>>> from hexlet import points
>>> p = points.make(100, 200)
>>> print(points.to_string(p))
(100, 200)
>>> points.get_x(p)
100
>>> points.get_y(p)
200
>>> points.get_quadrant(p)
1

```

---

Expand Down