Skip to content

Commit 7594ccc

Browse files
wbpriceabachman-dsacacme-cms-challengedturner5234IsaacMilarky
authored
Wbprice/the perfect storm (#324)
* Update release branch - take 02 (#261) * add missing file (#209) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update load balancer listener config, update allowed hosts in django (#210) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * update allowed hosts (#211) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * remove strategy page redirect - because it is difficult to read and reason about - the strategy of asking terraform to hop from one load balancer listener to another on the fly is brittle and failed out on me during a prod deploy * clean up remaining redirect to strategy page config * terraform fmt * Wbprice/internal dns configuration (#213) * create internal dns configuration to be imported into infoblocks --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Remove sandbox terraform definitions and github actions workflows (#214) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * specify storage autoscaling limits (#215) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-303] Implement Custom Sorting in FHIR API (#195) * add custom sorting to endpoint view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add custom sorting for practitioner role view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add location view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix errors Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add tests for custom sorting functionality Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * conform to proper parameter name in ticket Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add sort parameter to swagger docs Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Use an alias to describe directory domain (#217) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-446] ensure login header, footer, and body are responsive on mobile (#216) * ensure header title does not wrap at desktop size (#218) * ensure header title does not wrap at desktop size * handle logo margin at <desktop >mobile sizes * [NDH-399] Introducing feature flags! (#193) * [NDH-399] Introducing feature flags! * move feature flags under frontend settings * finish FeatureFlag support in frontend, including examples of testing * finish frontend feature flag setup work * remove 'localhost:8000' from ALLOWED_HOSTS * fix typo in comment * add repeatable seed migrations for local development * restore existing migration from main * fix typo in django_migrations readme * fix test fixture creation for feature flag condition * added ross miller to the team in COMMUNITY.md (#222) * added ross miller to the team in COMMUNITY.md * Address review feedback for changes to COMMUNITY.md * updating contributors list (#224) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * updating contributors list (#225) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Provision test resources (#219) * test, not impl * add test env * update test image tf_vars * bring in dns module * update default images for services --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-401]: Refactored tests.py into different suites (#223) * refactored tests.py into different suites * reverted our init re exports in filters * removed some comments * removed redundant helper * added requested changes * fix: address sorting change test breakage for LocationViewSetTestCase (#221) * Update internal domains (#226) * For internal domains, update 'directory' to read 'cnpd' now that a FISMA code has been assigned * Update docs --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * bump storage space in dev etl rds (#228) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * removed browsableAPI renderer (#230) * [NDH-359] Establish code quality baseline for Python and Typescript (#173) * [NDH-359] Add precommit-config including auto-formatting * ruff format everything in backend/ * add Python linting to backend-test CI workflow * add backend/Makefile commands for installing ruff and pre-commit and running lint + format * update documentation * re-enable dms (#229) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update CODEOWNERS file (#231) * update CODEOWNERS file to describe notification and reviewer expectations * rename CODEOWNERS file, swap comment syntax * Introduce Playwright for end-to-end-testing (#227) * introducing playwright for end-to-end testing of the NPD application * make sure the backend knows when it is running as a test-server * allow frontend dev server to use VITE_API_BASE_URL as proxy target * make frontend a little more testable * ensure backend works when TESTING is not in env * npm install insists * add Playwright running notes * backend `make` commands necessary for playwright and useful for development * update playwright documentation * Update code.json metadata (#235) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * CI Runner Out of Space Errors (#232) - Increase default size of CI instance from 31G (default) to 250G - Update documentation to describe how to increase size of volumes backing the root volume where the CI runner works Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-398] Organization details screen - initial work (#198) * [NDH-398] introduce @tanstack/react-query, start shaping the Organization lookup page * ensure Organization page renders in test with feature flags obeyed * fix inverse feature flag logic * npm install inside container keeps fiddling with package-lock.json * set VITE_API_BASE_URL in GitHub Action frontend test workflow * add basic Organization page sections, update styles * put update your details alert inside feature flag block * Fixing Failing Gitleaks Action (#238) * added false positive fingerprints to .gitleaksignore * missed two of them * [NDH-448] Modify Django Tests to Use setUpTestData Methods Instead of Sample Data SQL (#234) * add flyway option to exclude sample data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * First draft of creating fixture and factory test data helpers for implementation with tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * move fixtures file anfter moving in test refactor changes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get some of the fixtures working and patch overwrite in compose-test Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * bug fixes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * need to insert all required data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * now have working tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * make sure to use lists when it makes sense Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * ruff formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix unused variables Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add proper sorting test back Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * self-referencing rules for etl and fhir api db security groups (#233) * self-referencing for etl and fhir api db security groups * update dms to target npd_staging * Change task to full-load and CDC * revert stop task setting * "MaxFullLoadSubTasks": 2 for testing * remove local.multi_az reference; remove try statements --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> * Automate export of FHIR API schema to Typescript (#239) * automate export of FHIR API schema to Typescript * drop old types file * update test fixtures with new API types * http -> https redirect (#245) - creates http -> https redirect for directory.cms.gov (prod) - updates production domain names for directory.cms.gov and api.directory.cms.gov in domains module Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * correct typo in lvextend instructions (#244) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-424] Unified project tooling (#237) * [NDH-424] add bin/npr script to the project * drop make commands from npr * consolidate to a single docker compose configuration file setup * move project-central make commands to a top-level Makefile * don't run playwright host commands with bin/npr * ensure playwright can correctly start test-server, finish Makefile .PHONY entries * drop backend/docker-compose.yml reference from bin/npr * use bin/npr in make tasks whenever possible, rename test-fast to test-backend, add test-frontend * update GHA test jobs to match new structure * make and bin/npr should use compose.test.yml to run db migrations for test-setup * update documentation, ensure all make and npr commands work * update note on frontend dependencies * do not include flyway local_dev in compose.test.yml * Organization component test should wait for feature flag components to render (#246) * NDH-520: set up prod-test env (#248) * NDH-520: set up prod-test env * add prod-test map to domains module * name change to stay under 32 chars * apply name change * apply name change in all the places * update readme with prod-test info * more dagster -> etl naming change --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Blaine Price <1wbprice@gmail.com> * [NDH-553] Basic React error pages (#249) * [NDH-552] move default user creation to django command, add auth helper for e2e testing * [NDH-553] add basic ErrorBoundary and NotFound pages * add not_found end-to-end test * [NDH-324] Improve Practitioner Test Assertions (#250) * add equal checks to filter tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add check for nucc codes in test practitioner Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add functionality to create fixture data with practitioners tied to location Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get all address related tests working Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * [NDH-397] Initial Practitioner page (#240) - generic API support updates - end-to-end test * [NDH-476]: Organization Detail MVP (#242) * used translation files to display text * fixed definitions * added about section * added contact section * implemented identifiers section * removed bad file * refactored into new type framework * added some tests * removed some tests * adding requested changes * [NDH-559] provider_directory.tests.test_views should not rely on file system (#252) * Wbprice/self hosted runner containers (#251) * exploratory work on self-hosted github runners running in ecs, adapted from https://www.warpbuild.com/blog/self-hosting-github-actions\#method-2-using-ecs-elastic-container-service --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update internal route53 configuration (#253) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * we want an internal domain for the directory in prod-test (#255) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-477]: Practitioner Page MVP (#254) * contact layout section + translations implemented * created baseline about and contact * implemted identifiers section * refactored selectors into a Presenter class * added more translations * added more translations that i forgor * some tweaks to support working with real data (#206) * some tweaks to support working with real data * reverting settings changes * fix failing test and remove print statement * tweaks * tweaks * adding parent_org and associated test * fixing broken tests * linting fixes * fixing accidental package-lock stuff * Change trigger for backend tests (#259) Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Backend test fix (#260) * Change trigger for backend tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * remove upstream reporting tool Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Blaine Price <1wbprice@gmail.com> Co-authored-by: Blaine Price <william.price@cms.hhs.gov> Co-authored-by: dturner5234 <daniel.r.turner@pilot.cms.gov> Co-authored-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: rmillergv <ross.miller@cms.hhs.gov> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Sachin Panayil <79382140+sachin-panayil@users.noreply.github.com> Co-authored-by: tspecht-cms <trevor.specht@cms.hhs.gov> Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> Co-authored-by: Sarah Popelka <sarah.popelka1@cms.hhs.gov> * Add csrf environment variables and logging config (#296) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Sjp/fix 500 errors (#299) * adding test for /fhir page and fixing metadata maybe * fixing the /fhir and /metadata 500s * cleaning up the diff * Sjp/fix 500 errors (#300) * adding test for /fhir page and fixing metadata maybe * fixing the /fhir and /metadata 500s * cleaning up the diff * removing dependency on testserver for metadata endpoint * putting back csrf trusted origins * [NDH-692] Updating provider pk (#308) * Updating provider pk * cleaning up models.py * one more cleanup * update retrieve param naming for clarity * Fixing merge conflicts associated with Big Whammy Release (#318) * add missing file (#209) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update load balancer listener config, update allowed hosts in django (#210) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * update allowed hosts (#211) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * remove strategy page redirect - because it is difficult to read and reason about - the strategy of asking terraform to hop from one load balancer listener to another on the fly is brittle and failed out on me during a prod deploy * clean up remaining redirect to strategy page config * terraform fmt * Wbprice/internal dns configuration (#213) * create internal dns configuration to be imported into infoblocks --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Remove sandbox terraform definitions and github actions workflows (#214) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * specify storage autoscaling limits (#215) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-303] Implement Custom Sorting in FHIR API (#195) * add custom sorting to endpoint view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add custom sorting for practitioner role view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add location view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix errors Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add tests for custom sorting functionality Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * conform to proper parameter name in ticket Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add sort parameter to swagger docs Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Use an alias to describe directory domain (#217) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-446] ensure login header, footer, and body are responsive on mobile (#216) * ensure header title does not wrap at desktop size (#218) * ensure header title does not wrap at desktop size * handle logo margin at <desktop >mobile sizes * [NDH-399] Introducing feature flags! (#193) * [NDH-399] Introducing feature flags! * move feature flags under frontend settings * finish FeatureFlag support in frontend, including examples of testing * finish frontend feature flag setup work * remove 'localhost:8000' from ALLOWED_HOSTS * fix typo in comment * add repeatable seed migrations for local development * restore existing migration from main * fix typo in django_migrations readme * fix test fixture creation for feature flag condition * added ross miller to the team in COMMUNITY.md (#222) * added ross miller to the team in COMMUNITY.md * Address review feedback for changes to COMMUNITY.md * updating contributors list (#224) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * updating contributors list (#225) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Provision test resources (#219) * test, not impl * add test env * update test image tf_vars * bring in dns module * update default images for services --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-401]: Refactored tests.py into different suites (#223) * refactored tests.py into different suites * reverted our init re exports in filters * removed some comments * removed redundant helper * added requested changes * fix: address sorting change test breakage for LocationViewSetTestCase (#221) * Update internal domains (#226) * For internal domains, update 'directory' to read 'cnpd' now that a FISMA code has been assigned * Update docs --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * bump storage space in dev etl rds (#228) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * removed browsableAPI renderer (#230) * [NDH-359] Establish code quality baseline for Python and Typescript (#173) * [NDH-359] Add precommit-config including auto-formatting * ruff format everything in backend/ * add Python linting to backend-test CI workflow * add backend/Makefile commands for installing ruff and pre-commit and running lint + format * update documentation * re-enable dms (#229) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update CODEOWNERS file (#231) * update CODEOWNERS file to describe notification and reviewer expectations * rename CODEOWNERS file, swap comment syntax * Introduce Playwright for end-to-end-testing (#227) * introducing playwright for end-to-end testing of the NPD application * make sure the backend knows when it is running as a test-server * allow frontend dev server to use VITE_API_BASE_URL as proxy target * make frontend a little more testable * ensure backend works when TESTING is not in env * npm install insists * add Playwright running notes * backend `make` commands necessary for playwright and useful for development * update playwright documentation * Update code.json metadata (#235) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * CI Runner Out of Space Errors (#232) - Increase default size of CI instance from 31G (default) to 250G - Update documentation to describe how to increase size of volumes backing the root volume where the CI runner works Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-398] Organization details screen - initial work (#198) * [NDH-398] introduce @tanstack/react-query, start shaping the Organization lookup page * ensure Organization page renders in test with feature flags obeyed * fix inverse feature flag logic * npm install inside container keeps fiddling with package-lock.json * set VITE_API_BASE_URL in GitHub Action frontend test workflow * add basic Organization page sections, update styles * put update your details alert inside feature flag block * Fixing Failing Gitleaks Action (#238) * added false positive fingerprints to .gitleaksignore * missed two of them * [NDH-448] Modify Django Tests to Use setUpTestData Methods Instead of Sample Data SQL (#234) * add flyway option to exclude sample data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * First draft of creating fixture and factory test data helpers for implementation with tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * move fixtures file anfter moving in test refactor changes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get some of the fixtures working and patch overwrite in compose-test Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * bug fixes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * need to insert all required data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * now have working tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * make sure to use lists when it makes sense Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * ruff formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix unused variables Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add proper sorting test back Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * self-referencing rules for etl and fhir api db security groups (#233) * self-referencing for etl and fhir api db security groups * update dms to target npd_staging * Change task to full-load and CDC * revert stop task setting * "MaxFullLoadSubTasks": 2 for testing * remove local.multi_az reference; remove try statements --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> * Automate export of FHIR API schema to Typescript (#239) * automate export of FHIR API schema to Typescript * drop old types file * update test fixtures with new API types * http -> https redirect (#245) - creates http -> https redirect for directory.cms.gov (prod) - updates production domain names for directory.cms.gov and api.directory.cms.gov in domains module Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * correct typo in lvextend instructions (#244) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-424] Unified project tooling (#237) * [NDH-424] add bin/npr script to the project * drop make commands from npr * consolidate to a single docker compose configuration file setup * move project-central make commands to a top-level Makefile * don't run playwright host commands with bin/npr * ensure playwright can correctly start test-server, finish Makefile .PHONY entries * drop backend/docker-compose.yml reference from bin/npr * use bin/npr in make tasks whenever possible, rename test-fast to test-backend, add test-frontend * update GHA test jobs to match new structure * make and bin/npr should use compose.test.yml to run db migrations for test-setup * update documentation, ensure all make and npr commands work * update note on frontend dependencies * do not include flyway local_dev in compose.test.yml * Organization component test should wait for feature flag components to render (#246) * NDH-520: set up prod-test env (#248) * NDH-520: set up prod-test env * add prod-test map to domains module * name change to stay under 32 chars * apply name change * apply name change in all the places * update readme with prod-test info * more dagster -> etl naming change --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Blaine Price <1wbprice@gmail.com> * [NDH-553] Basic React error pages (#249) * [NDH-552] move default user creation to django command, add auth helper for e2e testing * [NDH-553] add basic ErrorBoundary and NotFound pages * add not_found end-to-end test * [NDH-324] Improve Practitioner Test Assertions (#250) * add equal checks to filter tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add check for nucc codes in test practitioner Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add functionality to create fixture data with practitioners tied to location Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get all address related tests working Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * [NDH-397] Initial Practitioner page (#240) - generic API support updates - end-to-end test * [NDH-476]: Organization Detail MVP (#242) * used translation files to display text * fixed definitions * added about section * added contact section * implemented identifiers section * removed bad file * refactored into new type framework * added some tests * removed some tests * adding requested changes * [NDH-559] provider_directory.tests.test_views should not rely on file system (#252) * Wbprice/self hosted runner containers (#251) * exploratory work on self-hosted github runners running in ecs, adapted from https://www.warpbuild.com/blog/self-hosting-github-actions\#method-2-using-ecs-elastic-container-service --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update internal route53 configuration (#253) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * we want an internal domain for the directory in prod-test (#255) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-477]: Practitioner Page MVP (#254) * contact layout section + translations implemented * created baseline about and contact * implemted identifiers section * refactored selectors into a Presenter class * added more translations * added more translations that i forgor * some tweaks to support working with real data (#206) * some tweaks to support working with real data * reverting settings changes * fix failing test and remove print statement * tweaks * tweaks * adding parent_org and associated test * fixing broken tests * linting fixes * fixing accidental package-lock stuff * Change trigger for backend tests (#259) Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Backend test fix (#260) * Change trigger for backend tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * remove upstream reporting tool Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * adding migration, updating models.py and updating serializers (#262) * fixing dumb db var name bug (#263) * adding public, npd as the search path (#265) * adding public, npd as the search path * whops, wrong place * deleted the thing * Disable ecs service for gha (#266) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * hardcode npd database name (#267) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-574] Add Playwright GitHub Action (#264) - add optional "make watch-frontend-test-assets" target for live playwright testing - debug Practitioner end-to-end test in CI - update playwright documentation * [NDH-471] Organization listing page with pagination (#269) * initial Organization listing page * add e2e organization tests * update organization e2e test * add end-to-end fixture creation command, seedsystem * make e2e organizations tests rely on data present in system * support pagination on the organization listing page * add faker dependency, sort requirements * update organization listing frontend + e2e tests, fix bugs in pagination * EC2 Instance user data for semi-ephemeral EC2 GitHub Actions Runners (#271) Preconfigure EC2 instance for GitHub Actions with a User Data script --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * update weekly refresh token using date modulo'd by 7 rather than milleseconds, which Terraform doesn't support (#274) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update trust policy to read from npd-ops rather than NPD (#275) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Use templatefile() in place of "template_file" (#276) * Update weekly refresh token (#277) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * NDH-572: apply AWS support recs (#258) * Ndh 613 delete test env (#280) * NDH-613: delete test env * delete envs/test directory --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> * deleted clinical org repeatable-migration (#286) * Wbprice/ndh 584 resolve flyway schema already exists error (#281) * update db-migrations FLYWAY_DEFAULT_SCHEMA value --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-639] Add optional SQL query tracing to the backend test suite (#282) * add optional SQL query tracing to the backend test suite * only prepare file logging handler if SQL_TRACING is set * [NDH-479] Basic organization search (#272) * [NDH-479][WIP] Simple organization search * combine search and pagination for /organizations/search * react 19 doesn't need .Provider, swap context nesting * [NDH-618] Developer Page Content Changes (#288) * implemented content changes * adding robust tests * remove infrastructure definitions (#292) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update code.json metadata (#293) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * updated CODEOWNERS file to reflect current staff (#291) * add csrf config and csrf logging config (#298) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Adjusting Aria Levels and Side Bar (#290) * adjusting aria levels and accompanying tests * fixed inconsistent nav bar * [NDH-324] Amendments to Fixtures and Test cases (#256) * check all entries in filter assertions Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * address remaining comments Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * create fixtures module Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix imports Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add another code to test data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * format code with ruff Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * remove unused variables Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * patch location fixture Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix address use bug in serializer Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * create seperate create_address method Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * create non nurse records Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * rename test Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * change serializer for otherIDs Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * verify length in test_list_filter_by_npi_specific Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * rewrite the address filter to check to see if search appears in address when transformed into a string Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * check all addresses in tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix organization fixture module Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix imports in seedsystem Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * revise for pr review Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * unused import Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * debug remove print Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * apply revision to general id filter Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * resolve conflict in markdown Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix typo causing test failure Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * [NDH-641] Add Snyk GitHub Workflow (#284) * Create snyk.yml * Update snyk.yml * upgrade deps Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * added npm override to fix transitive dependency --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Sachin Panayil <sachinpanayil01@gmail.com> Co-authored-by: Sachin Panayil <79382140+sachin-panayil@users.noreply.github.com> * backfilling hotfixes into main (#302) * fixing failing snyk status (#306) * Fixes in README.md (#307) Fix misspelled word and link in the repo structure section. * replicating changes off of main (#311) * upgraded vulnerable package (#312) * updated sytnax to fix string bug] (#315) --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Blaine Price <1wbprice@gmail.com> Co-authored-by: Blaine Price <william.price@cms.hhs.gov> Co-authored-by: dturner5234 <daniel.r.turner@pilot.cms.gov> Co-authored-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Adam Bachman <adam.bachman@cms.hhs.gov> Co-authored-by: rmillergv <ross.miller@cms.hhs.gov> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Sachin Panayil <79382140+sachin-panayil@users.noreply.github.com> Co-authored-by: tspecht-cms <trevor.specht@cms.hhs.gov> Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> Co-authored-by: Sachin Panayil <sachinpanayil01@gmail.com> Co-authored-by: sman-dsac <sunil.manchikanti1@cms.hhs.gov> * Fixing Additional Merge Conflicts for Big Whammy Release (#319) * add missing file (#209) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update load balancer listener config, update allowed hosts in django (#210) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * update allowed hosts (#211) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * remove strategy page redirect - because it is difficult to read and reason about - the strategy of asking terraform to hop from one load balancer listener to another on the fly is brittle and failed out on me during a prod deploy * clean up remaining redirect to strategy page config * terraform fmt * Wbprice/internal dns configuration (#213) * create internal dns configuration to be imported into infoblocks --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Remove sandbox terraform definitions and github actions workflows (#214) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * specify storage autoscaling limits (#215) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-303] Implement Custom Sorting in FHIR API (#195) * add custom sorting to endpoint view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add custom sorting for practitioner role view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add location view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix errors Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add tests for custom sorting functionality Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * conform to proper parameter name in ticket Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add sort parameter to swagger docs Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Use an alias to describe directory domain (#217) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-446] ensure login header, footer, and body are responsive on mobile (#216) * ensure header title does not wrap at desktop size (#218) * ensure header title does not wrap at desktop size * handle logo margin at <desktop >mobile sizes * [NDH-399] Introducing feature flags! (#193) * [NDH-399] Introducing feature flags! * move feature flags under frontend settings * finish FeatureFlag support in frontend, including examples of testing * finish frontend feature flag setup work * remove 'localhost:8000' from ALLOWED_HOSTS * fix typo in comment * add repeatable seed migrations for local development * restore existing migration from main * fix typo in django_migrations readme * fix test fixture creation for feature flag condition * added ross miller to the team in COMMUNITY.md (#222) * added ross miller to the team in COMMUNITY.md * Address review feedback for changes to COMMUNITY.md * updating contributors list (#224) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * updating contributors list (#225) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Provision test resources (#219) * test, not impl * add test env * update test image tf_vars * bring in dns module * update default images for services --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-401]: Refactored tests.py into different suites (#223) * refactored tests.py into different suites * reverted our init re exports in filters * removed some comments * removed redundant helper * added requested changes * fix: address sorting change test breakage for LocationViewSetTestCase (#221) * Update internal domains (#226) * For internal domains, update 'directory' to read 'cnpd' now that a FISMA code has been assigned * Update docs --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * bump storage space in dev etl rds (#228) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * removed browsableAPI renderer (#230) * [NDH-359] Establish code quality baseline for Python and Typescript (#173) * [NDH-359] Add precommit-config including auto-formatting * ruff format everything in backend/ * add Python linting to backend-test CI workflow * add backend/Makefile commands for installing ruff and pre-commit and running lint + format * update documentation * re-enable dms (#229) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update CODEOWNERS file (#231) * update CODEOWNERS file to describe notification and reviewer expectations * rename CODEOWNERS file, swap comment syntax * Introduce Playwright for end-to-end-testing (#227) * introducing playwright for end-to-end testing of the NPD application * make sure the backend knows when it is running as a test-server * allow frontend dev server to use VITE_API_BASE_URL as proxy target * make frontend a little more testable * ensure backend works when TESTING is not in env * npm install insists * add Playwright running notes * backend `make` commands necessary for playwright and useful for development * update playwright documentation * Update code.json metadata (#235) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * CI Runner Out of Space Errors (#232) - Increase default size of CI instance from 31G (default) to 250G - Update documentation to describe how to increase size of volumes backing the root volume where the CI runner works Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-398] Organization details screen - initial work (#198) * [NDH-398] introduce @tanstack/react-query, start shaping the Organization lookup page * ensure Organization page renders in test with feature flags obeyed * fix inverse feature flag logic * npm install inside container keeps fiddling with package-lock.json * set VITE_API_BASE_URL in GitHub Action frontend test workflow * add basic Organization page sections, update styles * put update your details alert inside feature flag block * Fixing Failing Gitleaks Action (#238) * added false positive fingerprints to .gitleaksignore * missed two of them * [NDH-448] Modify Django Tests to Use setUpTestData Methods Instead of Sample Data SQL (#234) * add flyway option to exclude sample data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * First draft of creating fixture and factory test data helpers for implementation with tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * move fixtures file anfter moving in test refactor changes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get some of the fixtures working and patch overwrite in compose-test Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * bug fixes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * need to insert all required data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * now have working tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * make sure to use lists when it makes sense Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * ruff formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix unused variables Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add proper sorting test back Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * self-referencing rules for etl and fhir api db security groups (#233) * self-referencing for etl and fhir api db security groups * update dms to target npd_staging * Change task to full-load and CDC * revert stop task setting * "MaxFullLoadSubTasks": 2 for testing * remove local.multi_az reference; remove try statements --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> * Automate export of FHIR API schema to Typescript (#239) * automate export of FHIR API schema to Typescript * drop old types file * update test fixtures with new API types * http -> https redirect (#245) - creates http -> https redirect for directory.cms.gov (prod) - updates production domain names for directory.cms.gov and api.directory.cms.gov in domains module Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * correct typo in lvextend instructions (#244) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-424] Unified project tooling (#237) * [NDH-424] add bin/npr script to the project * drop make commands from npr * consolidate to a single docker compose configuration file setup * move project-central make commands to a top-level Makefile * don't run playwright host commands with bin/npr * ensure playwright can correctly start test-server, finish Makefile .PHONY entries * drop backend/docker-compose.yml reference from bin/npr * use bin/npr in make tasks whenever possible, rename test-fast to test-backend, add test-frontend * update GHA test jobs to match new structure * make and bin/npr should use compose.test.yml to run db migrations for test-setup * update documentation, ensure all make and npr commands work * update note on frontend dependencies * do not include flyway local_dev in compose.test.yml * Organization component test should wait for feature flag components to render (#246) * NDH-520: set up prod-test env (#248) * NDH-520: set up prod-test env * add prod-test map to domains module * name change to stay under 32 chars * apply name change * apply name change in all the places * update readme with prod-test info * more dagster -> etl naming change --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Blaine Price <1wbprice@gmail.com> * [NDH-553] Basic React error pages (#249) * [NDH-552] move default user creation to django command, add auth helper for e2e testing * [NDH-553] add basic ErrorBoundary and NotFound pages * add not_found end-to-end test * [NDH-324] Improve Practitioner Test Assertions (#250) * add equal checks to filter tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add check for nucc codes in test practitioner Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add functionality to create fixture data with practitioners tied to location Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get all address related tests working Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * [NDH-397] Initial Practitioner page (#240) - generic API support updates - end-to-end test * [NDH-476]: Organization Detail MVP (#242) * used translation files to display text * fixed definitions * added about section * added contact section * implemented identifiers section * removed bad file * refactored into new type framework * added some tests * removed some tests * adding requested changes * [NDH-559] provider_directory.tests.test_views should not rely on file system (#252) * Wbprice/self hosted runner containers (#251) * exploratory work on self-hosted github runners running in ecs, adapted from https://www.warpbuild.com/blog/self-hosting-github-actions\#method-2-using-ecs-elastic-container-service --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update internal route53 configuration (#253) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * we want an internal domain for the directory in prod-test (#255) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-477]: Practitioner Page MVP (#254) * contact layout section + translations implemented * created baseline about and contact * implemted identifiers section * refactored selectors into a Presenter class * added more translations * added more translations that i forgor * some tweaks to support working with real data (#206) * some tweaks to support working with real data * reverting settings changes * fix failing test and remove print statement * tweaks * tweaks * adding parent_org and associated test * fixing broken tests * linting fixes * fixing accidental package-lock stuff * Change trigger for backend tests (#259) Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Backend test fix (#260) * Change trigger for backend tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * remove upstream reporting tool Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * adding migration, updating models.py and updating serializers (#262) * fixing dumb db var name bug (#263) * adding public, npd as the search path (#265) * adding public, npd as the search path * whops, wrong place * deleted the thing * Disable ecs service for gha (#266) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * hardcode npd database name (#267) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-574] Add Playwright GitHub Action (#264) - add optional "make watch-frontend-test-assets" target for live playwright testing - debug Practitioner end-to-end test in CI - update playwright documentation * [NDH-471] Organization listing page with pagination (#269) * initial Organization listing page * add e2e organization tests * update organization e2e test * add end-to-end fixture creation command, seedsystem * make e2e organizations tests rely on data present in system * support pagination on the organization listing page * add faker dependency, sort requirements * update organization listing frontend + e2e tests, fix bugs in pagination * EC2 Instance user data for semi-ephemeral EC2 GitHub Actions Runners (#271) Preconfigure EC2 instance for GitHub Actions with a User Data script --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * update weekly refresh token using date modulo'd by 7 rather than milleseconds, which Terraform doesn't support (#274) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update trust policy to read from npd-ops rather than NPD (#275) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Use templatefile() in place of "template_file" (#276) * Update weekly refresh token (#277) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * NDH-572: apply AWS support recs (#258) * Ndh 613 delete test env (#280) * NDH-613: delete test env * delete envs/test directory --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> * deleted clinical org repeatable-migration (#286) * Wbprice/ndh 584 resolve flyway schema already exists error (#281) * update db-migrations FLYWAY_DEFAULT_SCHEMA value --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-639] Add optional SQL query tracing to the backend test suite (#282) * add optional SQL query tracing to the backend test suite * only prepare file logging handler if SQL_TRACING is set * [NDH-479] Basic organization search (#272) * [NDH-479][WIP] Simple organization search * combine search and pagination for /organizations/search * react 19 doesn't need .Provider, swap context nesting * [NDH-618] Developer Page Content Changes (#288) * implemented content changes * adding robust tests * remove infrastructure definitions (#292) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update code.json metadata (#293) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * updated CODEOWNERS file to reflect current staff (#291) * add csrf config and csrf logging config (#298) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Adjusting Aria Levels and Side Bar (#290) * adjusting aria levels and accompanying tests * fixed inconsistent nav bar * [NDH-324] Amendments to Fixtures and Test cases (#256) * check all entries in filter assertions Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * address remaining comments Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * create fixtures module Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix imports Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add another code to test data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * format code with ruff Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * remove unused variables Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * patch location fixture Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix address use bug in serializer Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * create seperate create_address method Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * create non nurse records Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * rename test Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * change serializer for otherIDs Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * verify length in test_list_filter_by_npi_specific Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * rewrite the address filter to check to see if search appears in address when transformed into a string Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * check all addresses in tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix organization fixture module Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix imports in seedsystem Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * revise for pr review Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * unused import Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * debug remove print Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * apply revision to general id filter Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * resolve conflict in markdown Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix typo causing test failure Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * [NDH-641] Add Snyk GitHub Workflow (#284) * Create snyk.yml * Update snyk.yml * upgrade deps Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * added npm override to fix transitive dependency --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Sachin Panayil <sachinpanayil01@gmail.com> Co-authored-by: Sachin Panayil <79382140+sachin-panayil@users.noreply.github.com> * backfilling hotfixes into main (#302) * fixing failing snyk status (#306) * Fixes in README.md (#307) Fix misspelled word and link in the repo structure section. * replicating changes off of main (#311) * upgraded vulnerable package (#312) * updated sytnax to fix string bug] (#315) * adding workflow that allows for automated sync from release to main (#313) --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Blaine Price <1wbprice@gmail.com> Co-authored-by: Blaine Price <william.price@cms.hhs.gov> Co-authored-by: dturner5234 <daniel.r.turner@pilot.cms.gov> Co-authored-by: Isaac Milarsky <imilarsky@gmail.com> Co-authored-by: Adam Bachman <adam.bachman@cms.hhs.gov> Co-authored-by: rmillergv <ross.miller@cms.hhs.gov> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Sachin Panayil <79382140+sachin-panayil@users.noreply.github.com> Co-authored-by: tspecht-cms <trevor.specht@cms.hhs.gov> Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> Co-authored-by: Sachin Panayil <sachinpanayil01@gmail.com> Co-authored-by: sman-dsac <sunil.manchikanti1@cms.hhs.gov> * Sjp/another merge try (#320) * add missing file (#209) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update load balancer listener config, update allowed hosts in django (#210) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * update allowed hosts (#211) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * remove strategy page redirect - because it is difficult to read and reason about - the strategy of asking terraform to hop from one load balancer listener to another on the fly is brittle and failed out on me during a prod deploy * clean up remaining redirect to strategy page config * terraform fmt * Wbprice/internal dns configuration (#213) * create internal dns configuration to be imported into infoblocks --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Remove sandbox terraform definitions and github actions workflows (#214) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * specify storage autoscaling limits (#215) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-303] Implement Custom Sorting in FHIR API (#195) * add custom sorting to endpoint view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add custom sorting for practitioner role view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add location view set Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix errors Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add tests for custom sorting functionality Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * conform to proper parameter name in ticket Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add sort parameter to swagger docs Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * Use an alias to describe directory domain (#217) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-446] ensure login header, footer, and body are responsive on mobile (#216) * ensure header title does not wrap at desktop size (#218) * ensure header title does not wrap at desktop size * handle logo margin at <desktop >mobile sizes * [NDH-399] Introducing feature flags! (#193) * [NDH-399] Introducing feature flags! * move feature flags under frontend settings * finish FeatureFlag support in frontend, including examples of testing * finish frontend feature flag setup work * remove 'localhost:8000' from ALLOWED_HOSTS * fix typo in comment * add repeatable seed migrations for local development * restore existing migration from main * fix typo in django_migrations readme * fix test fixture creation for feature flag condition * added ross miller to the team in COMMUNITY.md (#222) * added ross miller to the team in COMMUNITY.md * Address review feedback for changes to COMMUNITY.md * updating contributors list (#224) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * updating contributors list (#225) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Provision test resources (#219) * test, not impl * add test env * update test image tf_vars * bring in dns module * update default images for services --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-401]: Refactored tests.py into different suites (#223) * refactored tests.py into different suites * reverted our init re exports in filters * removed some comments * removed redundant helper * added requested changes * fix: address sorting change test breakage for LocationViewSetTestCase (#221) * Update internal domains (#226) * For internal domains, update 'directory' to read 'cnpd' now that a FISMA code has been assigned * Update docs --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * bump storage space in dev etl rds (#228) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * removed browsableAPI renderer (#230) * [NDH-359] Establish code quality baseline for Python and Typescript (#173) * [NDH-359] Add precommit-config including auto-formatting * ruff format everything in backend/ * add Python linting to backend-test CI workflow * add backend/Makefile commands for installing ruff and pre-commit and running lint + format * update documentation * re-enable dms (#229) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update CODEOWNERS file (#231) * update CODEOWNERS file to describe notification and reviewer expectations * rename CODEOWNERS file, swap comment syntax * Introduce Playwright for end-to-end-testing (#227) * introducing playwright for end-to-end testing of the NPD application * make sure the backend knows when it is running as a test-server * allow frontend dev server to use VITE_API_BASE_URL as proxy target * make frontend a little more testable * ensure backend works when TESTING is not in env * npm install insists * add Playwright running notes * backend `make` commands necessary for playwright and useful for development * update playwright documentation * Update code.json metadata (#235) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * CI Runner Out of Space Errors (#232) - Increase default size of CI instance from 31G (default) to 250G - Update documentation to describe how to increase size of volumes backing the root volume where the CI runner works Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-398] Organization details screen - initial work (#198) * [NDH-398] introduce @tanstack/react-query, start shaping the Organization lookup page * ensure Organization page renders in test with feature flags obeyed * fix inverse feature flag logic * npm install inside container keeps fiddling with package-lock.json * set VITE_API_BASE_URL in GitHub Action frontend test workflow * add basic Organization page sections, update styles * put update your details alert inside feature flag block * Fixing Failing Gitleaks Action (#238) * added false positive fingerprints to .gitleaksignore * missed two of them * [NDH-448] Modify Django Tests to Use setUpTestData Methods Instead of Sample Data SQL (#234) * add flyway option to exclude sample data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * First draft of creating fixture and factory test data helpers for implementation with tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * move fixtures file anfter moving in test refactor changes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get some of the fixtures working and patch overwrite in compose-test Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * bug fixes Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * need to insert all required data Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * now have working tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * make sure to use lists when it makes sense Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * ruff formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * fix unused variables Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add proper sorting test back Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * self-referencing rules for etl and fhir api db security groups (#233) * self-referencing for etl and fhir api db security groups * update dms to target npd_staging * Change task to full-load and CDC * revert stop task setting * "MaxFullLoadSubTasks": 2 for testing * remove local.multi_az reference; remove try statements --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Dan Turner <daniel.turner1@cms.hhs.gov> * Automate export of FHIR API schema to Typescript (#239) * automate export of FHIR API schema to Typescript * drop old types file * update test fixtures with new API types * http -> https redirect (#245) - creates http -> https redirect for directory.cms.gov (prod) - updates production domain names for directory.cms.gov and api.directory.cms.gov in domains module Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * correct typo in lvextend instructions (#244) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-424] Unified project tooling (#237) * [NDH-424] add bin/npr script to the project * drop make commands from npr * consolidate to a single docker compose configuration file setup * move project-central make commands to a top-level Makefile * don't run playwright host commands with bin/npr * ensure playwright can correctly start test-server, finish Makefile .PHONY entries * drop backend/docker-compose.yml reference from bin/npr * use bin/npr in make tasks whenever possible, rename test-fast to test-backend, add test-frontend * update GHA test jobs to match new structure * make and bin/npr should use compose.test.yml to run db migrations for test-setup * update documentation, ensure all make and npr commands work * update note on frontend dependencies * do not include flyway local_dev in compose.test.yml * Organization component test should wait for feature flag components to render (#246) * NDH-520: set up prod-test env (#248) * NDH-520: set up prod-test env * add prod-test map to domains module * name change to stay under 32 chars * apply name change * apply name change in all the places * update readme with prod-test info * more dagster -> etl naming change --------- Co-authored-by: tspecht-cms <trevor.specht@hhs.cms.gov> Co-authored-by: Blaine Price <1wbprice@gmail.com> * [NDH-553] Basic React error pages (#249) * [NDH-552] move default user creation to django command, add auth helper for e2e testing * [NDH-553] add basic ErrorBoundary and NotFound pages * add not_found end-to-end test * [NDH-324] Improve Practitioner Test Assertions (#250) * add equal checks to filter tests Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add check for nucc codes in test practitioner Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * add functionality to create fixture data with practitioners tied to location Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * get all address related tests working Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * formatting Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> --------- Signed-off-by: Isaac Milarsky <imilarsky@gmail.com> * [NDH-397] Initial Practitioner page (#240) - generic API support updates - end-to-end test * [NDH-476]: Organization Detail MVP (#242) * used translation files to display text * fixed definitions * added about section * added contact section * implemented identifiers section * removed bad file * refactored into new type framework * added some tests * removed some tests * adding requested changes * [NDH-559] provider_directory.tests.test_views should not rely on file system (#252) * Wbprice/self hosted runner containers (#251) * exploratory work on self-hosted github runners running in ecs, adapted from https://www.warpbuild.com/blog/self-hosting-github-actions\#method-2-using-ecs-elastic-container-service --------- Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * Update internal route53 configuration (#253) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * we want an internal domain for the directory in prod-test (#255) Co-authored-by: Blaine Price <william.price@cms.hhs.gov> * [NDH-477]: Practitioner Page MVP (#254) * contact layout section + translations implemented * created baseline about and contact * implemted identifiers section * refactored selectors into a Presenter class * added more translations * added more translations that i forgor * some tweaks to support working with real data (#206) * some tweaks to support working with real data * reverting settings changes * fix failing test and remove print statement * tweaks * tweaks * adding parent_org and associated test * fixing broken tests * linting fixes * fixing accide…
1 parent c88d958 commit 7594ccc

File tree

9 files changed

+464
-2
lines changed

9 files changed

+464
-2
lines changed

backend/npdfhir/tests/fixtures.py

Lines changed: 358 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
import uuid
2+
import datetime
3+
import random
4+
5+
from ..models import (
6+
Individual,
7+
IndividualToName,
8+
IndividualToAddress,
9+
FhirNameUse,
10+
FhirAddressUse,
11+
FipsState,
12+
Npi,
13+
Provider,
14+
Organization,
15+
OrganizationToName,
16+
Address,
17+
AddressUs,
18+
Location,
19+
ProviderToOrganization,
20+
RelationshipType,
21+
ProviderToLocation,
22+
ProviderRole,
23+
ProviderToTaxonomy,
24+
Endpoint,
25+
EndpointInstance,
26+
EndpointConnectionType,
27+
EndpointInstanceToPayload,
28+
EndpointType,
29+
EnvironmentType,
30+
EhrVendor,
31+
PayloadType,
32+
LegalEntity,
33+
OtherIdType,
34+
OrganizationToOtherId,
35+
OrganizationToTaxonomy,
36+
ClinicalOrganization,
37+
Nucc,
38+
)
39+
40+
41+
def _ensure_name_use():
42+
return FhirNameUse.objects.get_or_create(value="usual")[0]
43+
44+
45+
def create_practitioner(
46+
first_name="Alice",
47+
last_name="Smith",
48+
gender="F",
49+
birth_date=datetime.date(1990, 1, 1),
50+
npi_value=None,
51+
practitioner_type=None,
52+
location=None,
53+
address_use="work",
54+
):
55+
"""
56+
Creates an Individual, Name (via IndividualToName), Npi, Provider.
57+
"""
58+
individual = Individual.objects.create(
59+
id=uuid.uuid4(),
60+
gender=gender,
61+
birth_date=birth_date,
62+
)
63+
64+
IndividualToName.objects.create(
65+
individual=individual,
66+
first_name=first_name,
67+
last_name=last_name,
68+
name_use=_ensure_name_use(),
69+
)
70+
71+
if location:
72+
use = FhirAddressUse.objects.get(value=address_use)
73+
74+
IndividualToAddress.objects.create(
75+
individual=individual, address=location.address, address_use=use
76+
)
77+
78+
npi_value = npi_value or random.randint(1000000000, 9999999999)
79+
80+
npi = Npi.objects.create(
81+
npi=npi_value,
82+
entity_type_code=1,
83+
enumeration_date=datetime.date(2000, 1, 1),
84+
last_update_date=datetime.date(2020, 1, 1),
85+
)
86+
87+
provider = Provider.objects.create(
88+
npi=npi,
89+
individual=individual,
90+
)
91+
92+
if practitioner_type:
93+
code = Nucc.objects.get(pk=practitioner_type)
94+
95+
ProviderToTaxonomy.objects.create(npi=provider, nucc_code=code, id=uuid.uuid4())
96+
97+
# display name
98+
# Nucc
99+
100+
return provider
101+
102+
103+
def create_legal_entity(dba_name="Sample Legal Entity"):
104+
legal_entity = LegalEntity.objects.create(ein_id=uuid.uuid4(), dba_name=dba_name)
105+
106+
return legal_entity
107+
108+
109+
def create_other_id_type(name="Sample Other ID"):
110+
other_id = OtherIdType.objects.create(value=name)
111+
112+
return other_id
113+
114+
115+
def create_organization(
116+
id=None,
117+
name="Test Org",
118+
parent_id=None,
119+
authorized_official_first_name="Alice",
120+
authorized_official_last_name="Smith",
121+
legal_entity=None,
122+
other_id_type=None,
123+
npi_value=None,
124+
other_id_name="testMBI",
125+
other_state_code="NY",
126+
other_issuer="New York State Medicaid",
127+
organization_type=None,
128+
):
129+
"""
130+
Creates an Organization + OrganizationToName.
131+
"""
132+
# authorized_official cannot be null → create a dummy individual
133+
ind = Individual.objects.create(
134+
id=uuid.uuid4(),
135+
gender="U",
136+
birth_date=datetime.date(1980, 1, 1),
137+
)
138+
139+
IndividualToName.objects.create(
140+
individual=ind,
141+
first_name=authorized_official_first_name,
142+
last_name=authorized_official_last_name,
143+
name_use=_ensure_name_use(),
144+
)
145+
146+
if id is None:
147+
id = uuid.uuid4()
148+
149+
org = Organization.objects.create(
150+
id=id, authorized_official=ind, ein=legal_entity, parent_id=parent_id
151+
)
152+
153+
if other_id_type or organization_type or npi_value:
154+
npi = Npi.objects.create(
155+
npi=npi_value or int(str(uuid.uuid4().int)[:10]),
156+
entity_type_code=1,
157+
enumeration_date=datetime.date(2000, 1, 1),
158+
last_update_date=datetime.date(2020, 1, 1),
159+
)
160+
161+
clinical_organization = ClinicalOrganization.objects.create(organization=org, npi=npi)
162+
163+
if other_id_type:
164+
OrganizationToOtherId.objects.create(
165+
npi=clinical_organization,
166+
other_id=other_id_name,
167+
other_id_type=other_id_type,
168+
state_code=other_state_code,
169+
issuer=other_issuer,
170+
)
171+
172+
if organization_type:
173+
code = Nucc.objects.get(pk=organization_type)
174+
175+
OrganizationToTaxonomy.objects.create(npi=clinical_organization, nucc_code=code)
176+
177+
OrganizationToName.objects.create(
178+
organization=org,
179+
name=name,
180+
is_primary=True,
181+
)
182+
183+
return org
184+
185+
186+
def create_location(
187+
organization=None,
188+
name="Test Location",
189+
city="Albany",
190+
state="NY",
191+
zipcode="12207",
192+
addr_line_1="123 Main St",
193+
):
194+
"""
195+
Creates AddressUs → Address → Location.
196+
"""
197+
organization = organization or create_organization()
198+
199+
fips_code = FipsState.objects.get(abbreviation=state)
200+
addr_us = AddressUs.objects.create(
201+
id=random.randint(-100000000000, 100000000000),
202+
delivery_line_1=addr_line_1,
203+
city_name=city,
204+
state_code_id=fips_code.id,
205+
zipcode=zipcode,
206+
)
207+
208+
address = Address.objects.create(
209+
id=uuid.uuid4(),
210+
address_us=addr_us,
211+
)
212+
213+
loc = Location.objects.create(
214+
id=uuid.uuid4(),
215+
name=name,
216+
organization=organization,
217+
address=address,
218+
active=True,
219+
)
220+
221+
return loc
222+
223+
224+
def _ensure_endpoint_base_types():
225+
"""
226+
Flyway inserts some reference values, but ensure minimal ones exist.
227+
"""
228+
etype, _ = EndpointType.objects.get_or_create(value="rest")
229+
ctype, _ = EndpointConnectionType.objects.get_or_create(
230+
id="hl7-fhir-rest",
231+
defaults={"display": "FHIR REST", "definition": "FHIR REST endpoint"},
232+
)
233+
payload, _ = PayloadType.objects.get_or_create(
234+
id="fhir-json",
235+
defaults={"value": "application/fhir+json", "description": "FHIR JSON"},
236+
)
237+
return etype, ctype, payload
238+
239+
240+
def create_endpoint(
241+
organization=None,
242+
url="https://example.org/fhir",
243+
name="Test Endpoint",
244+
ehr=None,
245+
payload_type=None,
246+
):
247+
"""
248+
Creates EndpointType, EndpointConnectionType, EndpointInstance, Endpoint.
249+
"""
250+
organization = organization or create_organization()
251+
252+
etype, ctype, payload = _ensure_endpoint_base_types()
253+
254+
if not ehr:
255+
new_vendor_id = uuid.uuid4()
256+
ehr_vendor = EhrVendor.objects.create(
257+
id=new_vendor_id, name=f"My Sample{new_vendor_id}", is_cms_aligned_network=True
258+
)
259+
else:
260+
ehr_vendor = ehr
261+
262+
et = EnvironmentType.objects.get(pk="prod")
263+
264+
pt = PayloadType.objects.get(pk=payload_type or "urn:hl7-org:sdwg:ccda-structuredBody:1.1")
265+
266+
instance = EndpointInstance.objects.create(
267+
id=uuid.uuid4(),
268+
ehr_vendor_id=ehr_vendor.id,
269+
address=url,
270+
endpoint_connection_type=ctype,
271+
name=name,
272+
environment_type=et,
273+
)
274+
275+
EndpointInstanceToPayload.objects.create(endpoint_instance=instance, payload_type=pt)
276+
277+
ep = Endpoint.objects.create(
278+
id=uuid.uuid4(),
279+
address=url,
280+
endpoint_type=etype,
281+
endpoint_instance=instance,
282+
name=name,
283+
)
284+
285+
return ep
286+
287+
288+
def _ensure_relationship_type():
289+
"""
290+
Retrieve an existing relationship_type inserted by Flyway.
291+
Default: 'assigning' (id=2)
292+
"""
293+
try:
294+
return RelationshipType.objects.get(value="assigning")
295+
except RelationshipType.DoesNotExist:
296+
# If Flyway hasn’t run (edge/dev case), create one safely
297+
return RelationshipType.objects.create(value="assigning")
298+
299+
300+
def _ensure_provider_role(code="PRV", display="Provider Role"):
301+
return ProviderRole.objects.get_or_create(
302+
code=code,
303+
defaults={
304+
"system": "http://hl7.org/fhir/practitionerrole",
305+
"display": display,
306+
},
307+
)[0]
308+
309+
310+
def create_full_practitionerrole(
311+
first_name="Alice",
312+
last_name="Smith",
313+
gender="F",
314+
npi_value=None,
315+
org_name="Test Org",
316+
location_name="Test Location",
317+
role_code="PRV",
318+
role_display="Provider Role",
319+
):
320+
"""
321+
Creates:
322+
Practitioner (Provider)
323+
Organization
324+
Location
325+
ProviderToOrganization
326+
ProviderToLocation
327+
"""
328+
provider = create_practitioner(
329+
first_name=first_name,
330+
last_name=last_name,
331+
gender=gender,
332+
npi_value=npi_value,
333+
)
334+
335+
org = create_organization(name=org_name)
336+
loc = create_location(organization=org, name=location_name)
337+
338+
# Ensure relationship + role codes exist
339+
rel_type = _ensure_relationship_type()
340+
_ensure_provider_role(role_code, role_display)
341+
342+
pto_org = ProviderToOrganization.objects.create(
343+
id=uuid.uuid4(),
344+
individual=provider, # special FK uses Provider.individual_id
345+
organization=org,
346+
relationship_type=rel_type,
347+
active=True,
348+
)
349+
350+
pr = ProviderToLocation.objects.create(
351+
id=uuid.uuid4(),
352+
provider_to_organization=pto_org,
353+
location=loc,
354+
provider_role_code=role_code,
355+
active=True,
356+
)
357+
358+
return pr

backend/npdfhir/tests/test_practitioner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def test_list_filter_by_name(self):
255255
for name in entry["resource"]["name"]:
256256
names.append(name["family"])
257257
names.append(name["given"])
258-
258+
259259
self.assertIn(self.sample_last_name, names)
260260

261261
def test_list_filter_by_practitioner_type(self):
@@ -285,7 +285,7 @@ def test_list_filter_by_identifier_general(self):
285285
values = [int(v["value"]) for v in entry["resource"]["identifier"]]
286286
all_values.extend(values)
287287
self.assertIn(int(identifier), values)
288-
288+
289289
#assert that Kirk Aadalen is in the data
290290
self.assertIn(self.pracs[0].npi.npi,all_values)
291291
#assert that Asad Abbas is in the data

infrastructure/envs/prod-test/terraform.tfvars

Whitespace-only changes.

infrastructure/envs/test/terraform.tfvars

Whitespace-only changes.

0 commit comments

Comments
 (0)