Skip to content

Conversation

@loneil
Copy link
Collaborator

@loneil loneil commented Sep 16, 2025

Issue #: /bcgov/entity#30698

Description of changes:
Change flag import to get this working after recent flag changes. Locally when using LD SDK key I can now get the correct flag values. Could only get flags loading in this file that also imports current_app if I do the import in the function as done in some other example spots now...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).

Signed-off-by: Lucas <lucasoneil@gmail.com>
Signed-off-by: Lucas <lucasoneil@gmail.com>
@loneil loneil force-pushed the bugfix/dbcUtilsFlagImport branch from fca7519 to 1704b90 Compare September 16, 2025 23:57

test: ## Unit testing
. venv/bin/activate && pytest
. .venv/bin/activate && pytest
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but this was changed to .venv in the run command a while back (commit) but not the test one.

@loneil loneil marked this pull request as ready for review September 17, 2025 00:02
Copilot AI review requested due to automatic review settings September 17, 2025 00:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes import issues in the digital credentials utils module by moving the flags import inside the function to avoid circular dependencies and updating test mocks accordingly.

  • Moved flags import from module level to function level in digital_credentials_utils.py
  • Updated test mocks to reference the correct import path
  • Fixed virtual environment path in Makefile

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
digital_credentials_utils.py Moved flags import inside function to avoid circular dependency
test_digital_credentials_helpers_and_utils.py Updated test mocks to match new import path
Makefile Updated virtual environment path from venv to .venv

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@loneil
Copy link
Collaborator Author

loneil commented Sep 17, 2025

Tests (relevant DC ones):

image

@argush3 argush3 merged commit 9c1cc70 into bcgov:main Sep 17, 2025
3 of 4 checks passed
@severinbeauvais severinbeauvais changed the title Fix flag import in DBC utils 30698 Fix flag import in DBC utils Sep 25, 2025
@loneil loneil deleted the bugfix/dbcUtilsFlagImport branch December 10, 2025 22:10
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.

2 participants