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
10 changes: 4 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
path: ~/.cache/pip
key: ${{ hashFiles('requirements/requirements-test.txt') }}
enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-test.txt
run: uv pip install --system -r requirements/requirements-test.txt
- name: Run black to review standard code format
run: |
# Checks if need to reformat files
Expand Down
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,35 +410,45 @@ data3, next_request3 = next_request2()

## Local Development

This project uses [uv](https://docs.astral.sh/uv/) for fast dev setup. Install
uv first (see the [uv docs](https://docs.astral.sh/uv/getting-started/installation/)).

```shell
git clone https://github.com/bisonai/datamaxi-python.git
cd datamaxi-python
pip install -r requirements/common.txt

# Create a virtual environment and install dev dependencies
# (requirements-dev.txt pulls in the test and docs stacks).
uv venv
uv pip install -r requirements/requirements-dev.txt

# For runtime dependencies only:
# uv pip install -r requirements/common.txt
```

## Tests

```shell
# Install test dependencies
pip install -r requirements/requirements-test.txt
# Install test dependencies (skip if you already ran the dev install above)
uv pip install -r requirements/requirements-test.txt

# Run unit tests (no API key required)
python -m pytest tests/test_api.py -v
uv run pytest tests/test_api.py -v

# Run integration tests (requires API key)
export DATAMAXI_API_KEY="your_api_key"
python -m pytest tests/test_integration.py -v
uv run pytest tests/test_integration.py -v

# Test specific endpoint groups using markers
python -m pytest tests/test_integration.py -m "cex" -v
python -m pytest tests/test_integration.py -m "funding" -v
python -m pytest tests/test_integration.py -m "premium" -v
python -m pytest tests/test_integration.py -m "forex" -v
python -m pytest tests/test_integration.py -m "telegram" -v
python -m pytest tests/test_integration.py -m "naver" -v
uv run pytest tests/test_integration.py -m "cex" -v
uv run pytest tests/test_integration.py -m "funding" -v
uv run pytest tests/test_integration.py -m "premium" -v
uv run pytest tests/test_integration.py -m "forex" -v
uv run pytest tests/test_integration.py -m "telegram" -v
uv run pytest tests/test_integration.py -m "naver" -v

# Run all tests
python -m pytest tests/ -v
uv run pytest tests/ -v
```

## Links
Expand Down
Loading