Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 2.17 KB

CONTRIBUTING.md

File metadata and controls

79 lines (57 loc) · 2.17 KB

Contributing to the Jungle Scout Python SDK

We welcome contributions from the community. Please read the following guidelines before contributing to the project.

Getting Started

Project Setup and Running Tests

# install supported versions of python
pyenv install

# install packaging and build tools
pipx install tox
pipx install poetry

# install project dependencies
poetry install

# run all tests
tox run

Testing

This project uses pytest as the testing framework and tox as the test runner. testing. To run the tests, use the following commands:

# run all tests
tox run

# generate documentation
tox -e docs

# run specific tests with pytest directly using the default poetry environment
poetry run pytest tests -m "not integration" tests/models/requests/test_keyword_by_asins_request.py

# run integration tests using the default poetry environment
poetry run pytest tests -m "integration"

Note, running integration tests requires a .env file at the root of this project with real API keys.

# create a .env file from the template used for testing
cp .env.test .env

Then, add your real Jungle Scout API keys to the .env file:

API_KEY_NAME="real_api_key_name"
API_KEY="real_api_key"

Code Formatting

This project uses black for code formatting, isort for import sorting and ruff as a linter. If you are using VSCode, you can install the following extensions:

You'd also need to add the following settings to your settings.json:

 "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.organizeImports": true,
      "source.fixAll": true
    }
  },
  "isort.args": ["--profile", "black"]