You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This package contains common Python utility classes and functions.
8
8
* Decrypting values with KMS
9
9
* Encoding and decoding records using a given Avro schema
10
10
* Connecting to and querying a MySQL database
11
-
* Connecting to and querying a PostgreSQL database
11
+
* Connecting to and querying a PostgreSQL database using a connection pool
12
12
* Connecting to and querying Redshift
13
13
14
14
## Functions
@@ -28,4 +28,23 @@ pip install '.[tests]'
28
28
deactivate &&source testenv/bin/activate
29
29
```
30
30
31
-
Add any new dependencies required by code in the `nypl_py_utils` directory to the `dependencies` section of `pyproject.toml`. Add dependencies only required by code in the `tests` directory to the `[project.optional-dependencies]` section.
31
+
Add any new dependencies required by code in the `nypl_py_utils` directory to the `dependencies` section of `pyproject.toml`. Add dependencies only required by code in the `tests` directory to the `[project.optional-dependencies]` section.
32
+
33
+
## Git workflow
34
+
This repo uses the [Main-QA-Production](https://github.com/NYPL/engineering-general/blob/main/standards/git-workflow.md#main-qa-production) git workflow.
35
+
36
+
[`main`](https://github.com/NYPL/python-utils/tree/main) has the latest and greatest commits, [`qa`](https://github.com/NYPL/python-utils/tree/qa) has what's in our QA environment, and [`production`](https://github.com/NYPL/python-utils/tree/production) has what's in our production environment.
37
+
38
+
### Ideal Workflow
39
+
- Cut a feature branch off of `main`
40
+
- Commit changes to your feature branch
41
+
- File a pull request against `main` and assign a reviewer (who must be an owner)
42
+
- In order for the PR to be accepted, it must pass all unit tests, have no lint issues, and update the CHANGELOG (or contain the `Skip-Changelog` label in GitHub)
43
+
- After the PR is accepted, merge into `main`
44
+
- Merge `main` > `qa`
45
+
- Deploy app to QA on GitHub and confirm it works
46
+
- Merge `qa` > `production`
47
+
- Deploy app to production on GitHub and confirm it works
48
+
49
+
## Deployment
50
+
The utils repo is deployed as a PyPI package [here](https://pypi.org/project/nypl-py-utils/) and as a Test PyPI package for QA purposes [here](https://test.pypi.org/project/nypl-py-utils/). In order to be deployed, the version listed in `pyproject.toml`**must be updated**. To deploy to Test PyPI, create a new release in GitHub and tag it `qa-vX.X.X`. The GitHub Actions deploy-qa workflow will then build and publish the package. To deploy to production PyPI, create a release and tag it `production-vX.X.X`.
0 commit comments