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
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@

- [ ] I've updated the code style using `make codestyle`.
- [ ] I've written tests for all new methods and classes that I created.
- [ ] I've written the docstring in Google format for all the methods and classes that I used.
- [ ] I've written the docstring in Google format for all the methods and classes that I used.
- [ ] My commits follow the [Conventional Commits](https://www.conventionalcommits.org/) format (`fix:`, `feat:`, `chore:`, etc.).
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Python package
on:
push:
pull_request:
branches:
- main

Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![pages-build-deployment](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/pages/pages-build-deployment)

[![Publish to S3 PyPI](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/publish-s3.yml/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/publish-s3.yml)
[![Release Please](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/release-please.yml/badge.svg)](https://github.com/WFP-VAM/DataBridgesKnots/actions/workflows/release-please.yml)


This Python module allows you to get data from the WFP Data Bridges API, including household survey data, market prices, exchange rates, GORP (Global Operational Response Plan) data, and food security data (IPC equivalent). It is a wrapper for the [Data Bridges API Client](https://github.com/WFP-VAM/DataBridgesAPI), providing an easier way to data analysts to get VAM and monitoring data using their language of choice (Python, R and STATA).
Expand Down Expand Up @@ -206,13 +206,31 @@ $ make codestyle

### Commits

This project uses [Commitizen](https://commitizen-tools.github.io/commitizen/) for conventional commits. To create a properly formatted commit:
This project uses [Conventional Commits](https://www.conventionalcommits.org/). Use [Commitizen](https://commitizen-tools.github.io/commitizen/) for an interactive prompt:

```commandline
$ uv run cz commit
```

This interactive tool guides you through creating commits that follow the [Conventional Commits](https://www.conventionalcommits.org/) specification.
Commit prefixes directly control versioning — choose carefully:

| Prefix | Example | Version bump |
|---|---|---|
| `fix:` | `fix: handle missing country code` | patch (`x.y.Z`) |
| `feat:` | `feat: add get_rpme_data endpoint` | minor (`x.Y.z`) |
| `feat!:` / `BREAKING CHANGE:` | `feat!: rename auth params` | major (`X.y.z`) |
| `chore:`, `docs:`, `ci:`, `refactor:`, `test:` | `chore: update dependencies` | no release |

### Release process

Releases are fully automated via [Release Please](https://github.com/googleapis/release-please-action):

1. Conventional commits land on `main` through normal PRs
2. Release Please automatically opens a **release PR** that bumps the version in `pyproject.toml` and updates `CHANGELOG.md`
3. A maintainer reviews and merges the release PR
4. The package is automatically built and published to the S3 PyPI index

To **manually trigger a publish** (e.g. to recover a failed release), go to **Actions → Release Please → Run workflow → main** in the GitHub UI.

## Contributing
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import pandas as pd
import pytest

from data_bridges_knots import DataBridgesShapes
from data_bridges_knots import DataBridgesShapes, config_from_env


@pytest.fixture
def sample_survey_df():
"""Fixture providing a sample survey dataset"""
client = DataBridgesShapes("data_bridges_api_config.yaml")
client = DataBridgesShapes(config_from_env())
df = client.get_household_survey(
4872, "full"
) # FIXME: this should read from a static file
Expand All @@ -19,7 +19,7 @@ def sample_survey_df():
@pytest.fixture
def sample_xlsform_df():
"""Fixture providing a sample questionnaire in xlsForm"""
client = DataBridgesShapes("data_bridges_api_config.yaml")
client = DataBridgesShapes(config_from_env())
df = client.get_household_questionnaire(
1883
) # FIXME: this should read from a static file
Expand Down