mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
utils dependencies updates
This commit is contained in:
32
README.md
32
README.md
@@ -301,30 +301,38 @@ brew services start postgresql@15
|
|||||||
brew services start redis
|
brew services start redis
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Upgrading Python in existing projects
|
||||||
|
|
||||||
### Switching to different environment
|
If you're upgrading an existing project to a newer version of Python, you can
|
||||||
|
follow these steps to get yourself up-to-date.
|
||||||
|
|
||||||
Once all of pre-requisites for the project are installed and for first time setup or if you're upgrading an existing project to newer environment with newer python version follow below steps to create new virtual environment.
|
First, use `pyenv` to install the newer version of Python you'd like to use;
|
||||||
|
we'll use `3.12` in our example here since we recently upgraded to this version:
|
||||||
First install the newer Python version we need with `pyenv`, (say the planned upgrade to 3.15) like so :
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pyenv install 3.12
|
pyenv install 3.12
|
||||||
```
|
```
|
||||||
|
|
||||||
Now go into the project directory (`notifications-api` by default), create a
|
Next, delete the virtual environment you previously had set up. If you followed
|
||||||
virtual environment, and set the local Python version to point to the virtual
|
the instructions above with the first-time set up, you can do this with `pyenv`:
|
||||||
environment (assumes version Python `3.12.2` is what is installed on your
|
|
||||||
machine):
|
```sh
|
||||||
|
pyenv virtualenv-delete notify-api
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, make sure you are in your project directory and recreate the same virtual
|
||||||
|
environment with the newer version of Python you just installed:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd notifications-api
|
cd notifications-api
|
||||||
pyenv virtualenv 3.12.2 notify-api-upgrade
|
pyenv virtualenv 3.12.2 notify-api
|
||||||
pyenv local notify-api-upgrade
|
pyenv local notify-api
|
||||||
```
|
```
|
||||||
|
|
||||||
_If you're not sure which version of Python was installed with `pyenv`, you can check by running `pyenv versions` and it'll list everything available currently.You can deactivate the current environment by running `source deactivate` or `deactivate`.Close the shell session and reopen a new shell session should show the newer virtual environment._
|
At this point, proceed with the rest of the instructions here in the README and
|
||||||
_You can get version,executable, and other details for any environment by running `poetry env info`._
|
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`._
|
||||||
|
|
||||||
|
|
||||||
### Final environment setup
|
### Final environment setup
|
||||||
|
|||||||
8
poetry.lock
generated
8
poetry.lock
generated
@@ -2595,7 +2595,7 @@ requests = ">=2.0.0"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notifications-utils"
|
name = "notifications-utils"
|
||||||
version = "0.3.0"
|
version = "0.4.0"
|
||||||
description = ""
|
description = ""
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.12.2"
|
python-versions = "^3.12.2"
|
||||||
@@ -2646,8 +2646,8 @@ werkzeug = "^3.0.1"
|
|||||||
[package.source]
|
[package.source]
|
||||||
type = "git"
|
type = "git"
|
||||||
url = "https://github.com/GSA/notifications-utils.git"
|
url = "https://github.com/GSA/notifications-utils.git"
|
||||||
reference = "341886d"
|
reference = "HEAD"
|
||||||
resolved_reference = "341886df778842aaaeefe2a3bad4d7878bb655b9"
|
resolved_reference = "4cf526bc1fd9532507936c174418dbd3be52c925"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "numpy"
|
name = "numpy"
|
||||||
@@ -4695,4 +4695,4 @@ multidict = ">=4.0"
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.12.2"
|
python-versions = "^3.12.2"
|
||||||
content-hash = "17452ec954f93a8488cf8e34b1a3bba9d8f0a8a234078a5713655955c9e3d247"
|
content-hash = "4146fba7b1b851dfdca41511a2e7239ed11999b293fa7312c5d57a296a375fd5"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ marshmallow = "==3.20.2"
|
|||||||
marshmallow-sqlalchemy = "==0.30.0"
|
marshmallow-sqlalchemy = "==0.30.0"
|
||||||
newrelic = "*"
|
newrelic = "*"
|
||||||
notifications-python-client = "==9.0.0"
|
notifications-python-client = "==9.0.0"
|
||||||
notifications-utils = {git = "https://github.com/GSA/notifications-utils.git", rev="341886d"}
|
notifications-utils = {git = "https://github.com/GSA/notifications-utils.git"}
|
||||||
oscrypto = "==1.3.0"
|
oscrypto = "==1.3.0"
|
||||||
packaging = "==23.2"
|
packaging = "==23.2"
|
||||||
poetry-dotenv-plugin = "==0.2.0"
|
poetry-dotenv-plugin = "==0.2.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user