Skip to content

Commit 0cb10ca

Browse files
Merge branch 'main' into dev
2 parents 94bd48d + 7f7d669 commit 0cb10ca

File tree

5 files changed

+56
-10
lines changed

5 files changed

+56
-10
lines changed

.github/workflows/pull_request.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@ jobs:
1616
runs-on: ubuntu-latest
1717
env:
1818
ROLE_ARN: ${{ secrets.ROLE_ARN }}
19+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
20+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1921
steps:
20-
- name: Configure AWS
21-
uses: aws-actions/configure-aws-credentials@v4
22-
with:
23-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
24-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25-
aws-region: us-east-1
26-
2722
- name: Check out repository
2823
uses: actions/checkout@v4
2924

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
33
[![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/boto3-refresh-session/push.yml?logo=github)](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
44
![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
5-
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/michaelthomasletts/boto3-refresh-session/total?logo=github)
65
![GitHub last commit](https://img.shields.io/github/last-commit/michaelthomasletts/boto3-refresh-session?logo=github)
76
![GitHub Repo stars](https://img.shields.io/github/stars/michaelthomasletts/boto3-refresh-session?logo=github)
87
![GitHub forks](https://img.shields.io/github/forks/michaelthomasletts/boto3-refresh-session?logo=github)
@@ -15,14 +14,15 @@ A simple Python package for refreshing AWS temporary credentials in ``boto3`` au
1514
- [Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
1615
- [Source Code](https://github.com/michaelthomasletts/boto3-refresh-session)
1716
- [PyPI](https://pypi.org/project/boto3-refresh-session/)
17+
- [Contributing](https://michaelthomasletts.github.io/boto3-refresh-session/contributing.html)
1818

1919
### Why should I use this?
2020

2121
It is common for data pipelines and workflows that interact with the AWS API via
2222
`boto3` to run for a long time and, accordingly, for temporary credentials to
2323
expire.
2424

25-
Usually, engineers deal with that problem one of two ways:
25+
Usually, engineers deal with that problem one of two different ways:
2626

2727
- A `try except` block that catches `botocore.exceptions.ClientError` exceptions
2828
- A similar approach as that used in this project -- that is, using methods available

doc/contributing.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Contributing
2+
============
3+
4+
Thank you for choosing to contribute to this project!
5+
6+
Please follow the below documentation closely.
7+
8+
Requirements
9+
------------
10+
11+
- Python 3.10+
12+
- An AWS account
13+
- An IAM role with ``s3:ListBuckets`` permissions
14+
- A local environment variable named ``ROLE_ARN`` containing your IAM role ARN
15+
16+
Steps
17+
-----
18+
19+
1. Fork this project.
20+
2. Clone the newly created (i.e. forked) repository in your account to your local machine.
21+
3. From your terminal, navigate to where the forked repository was cloned to your local machine, i.e. ``cd boto3-refresh-session``.
22+
4. Run ``poetry install --all-groups``
23+
24+
* This command installs all developer and package dependencies.
25+
26+
5. Run ``pre-commit install && pre-commit install-hooks``
27+
28+
* This command installs all pre-commit hooks.
29+
30+
6. Create a local environment variable containing your role ARN from your terminal by running ``export ROLE_ARN=<your role ARN>``
31+
7. Make your changes.
32+
33+
* You will be met by a pull request checklist when you attempt to create a pull request with your changes. Follow that checklist to ensure your changes satisfy the requirements in order to expedite the review process.
34+
35+
8. If your changes include an additional dependency, then you will need to run ``poetry install <dependency>``. This command will update ``pyproject.toml`` with your dependency.
36+
9. Commit and push your changes to a branch on the forked repository.
37+
38+
* ``pre-commit`` will run a few checks when ``git commit`` is run. Those checks **must** succeed for you to proceed to ``git push``!
39+
40+
10. Open a pull request that compares your forked repository branch with the ``main`` branch of the production repository.
41+
11. Upon creation (or update), your pull request will:
42+
43+
* Trigger status checks
44+
45+
* .. warning::
46+
**Forked pull requests cannot use repository secrets!** Therefore, unit tests cannot be performed via Github Actions! Please bear with the codeowners as they evaluate your work, due to that limitation. Include screenshots of successful local ``pre-commit`` runs in order to expedite the review process! Apologies -- this limitation of Github is steadfast, and the codeowners are looking for additional strategies for circumventing this limitation in the meantime. We understand it is frustrating that status checks will fail, no matter what, until a solution is found.
47+
48+
* Require code owner approval in order to be merged
49+
50+
12. Make and submit additional changes, if requested; else, merge your approved pull request.

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
Installation <installation>
1212
Authorization <authorization>
1313
Authors <authors>
14+
Contributing <contributing>
1415

1516
boto3-refresh-session
1617
---------------------

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "boto3-refresh-session"
3-
version = "0.1.21"
3+
version = "0.1.26"
44
description = "A simple Python package for refreshing AWS temporary credentials in boto3 automatically."
55
authors = [
66
{name = "Mike Letts",email = "lettsmt@gmail.com"}

0 commit comments

Comments
 (0)