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

06/26/2024 Production Deploy #1657

Merged
merged 181 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
2454a6e
poetry lock
Apr 15, 2024
fcf2e31
Merge branch 'main' of https://github.com/GSA/notifications-admin
Apr 17, 2024
2d3dbbc
Merge branch 'main' of https://github.com/GSA/notifications-admin
Apr 22, 2024
98f1298
poetry lock
Apr 22, 2024
ff1956c
Merge branch 'main' of https://github.com/GSA/notifications-admin
Apr 24, 2024
3b82e13
switched to withnav_template for org_template, settings template
Apr 24, 2024
04f1f62
fixed file name
Apr 24, 2024
f734e45
added comments
Apr 24, 2024
8366a4c
fix testing
Apr 24, 2024
bd633dd
Merge branch 'main' of https://github.com/GSA/notifications-admin
Apr 25, 2024
65899f6
poetry lock
Apr 26, 2024
7108c5f
pull main down
Apr 30, 2024
5f531f1
Updated filename string into db and UI display
anagradova May 2, 2024
93d7ca4
added pending and requested status to monthly stats dict
May 7, 2024
cdd71fa
pull down main
May 8, 2024
5506da5
poetry lock
May 8, 2024
8a6802b
pull main
May 10, 2024
d47f993
add check for government email addresses
May 13, 2024
ff1b60c
Merge branch 'main' into 1464-switch-to-the-new-withnav_template
May 17, 2024
868edd3
Merge branch 'main' into 1464-switch-to-the-new-withnav_template
May 17, 2024
d739324
moved flash_message
May 17, 2024
5bc652d
change vulture rules in Makefile
May 20, 2024
2c18786
500 - Updating "Pricing" page content
jonathanbobel May 20, 2024
d045ecf
remove easy targets
May 20, 2024
9916632
set confidence back to 100% here. The 60% confidence is handled in a…
May 20, 2024
309c168
revert back to 100% confidence level for vulture and add a comment
May 20, 2024
c790921
Update app/main/views/sign_in.py
terrazoon May 20, 2024
9ba5e3b
code review feedback
May 20, 2024
7a1ab19
merge
May 20, 2024
622255e
merges
May 20, 2024
ad68c26
installing socketIO and testing the WebSocket connection
May 20, 2024
16dc451
fix si.edu
May 21, 2024
626f4a1
Create codeql.yml
terrazoon May 21, 2024
6494f44
merge from main
May 24, 2024
f939687
merge
May 24, 2024
be4b1d5
merge from main
May 24, 2024
17fec1c
use moto to mock s3
May 28, 2024
91bb6d2
Pull main
May 29, 2024
8e6b3fa
Poetry lock
May 29, 2024
758c1cd
added new api for month, by year, previous 7 day stats
May 29, 2024
9368f6a
remove some fixtures
May 29, 2024
e694b9a
clean up mock_s3_download
May 29, 2024
df032ba
remove mock_aws where its not useful
May 30, 2024
a4fc04a
test that S3 not getting hit in tests
May 30, 2024
2332744
merge from main
May 30, 2024
108e889
added example of fetch
May 30, 2024
d593485
Merge branch '1513-provide-notification-stats-data-within-7-days-mont…
May 30, 2024
01321ae
connecting api data to socket and setting up chartjs to use the data
May 31, 2024
6c44982
removed socket.js
May 31, 2024
4bf6af4
Merge pull request #1480 from GSA/1464-switch-to-the-new-withnav_temp…
ccostino May 31, 2024
67523fb
Merge pull request #1502 from GSA/1405-bug-long-complicated-csv-name
ccostino May 31, 2024
2fdc8e7
Merge pull request #1530 from GSA/notify-admin-1481
ccostino May 31, 2024
8a66370
Merge pull request #1552 from GSA/notify-admin-1545
ccostino May 31, 2024
56d21ec
Merge pull request #1554 from GSA/500-pricing-content-updates
ccostino May 31, 2024
fc29871
Merge pull request #1560 from GSA/terrazoon-patch-1
ccostino May 31, 2024
a834166
merge from main
May 31, 2024
8c85d99
Update dependencies and fix E2E test
ccostino May 31, 2024
2f366ff
code review feedback
May 31, 2024
2414b09
fix flake8
May 31, 2024
42912bb
Merge pull request #1581 from GSA/update-deps-05-31-24
ccostino May 31, 2024
5f92f9a
merge from main
May 31, 2024
29dbe45
code review feedback
May 31, 2024
7bc8e64
Merge pull request #1555 from GSA/notify-admin-1545b
ccostino May 31, 2024
5fa2e77
Merge pull request #1570 from GSA/notify-admin-1041
ccostino May 31, 2024
f6cf493
Update expired and cancelled service invite handling
ccostino May 31, 2024
37546dd
Merge pull request #1582 from GSA/invalidate-cancelled-service-invites
ccostino Jun 3, 2024
f0fcb8f
Update Python dependencies - 6/3/24
ccostino Jun 3, 2024
8152985
Merge branch 'main' into socketIO
Jun 3, 2024
4ebd573
removed socket.js
Jun 3, 2024
72e82c8
added socket.io.min.js
Jun 3, 2024
2e41b75
Remove .ds.baseline from repository
Jun 3, 2024
d12b798
removed sending status
Jun 3, 2024
89f19bb
cleared up style checks
Jun 3, 2024
d3bee61
cleared up style checks
Jun 3, 2024
8554df5
cleared up style checks
Jun 3, 2024
44a3c9a
Merge pull request #1585 from GSA/update-deps-6-3-24
ccostino Jun 3, 2024
7a9d260
fix testing
Jun 3, 2024
fec6c2f
removed comments
Jun 4, 2024
0a4cf29
added flask-socketio
Jun 4, 2024
fed2aff
cleaned up code
Jun 4, 2024
43d67a4
Update Python dependencies - 6/5/2024
ccostino Jun 5, 2024
834c6df
Merge pull request #1593 from GSA/update-deps-6-5-24
ccostino Jun 5, 2024
e5a9eed
installing socketio
Jun 5, 2024
9d3dc04
added chartjs to path in gulp
Jun 5, 2024
6125396
added socketiotestclent
Jun 6, 2024
ae7a14f
fixed js chart referenced
Jun 6, 2024
82690d6
add debug for user issue
Jun 6, 2024
adc89a8
merge from main
Jun 6, 2024
f98cff8
fixed linting issues
Jun 6, 2024
e413f8c
added sampleChartDashboard.js
Jun 6, 2024
c0b2c42
removed imported unused style issue
Jun 6, 2024
83f5b6f
add comment
Jun 6, 2024
934f892
Updated content, removed test no longer needed
jonathanbobel Jun 6, 2024
33f8f4c
fix import sort
Jun 6, 2024
4321e31
Merge pull request #1558 from GSA/socketIO
ccostino Jun 6, 2024
63bd660
code review feedback
Jun 7, 2024
da96edb
fix set and get in redis_client
Jun 7, 2024
9f9614d
Merge pull request #1596 from GSA/1305-delivery-status-content-update
ccostino Jun 8, 2024
749935e
Merge pull request #1595 from GSA/notify-admin-1588
ccostino Jun 8, 2024
a401562
Add report options 1/3/5-day
Jun 10, 2024
35e27ff
Merge main
Jun 10, 2024
ed0f5a7
removed old login announcement page and added new sign in button
Jun 10, 2024
8407f56
add back signin.html and removed login banner
Jun 11, 2024
89bd835
update testing
Jun 11, 2024
096658a
Need magic PII-free debugging method for Admin
Jun 11, 2024
cfa31af
fixed testing
Jun 11, 2024
7b8db70
fixed testing
Jun 11, 2024
53c938e
fixed css
Jun 11, 2024
c8fb1b2
fixed import errors
Jun 11, 2024
5147072
fixed e2e test
Jun 11, 2024
6be4f87
fixed end2end
Jun 11, 2024
d028bed
Removed comments
Jun 11, 2024
f6f99b6
fix bug where only exception is passed to logger
Jun 12, 2024
51a9dfd
update gunicorn config
Jun 12, 2024
4e8e1ac
fix email masking algorithm
Jun 13, 2024
b5623ca
updated css
Jun 13, 2024
79df828
Updated dependencies - 6/14/2024
ccostino Jun 14, 2024
60256c0
Merge pull request #1617 from GSA/update-deps-6-14-24
stvnrlly Jun 14, 2024
0a56941
Merge pull request #1607 from GSA/1546-remove-effective-april-16-logi…
stvnrlly Jun 14, 2024
c3ae47e
merge from main
Jun 14, 2024
ddaec17
Merge pull request #1600 from GSA/notify-admin-1457
ccostino Jun 14, 2024
e426449
Merge pull request #1611 from GSA/notify-admin-740
ccostino Jun 14, 2024
16ad4a6
revamp PII masking
Jun 17, 2024
7e53373
fix flake 8
Jun 17, 2024
c491b41
initial
Jun 17, 2024
5544400
fix vulnerability
Jun 17, 2024
00ab6f5
hmm
Jun 17, 2024
9817f9e
revert gulp
Jun 17, 2024
3674dd4
edit package lock
Jun 17, 2024
daa75c5
edit package lock
Jun 17, 2024
59b0325
Adjust npm install line and update Python dependencies
ccostino Jun 18, 2024
17bafd7
Merge pull request #1619 from GSA/notify-admin-1495
ccostino Jun 18, 2024
b26c3a7
Fix npm steps in make bootstrap
ccostino Jun 18, 2024
f539cad
Added some logging up front when the app is initialized to see if
xlorepdarkhelm Jun 7, 2024
ec9a36e
Activating CSRF for staging/demo/dev environments.
xlorepdarkhelm Jun 7, 2024
9e94b5a
saabling CSRF in dev because it breaks all the tests.
xlorepdarkhelm Jun 7, 2024
530206e
Cleaning up the logging, gave some additional notes, removed hashing.
xlorepdarkhelm Jun 17, 2024
1a385c6
More cleanup stuff.
xlorepdarkhelm Jun 17, 2024
fbc51a2
Changest made to fix things.
xlorepdarkhelm Jun 17, 2024
cdf4a40
Stuff was done.
xlorepdarkhelm Jun 17, 2024
f138984
Reversing poetry.lock changes.
xlorepdarkhelm Jun 17, 2024
79bf8d1
Better exception handling.
xlorepdarkhelm Jun 17, 2024
708af19
Fixes.
xlorepdarkhelm Jun 17, 2024
56abd15
Now not revealing env var lengths.
xlorepdarkhelm Jun 18, 2024
e68aa60
Merge pull request #1624 from GSA/fix-npm-steps
ccostino Jun 18, 2024
5429af1
pin python to 3.12.2
Jun 20, 2024
ac670ad
Merge pull request #1632 from GSA/pin_python_to_3_12_2
ccostino Jun 20, 2024
f0b95f3
Merge pull request #1599 from GSA/admin-1587_Logging_stuff
ccostino Jun 20, 2024
27befe0
Fix runtime.txt for cloud.gov and Python
ccostino Jun 20, 2024
7b5fdd4
fix raw set
Jun 20, 2024
4f93757
Merge pull request #1633 from GSA/fix-python-runtime
ccostino Jun 20, 2024
87c3efd
switch to 3.12.3
Jun 20, 2024
3b6ccc0
fix format?
Jun 20, 2024
bf38e12
Merge pull request #1636 from GSA/fix_raw_set
ccostino Jun 20, 2024
96af45d
Merge branch 'main' into pin_python_to_3_12_2
ccostino Jun 20, 2024
31cd557
Update runtime.txt to reference Python 3.12.3
ccostino Jun 20, 2024
144337e
Merge pull request #1639 from GSA/pin_python_to_3_12_2
ccostino Jun 20, 2024
82aa564
merge from main
Jun 21, 2024
81dd764
fix gunicorn config
Jun 21, 2024
9c3c2ad
Merge pull request #1643 from GSA/notify-admin-1642
ccostino Jun 24, 2024
a887f3f
Increased production memory to 2 GB
ccostino Jun 24, 2024
a9e4df0
Todays data is only todays
Jun 24, 2024
7027cae
pull main
Jun 24, 2024
a9de6be
Merge pull request #1645 from GSA/increase-prod-memory
ccostino Jun 24, 2024
b05678a
Merge pull request #1609 from GSA/notify-admin-1456
ccostino Jun 25, 2024
9685a4b
Remove code that shouldn't be in
Jun 25, 2024
7cfa001
Pull main
Jun 25, 2024
624e161
Upgrade cloudfoundry to v0.53.1 to match api app
jskinne3 Jun 25, 2024
6095471
Terraform minimum version upgrade
jskinne3 Jun 25, 2024
382c191
Missed one
jskinne3 Jun 25, 2024
302a0f5
Redis v7 in sandbox and staging env main.tf
jskinne3 Jun 25, 2024
73b42b4
Same new resource in Demo and Production envs
jskinne3 Jun 25, 2024
f591ef2
Upgrade tj-actions from v41 to v44
jskinne3 Jun 25, 2024
0974fdc
Merge pull request #1649 from GSA/jskinne3-get-sandbox-working
ccostino Jun 26, 2024
ab48aea
Merge branch 'main' into jskinne3-redis-upgrade-step-1
jskinne3 Jun 26, 2024
d59960d
Merge pull request #1650 from GSA/jskinne3-redis-upgrade-step-1
ccostino Jun 26, 2024
f218c01
Remove commented out code
Jun 26, 2024
e3a85aa
Pull main
Jun 26, 2024
18da813
Updated readme
alexjanousekGSA Jun 26, 2024
54578b5
Merge pull request #1605 from GSA/add-report-options
ccostino Jun 26, 2024
8f8e06d
Merge pull request #1656 from GSA/readme-update
ccostino Jun 26, 2024
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
18 changes: 5 additions & 13 deletions .ds.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"filename": "app/config.py",
"hashed_secret": "577a4c667e4af8682ca431857214b3a920883efc",
"is_verified": false,
"line_number": 111,
"line_number": 117,
"is_secret": false
}
],
Expand Down Expand Up @@ -423,7 +423,7 @@
"filename": "app/templates/new/components/head.html",
"hashed_secret": "ee5048791fc7ff45a1545e24f85bec3317371327",
"is_verified": false,
"line_number": 35,
"line_number": 34,
"is_secret": false
}
],
Expand Down Expand Up @@ -586,20 +586,12 @@
}
],
"tests/app/main/views/test_sign_in.py": [
{
"type": "Private Key",
"filename": "tests/app/main/views/test_sign_in.py",
"hashed_secret": "1348b145fa1a555461c1b790a2f66614781091e9",
"is_verified": false,
"line_number": 31,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "tests/app/main/views/test_sign_in.py",
"hashed_secret": "8b8b69116ee882b5e987e330f55db81aba0636f9",
"is_verified": false,
"line_number": 104,
"line_number": 90,
"is_secret": false
}
],
Expand Down Expand Up @@ -675,7 +667,7 @@
"filename": "tests/conftest.py",
"hashed_secret": "f8377c90fcfd699f0ddbdcb30c2c9183d2d933ea",
"is_verified": false,
"line_number": 3289,
"line_number": 3266,
"is_secret": false
}
],
Expand Down Expand Up @@ -710,5 +702,5 @@
}
]
},
"generated_at": "2024-05-20T16:03:05Z"
"generated_at": "2024-06-11T22:26:18Z"
}
4 changes: 2 additions & 2 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ runs:
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libcurl4-openssl-dev
- name: Set up Python 3.12
- name: Set up Python 3.12.3
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: "3.12.3"
- name: Install poetry
shell: bash
run: pip install poetry
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main", "production" ]
pull_request:
branches: [ "main", "production" ]
schedule:
- cron: '18 5 * * 3'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Check for changes to Terraform
id: changed-terraform-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44
with:
files: |
terraform/demo
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:

- name: Check for changes to egress config
id: changed-egress-config
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44
with:
files: |
deploy-config/egress_proxy/notify-admin-demo.*.acl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Check for changes to Terraform
id: changed-terraform-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44
with:
files: |
terraform/production
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Check for changes to egress config
id: changed-egress-config
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44
with:
files: |
deploy-config/egress_proxy/notify-admin-production.*.acl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Check for changes to Terraform
id: changed-terraform-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44
with:
files: |
terraform/staging
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

- name: Check for changes to egress config
id: changed-egress-config
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44
with:
files: |
deploy-config/egress_proxy/notify-admin-staging.*.acl
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.1
16.20.2
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ bootstrap: generate-version-file ## Set up everything to run the app
poetry install --sync --no-root
poetry run playwright install --with-deps
poetry run pre-commit install
source $(NVMSH) --no-use && nvm install && npm ci --no-audit
source $(NVMSH) --no-use && nvm install && npm install
source $(NVMSH) && npm ci --no-audit
source $(NVMSH) && npm run build

.PHONY: watch-frontend
Expand All @@ -40,6 +41,10 @@ run-flask-bare: ## Run flask without invoking poetry so we can override ENV var
npm-audit: ## Check for vulnerabilities in NPM packages
source $(NVMSH) && npm run audit

.PHONY: npm-audit-fix
npm-audit-fix: ## Fix vulnerabilities that do not require attentino (according to npm)
source $(NVMSH) && npm audit fix

.PHONY: help
help:
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand Down Expand Up @@ -76,8 +81,9 @@ py-test: ## Run python unit tests
poetry run coverage html -d .coverage_cache

.PHONY: dead-code
dead-code:
poetry run vulture ./app --min-confidence=100
dead-code: ## 60% is our aspirational goal, but currently breaks the build
poetry run vulture ./app ./notifications_utils --min-confidence=100


.PHONY: e2e-test
e2e-test: export NEW_RELIC_ENVIRONMENT=test
Expand Down
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You will need the following items:
[Follow the instructions here to set up the Notify.gov API.](https://github.com/GSA/notifications-api#before-you-start)

The Notify.gov API is required in order for the Notify.gov Admin UI to run, and
it will also take care of many of the steps that are listed here. The sections
it will also take care of many of the steps that are listed here. The sections
that are a repeat from the API setup are flagged with an **[API Step]** label
in front of them.

Expand Down Expand Up @@ -83,11 +83,13 @@ Your system `$PATH` environment variable is likely set in one of these
locations:

For BASH shells:

- `~/.bashrc`
- `~/.bash_profile`
- `~/.profile`

For ZSH shells:

- `~/.zshrc`
- `~/.zprofile`

Expand All @@ -97,7 +99,7 @@ environments.
Which file you need to modify depends on whether or not you are running an
interactive shell or a login shell
(see [this Stack Overflow post](https://stackoverflow.com/questions/18186929/what-are-the-differences-between-a-login-shell-and-interactive-shell)
for an explanation of the differences). If you're still not sure, please ask
for an explanation of the differences). If you're still not sure, please ask
the team for help!

Once you determine which file you'll need to modify, add these lines before any
Expand Down Expand Up @@ -158,7 +160,7 @@ _NOTE: This project currently uses the latest `1.4.x release of Terraform._
#### [API Step] Python Installation

Now we're going to install a tool to help us manage Python versions and
virtual environments on our system. First, we'll install
virtual environments on our system. First, we'll install
[pyenv](https://github.com/pyenv/pyenv) and one of its plugins,
[pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv), with Homebrew:

Expand Down Expand Up @@ -285,7 +287,7 @@ we'll use `3.12` in our example here since we recently upgraded to this version:
pyenv install 3.12
```

Next, delete the virtual environment you previously had set up. If you followed
Next, delete the virtual environment you previously had set up. If you followed
the instructions above with the first-time set up, you can do this with `pyenv`:

```sh
Expand All @@ -306,6 +308,20 @@ you'll be set with an upgraded version of Python.

_If you're not sure about the details of your current virtual environment, you can run `poetry env info` to get more information. If you've been using `pyenv` for everything, you can also see all available virtual environments with `pyenv virtualenvs`._

#### Updating the .env file for Login.gov

To configure the application for Login.gov, you will need to update the following environment variables in the .env file:

```
COMMIT_HASH=”--------”
```

Reach out to someone on the team to get the most recent Login.gov key.

```
LOGIN_PEM="INSERT_LOGIN_GOV_KEY_HERE"
```

#### Updating the .env file for E2E tests

With the newly created `.env` file in place, you'll need to make one more
Expand Down Expand Up @@ -353,7 +369,7 @@ API is running as well!
## Creating a 'First User' in the database

After you have completed all setup steps, you will be unable to log in, because there
will not be a user in the database to link to the login.gov account you are using. So
will not be a user in the database to link to the login.gov account you are using. So
you will need to create that user in your database using the 'create-test-user' command.

Open two terminals pointing to the api project and then run these commands in the
Expand All @@ -372,8 +388,6 @@ is the same one you are using in login.gov and make sure your phone number is in
If for any reason in the course of development it is necessary for your to delete your db
via the `dropdb` command, you will need to repeat these steps when you recreate your db.



## Git Hooks

We're using [`pre-commit`](https://pre-commit.com/) to manage hooks in order to
Expand Down
Loading
Loading