Skip to content

Commit 99f92dd

Browse files
committed
Add first-class support for vscode development.
1 parent 7e40fdf commit 99f92dd

File tree

5 files changed

+76
-5
lines changed

5 files changed

+76
-5
lines changed

.github/workflows/static-checking.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Setup Environment
26-
run: ./requirements.sh
26+
run: ./setup.sh
2727
- name: CloudFormation Lint - Base
2828
run: cfn-lint -t cloudformation/base.yaml
2929
- name: CloudFormation Lint - Databases

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ You can choose from three different environments to test your fixes/changes, bas
9292

9393
* Then run the command bellow to install all dependencies:
9494

95-
``./requirements.sh``
95+
``./setup.sh``
9696

9797
* Run the validation script:
9898

@@ -119,7 +119,7 @@ You can choose from three different environments to test your fixes/changes, bas
119119

120120
* Then run the command bellow to install all dependencies:
121121

122-
``./requirements.sh``
122+
``./setup.sh``
123123

124124
* Go to the ``cloudformation`` directory
125125

@@ -158,7 +158,7 @@ You can choose from three different environments to test your fixes/changes, bas
158158

159159
* Then run the command bellow to install all dependencies:
160160

161-
``./requirements.sh``
161+
``./setup.sh``
162162

163163
* Go to the ``cloudformation`` directory
164164

setup-vscode.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
./setup.sh
5+
6+
code --install-extension DavidAnson.vscode-markdownlint
7+
code --install-extension VisualStudioExptTeam.vscodeintellicode
8+
code --install-extension be5invis.toml
9+
code --install-extension donjayamanne.githistory
10+
code --install-extension ms-azuretools.vscode-docker
11+
code --install-extension ms-python.python
12+
code --install-extension ms-python.vscode-pylance
13+
code --install-extension redhat.vscode-yaml
14+
code --install-extension twixes.pypi-assistant
15+
code --install-extension aws-scripting-guy.cform
16+
17+
python_path=$(which python)
18+
19+
vscode_settings='{
20+
"explorer.autoReveal": false,
21+
"files.autoSave": "onFocusChange",
22+
"files.exclude": {
23+
"**/*.egg-info": true,
24+
"**/.mypy_cache/": true,
25+
"**/.pytest_cache/": true,
26+
"**/__pycache__/": true
27+
},
28+
"outline.showArrays": false,
29+
"outline.showConstants": false,
30+
"outline.showFields": false,
31+
"outline.showKeys": false,
32+
"outline.showNull": false,
33+
"outline.showStrings": false,
34+
"outline.showTypeParameters": false,
35+
"outline.showVariables": false,
36+
"python.analysis.extraPaths": [
37+
],
38+
"python.analysis.memory.keepLibraryAst": true,
39+
"python.formatting.blackArgs": ["--line-length 120", "--target-version py36"],
40+
"python.formatting.provider": "black",
41+
"python.languageServer": "Pylance",
42+
"python.linting.enabled": true,
43+
"python.linting.flake8Args": ["--max-line-length 120"],
44+
"python.linting.flake8Enabled": true,
45+
"python.linting.mypyCategorySeverity.error": "Hint",
46+
"python.linting.mypyCategorySeverity.note": "Hint",
47+
"python.linting.mypyEnabled": true,
48+
"python.linting.pylintEnabled": false,
49+
"python.pythonPath": "'$python_path'",
50+
"python.terminal.activateEnvironment": true,
51+
"workbench.editor.labelFormat": "default",
52+
"workbench.tree.indent": 16,
53+
"yaml.customTags": [
54+
"!Equals sequence",
55+
"!FindInMap sequence",
56+
"!GetAtt",
57+
"!GetAZs",
58+
"!ImportValue",
59+
"!Join sequence",
60+
"!Ref",
61+
"!Select sequence",
62+
"!Split sequence",
63+
"!Sub"
64+
]
65+
}
66+
'
67+
68+
rm -rf .vscode
69+
mkdir .vscode
70+
echo "$vscode_settings" > .vscode/settings.json

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import os
22
from io import open
33
from setuptools import setup
4+
from typing import Dict
45

56
here = os.path.abspath(os.path.dirname(__file__))
6-
about = {}
7+
about: Dict[str, str] = {}
78
path = os.path.join(here, "awswrangler", "__metadata__.py")
89
with open(file=path, mode="r", encoding="utf-8") as f:
910
exec(f.read(), about)
File renamed without changes.

0 commit comments

Comments
 (0)