Skip to content

Commit bb1eda7

Browse files
chore(governance): add pre-configured dev environment with GitPod.io to ease contributions (#1403)
Co-authored-by: Heitor Lessa <[email protected]>
1 parent bc3a1a7 commit bb1eda7

File tree

4 files changed

+50
-12
lines changed

4 files changed

+50
-12
lines changed

Diff for: .gitpod.Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See here all gitpod images available: https://hub.docker.com/r/gitpod/workspace-python-3.9/tags
2+
# Current python version: 3.9.13
3+
FROM gitpod/workspace-python-3.9@sha256:de87d4ebffe8daab2e8fef96ec20497ae4f39e8dcb9dec1483d0be61ea78e8cd
4+
5+
WORKDIR /app
6+
ADD . /app
7+
8+
# Installing pre-commit as system package and not user package. Git needs this to execute pre-commit hooks.
9+
RUN export PIP_USER=no
10+
RUN python3 -m pip install pre-commit

Diff for: .gitpod.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
tasks:
4+
- init: make dev-gitpod
5+
vscode:
6+
extensions:
7+
- ms-python.python # IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.
8+
- littlefoxteam.vscode-python-test-adapter # Run your Python tests in the Sidebar of Visual Studio Code
9+
- ms-azuretools.vscode-docker # Makes it easy to create, manage, and debug containerized applications.
10+
- davidanson.vscode-markdownlint # Markdown linting and style checking for Visual Studio Code
11+
- bungcip.better-toml # Better TOML Language support
12+
- oderwat.indent-rainbow # Makes indentation easier to read
13+
- yzhang.markdown-all-in-one # Autoformat, better visualization, snippets, and markdown export to multiple fmts
14+
- bierner.markdown-mermaid # Previews mermaid diagrams when previewing markdown
15+
- matangover.mypy # Highlight mypy issues
16+
- njpwerner.autodocstring # Auto-generate docsstrings in numpy format that we use
17+
- netcorext.uuid-generator # For those helping create code snippets for docs
18+
- streetsidesoftware.code-spell-checker # Spell checker that works with camel case too
19+
- bungcip.better-toml # In case GitPod doesn't have support for TOML pyproject.toml

Diff for: CONTRIBUTING.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
2+
13
# Contributing Guidelines
24

35
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
@@ -15,31 +17,33 @@ reported the issue. Please try to include as much information as you can.
1517

1618
## Contributing via Pull Requests
1719

18-
We are temporarily de-prioritizing and pausing external contributions until end of July 2022. You can read more here: https://github.com/awslabs/aws-lambda-powertools-python/issues/1076
19-
20-
<!-- Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
20+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
2121

2222
1. You are working against the latest source on the **develop** branch.
2323
2. You check existing open, and recently merged pull requests to make sure someone else hasn't addressed the problem already.
24-
3. You open a [RFC issue](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=RFC%2C+triage&template=rfc.md&title=RFC%3A+) to discuss any significant work - we would hate for your time to be wasted. -->
24+
3. You open an [issue](https://github.com/awslabs/aws-lambda-powertools-python/issues/new/choose) before you begin any implementation. We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.
2525

2626
### Dev setup
2727

28+
Firstly, [fork the repository](https://github.com/awslabs/aws-lambda-powertools-python/fork).
29+
30+
To setup your development environment, we recommend using our pre-configured Cloud environment: https://gitpod.io/#https://github.com/YOUR_USERNAME/aws-lambda-powertools-python. Replace YOUR_USERNAME with your GitHub username or organization so the Cloud environment can target your fork accordingly.
31+
32+
Alternatively, you can use `make dev` within your local virtual environment.
33+
2834
To send us a pull request, please follow these steps:
2935

30-
1. Fork the repository.
31-
2. Install dependencies in a virtual env with poetry, and pre-commit hooks: `make dev`
32-
3. Create a new branch to focus on the specific change you are contributing e.g. `improv/logger-debug-sampling`
33-
4. Run all tests, and code baseline checks: `make pr`
36+
1. Create a new branch to focus on the specific change you are contributing e.g. `improv/logger-debug-sampling`
37+
2. Run all tests, and code baseline checks: `make pr`
3438
- Git hooks will run linting and formatting while `make pr` run deep checks that also run in the CI process
35-
4. Commit to your fork using clear commit messages.
36-
5. Send us a pull request with a [conventional semantic title](https://github.com/awslabs/aws-lambda-powertools-python/pull/67), and answering any default questions in the pull request interface.
37-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
39+
3. Commit to your fork using clear commit messages.
40+
4. Send us a pull request with a [conventional semantic title](https://github.com/awslabs/aws-lambda-powertools-python/pull/67), and answering any default questions in the pull request interface.
41+
5. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
3842

3943
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
4044
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
4145

42-
#### Local documentation
46+
### Local documentation
4347

4448
You might find useful to run both the documentation website and the API reference locally while contributing:
4549

Diff for: Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ dev:
99
poetry install --extras "pydantic"
1010
pre-commit install
1111

12+
dev-gitpod:
13+
pip install --upgrade pip poetry
14+
poetry install --extras "pydantic"
15+
pre-commit install
16+
1217
format:
1318
poetry run isort aws_lambda_powertools tests examples
1419
poetry run black aws_lambda_powertools tests examples

0 commit comments

Comments
 (0)