Skip to content

Commit c89ac7c

Browse files
authored
Added initial Gitpod configuration (#1)
## [1.0.0] - 2017-06-20 ### Added - Gitpod configuration added, including Dockerfile - Pre-commit hooks, flake8, black, pytest, and mypy - Theia customizations - "entrypoint.sh" for prettier prompt and installation of pre-commit hooks. - "setup.cfg", mostly to make Flake8 play nice with Black. - This Changelog, based on keepachangelog.com
1 parent b660b00 commit c89ac7c

16 files changed

+581
-3
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 210
3+
exclude = .git,__pycache__,./venv,./env,./.env,cfn-lint,./.venv,./node_modules

.gitpod.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
image:
2+
file: Dockerfile
3+
4+
tasks:
5+
- init: |
6+
python3 -m venv .venv
7+
export PIP_USER=no
8+
poetry config virtualenvs.in-project true
9+
poetry config virtualenvs.create false
10+
poetry install
11+
12+
echo 'source entrypoint.sh' >> .venv/bin/activate
13+
command: |
14+
source .venv/bin/activate

.pre-commit-config.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
repos:
3+
- repo: local
4+
hooks:
5+
- id: flake8
6+
name: flake8
7+
entry: poetry run flake8 .
8+
language: system
9+
types: [python]
10+
always_run: true
11+
pass_filenames: false
12+
- id: black
13+
name: black
14+
entry: poetry run black .
15+
language: system
16+
types: [python]
17+
always_run: true
18+
pass_filenames: false
19+
- id: mypy
20+
name: mypy
21+
entry: poetry run mypy .
22+
language: system
23+
types: [python]
24+
always_run: true
25+
pass_filenames: false
26+
- id: pytest
27+
name: pytest
28+
entry: poetry run pytest -vv
29+
language: system
30+
types: [python]
31+
always_run: true
32+
pass_filenames: false

.theia/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"workbench.iconTheme": "theia-file-icons",
3+
"python.autoComplete.extraPaths": [
4+
".venv/lib/python3.8/site-packages",
5+
".venv/lib64/python3.8/site-packages"
6+
],
7+
"editor.autoSave": "on",
8+
"editor.minimap.enabled": true,
9+
"editor.rulers": [
10+
88
11+
],
12+
"python.pythonPath": ".venv/bin/python3"
13+
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [1.0.0] - 2017-06-20
8+
### Added
9+
- Gitpod configuration added, including Dockerfile
10+
- Pre-commit hooks, flake8, black, pytest, and mypy
11+
- Theia customizations
12+
- "entrypoint.sh" for prettier prompt and installation of pre-commit hooks.
13+
- "setup.cfg", mostly to make Flake8 play nice with Black.
14+
- This Changelog, based on keepachangelog.com

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM gitpod/workspace-full
2+
RUN python3 -m venv .venv
3+
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
4+
RUN npm install -g aws-cdk
5+
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
6+
RUN unzip awscliv2.zip
7+
RUN sudo ./aws/install

README.rst renamed to README.md

File renamed without changes.

entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s)") $ '
3+
pre-commit install
4+
echo 'We are now ready to go, welcome!!'

0 commit comments

Comments
 (0)