Skip to content

Fix: Robustness and consistency in SDG scripts#102

Open
loigaak wants to merge 1 commit into
numfocus:mainfrom
loigaak:fix/issue-25
Open

Fix: Robustness and consistency in SDG scripts#102
loigaak wants to merge 1 commit into
numfocus:mainfrom
loigaak:fix/issue-25

Conversation

@loigaak

@loigaak loigaak commented May 31, 2026

Copy link
Copy Markdown

Fixes #25

This PR addresses two issues in the Small Development Grant (SDG) processing scripts:

  1. Robustness in parse_issue for 'Amount requested': Previously, if an issue body did not contain the 'Amount requested' field in the expected format, the parse_issue function would raise an AttributeError when trying to access amount_match.group(2) on a None object. This has been fixed by initializing amount_requested to 0 and checking if amount_match is not None before attempting to extract the value.
  2. Consistent GitHub Token environment variable: The scripts were inconsistently using GH_TOKEN and GITHUB_TOKEN environment variables for GitHub API authentication. The update_board function now uses GITHUB_TOKEN for consistency with other parts of the codebase, ensuring that a single environment variable is sufficient for all GitHub API interactions.

- Handle missing 'Amount requested' field gracefully in `parse_issue` to prevent `AttributeError`.
- Standardize GitHub Token environment variable usage to `GITHUB_TOKEN` across `sdg_utils.py` for consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimplementation of static plotting in GeoPandas

1 participant