mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 10:42:41 -05:00
Improvements based on review feedback
h/t to @stvnrlly for the suggestions! Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
27
README.md
27
README.md
@@ -40,12 +40,12 @@ This project currently works with these major versions of the following main
|
|||||||
components:
|
components:
|
||||||
|
|
||||||
- Python 3.9.x
|
- Python 3.9.x
|
||||||
- PostgreSQL 15.x
|
- PostgreSQL 15.x (version 12.x is used in the hosted environments)
|
||||||
|
|
||||||
These instructions will walk you through how to set your machine up with all of
|
These instructions will walk you through how to set your machine up with all of
|
||||||
the required tools for this project.
|
the required tools for this project.
|
||||||
|
|
||||||
### Common Steps and Project Pre-Requisites
|
### Project Pre-Requisite Setup
|
||||||
|
|
||||||
On MacOS, using [Homebrew](https://brew.sh/) for package management is highly
|
On MacOS, using [Homebrew](https://brew.sh/) for package management is highly
|
||||||
recommended. This helps avoid some known installation issues. Start by following
|
recommended. This helps avoid some known installation issues. Start by following
|
||||||
@@ -62,8 +62,8 @@ xcode-select –-install
|
|||||||
|
|
||||||
If this is your first time installing Homebrew on your machine, you may need to
|
If this is your first time installing Homebrew on your machine, you may need to
|
||||||
add its binaries to your system's `$PATH` environment variable so that you can
|
add its binaries to your system's `$PATH` environment variable so that you can
|
||||||
use the `brew` command. Try running `brew help` to see if Homebrew is
|
use the `brew` command. Try running `brew help` to see if Homebrew is
|
||||||
recognized and runs properly. If that fails, then you'll need to add a
|
recognized and runs properly. If that fails, then you'll need to add a
|
||||||
configuration line to wherever your `$PATH` environment variable is set.
|
configuration line to wherever your `$PATH` environment variable is set.
|
||||||
|
|
||||||
Your system `$PATH` environment variable is likely set in one of these
|
Your system `$PATH` environment variable is likely set in one of these
|
||||||
@@ -227,14 +227,16 @@ Run this command so that they're available at all times going forward on your
|
|||||||
machine:
|
machine:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew services start postgresql@15 redis
|
brew services start postgresql@15
|
||||||
|
brew services start redis
|
||||||
```
|
```
|
||||||
|
|
||||||
If they're already running, you can run this command instead to make sure the
|
If they're already running, you can run this command instead to make sure the
|
||||||
latest updates are applied to both services:
|
latest updates are applied to both services:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew services restart postgresql@15 redis
|
brew services restart postgresql@15
|
||||||
|
brew services restart redis
|
||||||
```
|
```
|
||||||
|
|
||||||
### First-Time Project Setup
|
### First-Time Project Setup
|
||||||
@@ -281,15 +283,12 @@ In addition to some infrastructure setup, this will also create a local `.env`
|
|||||||
file for you in the project's root directory, which will include a handful of
|
file for you in the project's root directory, which will include a handful of
|
||||||
project-specific environment variables.
|
project-specific environment variables.
|
||||||
|
|
||||||
**OPTIONAL:** If you want to send data to New Relic from your local develpment
|
|
||||||
environment, set the `NEW_RELIC_LICENSE_KEY` environment variable within the
|
|
||||||
`.env` file that was just created.
|
|
||||||
|
|
||||||
Lastly, if you didn't already start PostgreSQL and Redis above, be sure to do
|
Lastly, if you didn't already start PostgreSQL and Redis above, be sure to do
|
||||||
so now:
|
so now:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew services start postgresql@15 redis
|
brew services start postgresql@15
|
||||||
|
brew services start redis
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running the Project and Routine Maintenance
|
## Running the Project and Routine Maintenance
|
||||||
@@ -376,6 +375,12 @@ different method of installing Python. The recommended approach is to use
|
|||||||
[`pyenv`](https://github.com/pyenv/pyenv), as noted above in the installation
|
[`pyenv`](https://github.com/pyenv/pyenv), as noted above in the installation
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
|
If you're using PyCharm for Python development, we've noticed some quirkiness
|
||||||
|
with the IDE and the interaction between Poetry and virtual environment
|
||||||
|
management that could cause a variety of problems to come up during project
|
||||||
|
setup and dependency management. Other tools, such as Visual Studio Code, have
|
||||||
|
proven to be a smoother experience for folks.
|
||||||
|
|
||||||
### PostgreSQL Installation Errors
|
### PostgreSQL Installation Errors
|
||||||
|
|
||||||
A direct installation of PostgreSQL will not put the `createdb` command on your
|
A direct installation of PostgreSQL will not put the `createdb` command on your
|
||||||
|
|||||||
@@ -50,9 +50,3 @@ NOTIFY_E2E_TEST_PASSWORD="don't write secrets to the sample file"
|
|||||||
FLASK_APP=application.py
|
FLASK_APP=application.py
|
||||||
FLASK_DEBUG=true
|
FLASK_DEBUG=true
|
||||||
WERKZEUG_DEBUG_PIN=off
|
WERKZEUG_DEBUG_PIN=off
|
||||||
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
# New Relic
|
|
||||||
NEW_RELIC_CONFIG_FILE=newrelic.ini
|
|
||||||
NEW_RELIC_LICENSE_KEY="don't write secrets to the sample file"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user