-
Notifications
You must be signed in to change notification settings - Fork 3
Additional Developer Notes
This section covers a few topics we think might help developers after setup.
If you are using Windows, you will need to install and use WSL for development rather than trying to use PowerShell due to various limitations with the tool.
Set up git secrets to protect oneself from committing sensitive information such as passwords to the repository.
- First install AWS git-secrets utility in your PATH so it can be run at the command line: https://github.com/awslabs/git-secrets#installing-git-secrets
- Once you have git-secrets installed, run the
fecfile-web-api/install-git-secrets-hook.sh
shell script in the root directory of your cloned fecfile-web-api repo to install the pre-commit hooks. NOTE: The pre-commit hook is installed GLOBALLY by default so commits to all cloned repositories on your computer will be scanned for sensitive data. See the comments at the top of the script for local install options. - See git-secrets README for more features: https://github.com/awslabs/git-secrets#readme
Black is the Python code formatter used on the project.
- Install using
pip install black
. - If using vscode, install the Black extension from Microsoft and then add (or update) the following section of your settings.json to the following so that code is formatted on save:
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
}
- To format a specific file or directory manually, use
black <file_or_directory>
Prettier js is the Typescript/HTML/SCSS formatter used on the project.
In vscode install the Prettier - Code formatter
.
In your vscode settings, set the following:
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Make sure that there are not prettier settings in your settings file that will override the ones in prettierrc.js
Vscode allows you to format a file automatically when you save it. To enable this, open Settings and search for "format on save". Check the box of "Editor: Format on Save".
As a best practice policy, please commit any feature code changes made during the day to origin each evening before signing off for the day.
The project is using the Google Python Style Guide as the baseline to keep code style consistent across project repositories. See here for comment style rules: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings