Skip to content
Merged

Uv #16

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
4 changes: 0 additions & 4 deletions .github/workflows/pyci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# we want to test our package on several versions of Python
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__pycache__
dist/
*.pyc
.venv/
.venv
.coverage
coverage.xml
.pytest_cache/
*_cache/
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
install:
poetry install

run:
uv run hexlet-python-package

test:
poetry run pytest

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ This project was built using these tools:

---

### Setup

```bash
make install
```


### Run tests

```bash
make test
```

[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=python-package)

This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=python-package).
Expand Down
2 changes: 2 additions & 0 deletions hexlet_python_package/half.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def half(num):
return num / 2
Empty file.
11 changes: 0 additions & 11 deletions hexlet_python_package/scripts/hexlet_python_package.py

This file was deleted.

11 changes: 11 additions & 0 deletions hexlet_python_package/scripts/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sys

from hexlet_python_package.half import half


def main():
print(half(float(sys.argv[-1])))


if __name__ == "__main__":
main()
22 changes: 0 additions & 22 deletions hexlet_python_package/user.py

This file was deleted.

16 changes: 7 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.2"
pytest-cov = "^4.1.0"
flake8 = "^6.1.0"

[tool.poetry.scripts]
hexlet-python-package = "hexlet_python_package.scripts.hexlet_python_package:main"
[project.scripts]
hexlet-python-package = "hexlet_python_package.scripts.main:main"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["hexlet_python_package"]
9 changes: 9 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
line-length = 80

[lint.per-file-ignores]
# init modules can contain the local imports, logic, unused imports
"__init__.py" = ["F401"]

[lint]
preview = true
select = ["E", "F", "I"]
23 changes: 0 additions & 23 deletions setup.cfg

This file was deleted.

5 changes: 5 additions & 0 deletions tests/test_half.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from hexlet_python_package.half import half


def test_half():
assert half(6) == 3
16 changes: 0 additions & 16 deletions tests/test_users.py

This file was deleted.

151 changes: 151 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

Loading