Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: EligibilityVerifier active flag #1665

Merged
merged 6 commits into from
Aug 16, 2023
Merged

Conversation

angela-tran
Copy link
Member

@angela-tran angela-tran commented Aug 16, 2023

Closes #1662

This PR adds active as a field to EligibilityVerifier and updates the EligibilityVerifierSelectionForm so that it only shows active verifiers.

The BooleanField on the model itself defaults to false, and then is overwritten by whatever the data migration specifies if no environment variable is found.

To set verifiers as active locally

In .env:

MST_OAUTH_VERIFIER_ACTIVE=True
MST_VETERAN_VERIFIER_ACTIVE=True
COURTESY_CARD_VERIFIER_ACTIVE=True
SACRT_OAUTH_VERIFIER_ACTIVE=True
SBMTD_OAUTH_VERIFIER_ACTIVE=True

In terminal:

set -a
source .env
./bin/init.sh

@angela-tran angela-tran self-assigned this Aug 16, 2023
@github-actions github-actions bot added deployment-dev [auto] Changes that will trigger a deploy if merged to dev back-end Django views, sessions, middleware, models, migrations etc. infrastructure Terraform, Azure, etc. migrations [auto] Review for potential model changes/needed data migrations updates labels Aug 16, 2023
@angela-tran
Copy link
Member Author

Working on fixing the failing Pytests. Will look into Cypress tests after that.

Side question: is anyone else not able to use VS Code's Testing integration? I'm getting this on any branch, not just this PR's:

  File "/home/calitp/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/vscode_pytest/__init__.py", line 613, in execution_post
    addr = ("localhost", int(testPort))
ValueError: invalid literal for int() with base 10: '0.0'

image

I'm on

Visual Studio Code
Version: 1.81.1
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:22:42.175Z (6 days ago)
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.81.1 Chrome/108.0.5359.215 Electron/22.3.18 Safari/537.36

@thekaveman
Copy link
Member

@angela-tran RE: default values -- if it makes it easier, I think we can hardcode MST options as True, like we do for their Transit Agency. For now anyway...

@angela-tran
Copy link
Member Author

@angela-tran RE: default values -- if it makes it easier, I think we can hardcode MST options as True, like we do for their Transit Agency. For now anyway...

Good idea. I think that'll fix the Cypress tests

allows the Cypress tests to pass as written
@angela-tran angela-tran marked this pull request as ready for review August 16, 2023 16:59
@angela-tran angela-tran requested a review from a team as a code owner August 16, 2023 16:59
@machikoyasuda
Copy link
Member

@angela-tran I'm able to run tests on my VS Code. I haven't updated to 1.81.1 yet, still on 1.81.0.

Version: 1.81.0
Commit: 6445d93c81ebe42c4cbd7a60712e0b17d9463e97
Date: 2023-08-02T12:38:28.722Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.5.0

@thekaveman
Copy link
Member

@angela-tran I'm able to run the tests on my VS Code. I am on 1.81.1

Version: 1.81.1 (user setup)
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:22:42.175Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045

Copy link
Member

@machikoyasuda machikoyasuda left a comment

Choose a reason for hiding this comment

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

image with env set as image

Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

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

With the default for SacRT 🤣, works as expected:

image

@angela-tran angela-tran merged commit b697b92 into dev Aug 16, 2023
12 checks passed
@angela-tran angela-tran deleted the feat/verifier-active-flag branch August 16, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Django views, sessions, middleware, models, migrations etc. deployment-dev [auto] Changes that will trigger a deploy if merged to dev infrastructure Terraform, Azure, etc. migrations [auto] Review for potential model changes/needed data migrations updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add active flag to EligibilityVerifier
3 participants