-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Iván Andrés L. edited this page Dec 16, 2024
·
8 revisions
We welcome contributions to this project! Follow these steps to contribute:
git clone https://github.com/andrextor/python-checkout.git
cd python-checkout
Ensure Poetry is installed on your system:
curl -sSL https://install.python-poetry.org | python3 -
Install the required dependencies using Poetry:
poetry install --no-root
By default, Poetry creates virtual environments in a central location: ~/.cache/pypoetry/virtualenvs/
If you prefer project-specific environments (e.g., ./.venv), configure Poetry to do so:
poetry config virtualenvs.in-project true
poetry shell
To run tests and check coverage:
poetry run pytest --cov=checkout --cov-report=html
Use the following commands to ensure your code adheres to the project’s style guidelines:
poetry run black .
poetry run flake8
poetry run isort .
Run type checks using mypy:
poetry run mypy src
To add new dependencies:
poetry add <package_name>
poetry add --group dev <package_name>
The project is organized as follows:
- entities: Core models like Settings, Authentication, and payment-related entities (Amount, Transaction, etc.).
- messages: Handles request and response objects for PlaceToPay interactions.
- exceptions: Custom exception handling for the library.
- clients: HTTP client interactions, including RestCarrier.
- contracts: Interfaces for reusable components.
- tests: Unit tests to ensure the library’s functionality.