Skip to content

Commit bdf1f16

Browse files
poetry 1 -> 2
1 parent 6bca246 commit bdf1f16

File tree

5 files changed

+51
-74
lines changed

5 files changed

+51
-74
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 44 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
2-
"name": "poetry3-poetry-pyenv",
3-
"build": {
4-
"dockerfile": "Dockerfile"
5-
},
6-
2+
"name": "Python-Poetry",
3+
"image": "debian:trixie",
4+
75
"customizations": {
86
"vscode": {
97
"extensions":[
@@ -12,8 +10,15 @@
1210
"matangover.mypy",
1311
"streetsidesoftware.code-spell-checker-portuguese-brazilian",
1412
"yzhang.markdown-all-in-one",
15-
"ritwickdey.LiveServer"
13+
"ritwickdey.LiveServer",
14+
"twixes.pypi-assistant",
15+
"GitHub.vscode-github-actions"
1616
]
1717
}
18+
},
19+
"features": {
20+
"ghcr.io/devcontainers/features/python:1": {},
21+
"ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {},
22+
"ghcr.io/devcontainers-extra/features/poetry:2": {}
1823
}
1924
}

.github/workflows/testes.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.10", "3.11", "3.12"] # versões que recebem suporte oficial do Python,
19-
# que possuem os recursos de typing que eu preciso para obrigar_tipos
20-
# 3.13 não incluída pois o pint ainda não suporta ela
18+
python-version: ["3.11", "3.12", "3.13"]
2119
os: [ubuntu-latest, windows-latest, macos-latest]
2220
runs-on: ${{ matrix.os }}
2321
steps:
@@ -28,22 +26,24 @@ jobs:
2826
uses: actions/setup-python@v3
2927
with:
3028
python-version: ${{ matrix.python-version }}
29+
30+
- name : Install Poetry
31+
uses: Gr1N/setup-poetry@v8
32+
with:
33+
poetry-version: "2.1.4"
3134

32-
- name: Install Poetry
33-
run: pip install poetry
34-
3535
- name: Install dependencies
36-
run: poetry install --without docs
36+
run: poetry self add poethepoet@0.37 && poetry install --without docs --no-root
3737

3838
- name: Testing code with pytest
3939
env:
4040
PYTHONIOENCODING: utf-8
41-
run: mkdir -p docs/images/ && poetry run pytest -vv -x -s --cov LabIFSC2/ --no-cov-on-fail --cov-branch --cov-report=xml
41+
run: poetry poe unit-tests
4242

43-
- name: Mypy
43+
- name: mypy
4444
env:
4545
PYTHONIOENCODING: utf-8
46-
run: poetry run python -m mypy LabIFSC2/
46+
run: poetry poe type-checking
4747

4848
- name: Upload coverage reports to Codecov
4949
uses: codecov/codecov-action@v5

docs/images/.gitkeep

Whitespace-only changes.

pyproject.toml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
requires = ["poetry-core"]
33
build-backend = "poetry.core.masonry.api"
44

5-
6-
[tool.poetry]
5+
[project]
76
name = "LabIFSC2"
87
version = "0.1.1"
98
description = "Cálculos de laboratório com Python, realize propagação de incertezas e conversão de medidas automaticamente"
10-
authors = ["viniciusdutra314 <dutravinisousa2@usp.br>"]
9+
authors = [{name="viniciusdutra314",email="dutravinisousa2@usp.br"},]
1110
license = "GNU General Public License v3.0"
1211
readme = "README.md"
1312
packages=[{include = "LabIFSC2"}]
13+
requires-python = ">=3.11"
1414
classifiers=[
1515
"Development Status :: 5 - Production/Stable",
1616
"Natural Language :: Portuguese (Brazilian)",
17-
"Programming Language :: Python :: 3.10",
1817
"Programming Language :: Python :: 3.11",
1918
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
2020
"Topic :: Scientific/Engineering",
2121
"Typing :: Typed",
2222
"Operating System :: OS Independent",
2323
"Intended Audience :: Science/Research",
2424
"Intended Audience :: Developers",
2525
]
2626
keywords=["LabIFSC","montecarlo","error_propagation","unit_conversion"]
27+
dependencies=[
28+
"numpy >= 2.0",
29+
"pint >=0.25"
30+
]
31+
2732

28-
[tool.poetry.urls]
33+
[project.urls]
2934
"Documentation" = "https://labifsc2.readthedocs.io/pt-br/latest/"
3035
"Github" = "https://github.com/viniciusdutra314/LabIFSC2"
3136
"Issue Tracker"="https://github.com/viniciusdutra314/LabIFSC2/issues"
3237

33-
[tool.poetry.dependencies]
34-
python = ">=3.10 , <3.13"
35-
numpy = ">= 1.26"
36-
pint = "^0.24"
37-
3838

3939
[tool.poetry.group.docs.dependencies]
4040
mkdocs-material = "^9.5.4"
@@ -53,7 +53,6 @@ scipy = "^1.15.1"
5353

5454

5555
[tool.poetry.group.linter.dependencies]
56-
taskipy = "^1.14.1"
5756
isort = "^5.13.2"
5857
mypy = "1.14.1"
5958

@@ -66,7 +65,24 @@ strict = false
6665
disallow_any_generics = false
6766
exclude = 'tests/.*'
6867

69-
[tool.taskipy.tasks]
70-
testes={ cmd="isort . && mypy LabIFSC2/ --exclude LabIFSC2/_tipagem_forte.py && pytest -vv -x -s --cov LabIFSC2/ --cov-append --no-cov-on-fail --cov-branch --cov-report=html "}
71-
docs="mkdocs serve"
68+
#all tasks
69+
70+
[tool.poetry.requires-plugins]
71+
poethepoet = ">=0.35"
72+
73+
[tool.poe.tasks.tests]
74+
help="Run the unit tests (pytest), a type checker (mypy) and a test coverage (ptytest-cov)"
75+
sequence = ["type-checking","unit-tests"]
76+
77+
[tool.poe.tasks.type-checking]
78+
help="Run a type checker (mypy)"
79+
cmd="mypy LabIFSC2/ --exclude LabIFSC2/_tipagem_forte.py"
80+
81+
[tool.poe.tasks.unit-tests]
82+
help="Run the unit tests (pytest)"
83+
cmd = "pytest -vv -x -s --cov LabIFSC2/ --cov-append --no-cov-on-fail --cov-branch --cov-report=html"
84+
85+
[tool.poe.tasks.docs]
86+
help="Create the documentation"
87+
cmd="mkdocs serve"
7288

0 commit comments

Comments
 (0)