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

Moving to pyproject.toml using uv #issue 27 #42

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
26 changes: 17 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install UV
uses: astral-sh/setup-uv@v3
- name: Install project
run: make install
run: uv sync --all-extras --dev
- name: Run linter
run: make lint
run: uv run task lint

tests_linux:
needs: linter
Expand All @@ -44,10 +46,12 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install UV
uses: astral-sh/setup-uv@v3
- name: Install project
run: make install
run: uv sync --all-extras --dev
- name: Run tests
run: make test
run: uv run task test
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
# with:
Expand All @@ -66,10 +70,12 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install UV
uses: astral-sh/setup-uv@v3
- name: Install project
run: make install
run: uv sync --all-extras --dev
- name: Run tests
run: make test
run: uv run task test

tests_win:
needs: linter
Expand All @@ -86,7 +92,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Pip
run: pip install --user --upgrade pip
- name: Install UV
run: pip install uv
- name: Install project
run: pip install -e .[test]
- name: run tests
run: pytest -s -vvvv -l --tb=long tests
run: uv sync --all-extras --dev
- name: Run tests
run: uv run task test
122 changes: 0 additions & 122 deletions Makefile

This file was deleted.

59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "project_name"
version = "0.1.0"
description = "project_description"
readme = "README.md"
requires-python = ">=3.8"
authors = [
{ name = "author_name", email = "[email protected]" }
]
dependencies = [
"ruff>=0.7.1",
]

[project.urls]
homepage = "https://github.com/author_name/project_urlname/"

# Dependências de produção (adicione suas dependências aqui quando necessário)
[dependency-groups]
dev = []

# Scripts de entrada
[project.scripts]
project_name = "project_name.__main__:main"

# Dependências opcionais para desenvolvimento e testes
[project.optional-dependencies]
test = [
"pip-tools",
"pytest",
"coverage",
"flake8",
"black",
"isort",
"pytest-cov",
"mypy",
"gitchangelog",
]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q -vv"
pythonpath = ["/tests"]

[tool.ruff]
line-length = 79
indent-width = 4
target-version = "py310"

[tool.taskipy.tasks]
lint = "uvx ruff check tests"
test = """
uv run --extra test pytest -s
uv run --extra test coverage xml
uv run --extra test coverage html
"""
10 changes: 0 additions & 10 deletions requirements-test.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

Loading