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
19 changes: 16 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
pull_request:

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: ruff format --check
run: uv run ruff check
- name: ruff check
run: uv run ruff check

test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -13,18 +26,18 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .

- name: Run tests with pytest
run: |
pytest tests/ -v --cov=barte --cov-report=xml
24 changes: 21 additions & 3 deletions barte/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
from .client import BarteClient
from .models import (
Charge, CardToken, Refund, InstallmentOptions, PixCharge,
Customer, InstallmentSimulation, PixQRCode
Charge,
CardToken,
Refund,
InstallmentOptions,
PixCharge,
Customer,
InstallmentSimulation,
PixQRCode,
)

__version__ = "0.1.0"
__version__ = "0.1.0"

__all__ = [
"BarteClient",
"Charge",
"CardToken",
"Refund",
"InstallmentOptions",
"PixCharge",
"Customer",
"InstallmentSimulation",
"PixQRCode",
]
2 changes: 1 addition & 1 deletion examples/basic_usage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from barte import BarteClient, Charge, PixCharge
from barte import BarteClient

def main():
# Initialize the client
Expand Down
2 changes: 1 addition & 1 deletion examples/card_token_example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from barte import BarteClient, CardToken, Charge
from barte import BarteClient

def main():
# Initialize the client
Expand Down
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ authors = [{ name = "Thiago Avelino", email = "thiago.avelino@buser.com.br" },
{ name = "Walison Filipe", email = "walison.filipe@buser.com.br" },
{ name = "Marcos Grandesso", email = "marcos.viana@buser.com.br" },
]
dependencies = ["requests>=2.3,<3",
"dacite==1.9.2",
"python-dateutil>=2.8.0,<3"
]
dependencies = [
"requests>=2.3,<3",
"dacite==1.9.2",
"python-dateutil>=2.8.0,<3",
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
Expand All @@ -24,5 +25,6 @@ dev-dependencies = [
"pytest>=7.0.0",
"requests-mock>=1.10.0",
"pytest-cov>=4.0.0",
"python-dateutil>=2.8.0"
"python-dateutil>=2.8.0",
"ruff>=0.9.5",
]
Loading