Skip to content

Developer Headstart

Overview

This space contain the process and guidance for developers to develop this project

There are many ways to set up projects and play the roles into the dynamic environments There are a lot of components that still required to make sure it works.

Documents

python3 -m venv venv && source venv/Scripts/activate && python -m pip install -r requirements.txt

The list of documentations that developers required to read through:

  1. Read README with overall project context

  2. The project detail implement ideas.

  3. The project architecture (SAD, Flows, ...).

  4. The document from Cloud Provider, currently is Google Cloud Platform

  5. The connector of database backend, currently is MySQL.

  6. The use cases of service account in the project

  7. Development CI/CD process

For SSH connection, used: https://zellwk.com/blog/github-actions-deploy/

  1. The Python way: https://docs.python.org/3/using/windows.html

  2. Python Setup YAML: https://pyyaml.org/wiki/PyYAMLDocumentation

Configuration

  1. Configuration for Ini files

  2. Connect to GCP Resources:

Login Default:

gcloud auth application-default login

You will see the input

Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?---------------------------------------


Credentials saved to file: [--------------\gcloud\application_default_credentials.json]

These credentials will be used by any library that requests Application Default Credentials (ADC).

Quota project "storm-spirit" was added to ADC which can be used by Google client libraries for billing and quota. Note that some services may still bill the project owning the resource.

Then copy the file path to [GCP] SA_CREDENTIALS_PATH

Verify

gcloud auth list

Set your account

# E.g: declare YOUR_IAM_ACCOUNT_EMAIL=
gcloud config set account $YOUR_IAM_ACCOUNT_EMAIL
  1. Establish the connection and testing

Best Practices

  1. Import packages in Python scripts

a) In package, using relative import

b) In scripts, using hard import

  1. Config shebang for script instruction, read more at She bang Document

  2. Read through config ADC on GCP Application Default Credentials

Set up

For the developer, this step-to-step installment guidance below works on your local environment.

  1. Install Docker and docker-compose

Validate the status of docker and docker-compose is online

docker version
docker-compose version

You can install Docker Desktop to control the images and configuration for Docker.

  1. Start local server:

Automatically process has been done with Makefile and you just need to use the below command to call docker daemon to do the rest.

make serve
  1. View API docs at http://127.0.0.1:5000/redoc or http://localhost:5000/docs

Deployment

Deployments using Google Cloud Run

Note

[1] Config .gcloudignore https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore

[1] Clone from master về [2] Checkout -b ... [3] Khởi tạo python -m venv venv [4] Activate source venv/Scripts/activate ---- Git/Bash (trong máy) [5] Dependencies python -m pip install -r requirement.txt -- lafm tuong tự cho dev [6] pre-commit install [7] User working for compoent [8] Bỏ vào ... [9] ruff . [10] Push -> Review

  1. Have you documented all the changes in your PR? NOTE If your PR contains only changes to contrib directory (community contributed Expectations), please skip this step.

Please group in the following order: [FEATURE], [BUGFIX], [DOCS], [MAINTENANCE]

You can see the Newer Changelog here:

Set up dependencies

  • Communication. Pick one: Slack | Skype | Zalo | etc..

  • Budget

  • Technical Decisions

  • Version Control: Github

  • Language | Framework

  • Database Structure

  • Cloud providers: AWS | Google Cloud.

  • Frontend: React

  • Mobile: Flutter

  • Official Documents for Project. Pick: Confluence

  • Colloborate:

  • Figma

  • Spreadsheets

  • Store at: Google Drive [Spreadsheets], [Diagrams]

Reference

https://docs.greatexpectations.io/docs/contributing/contributing_checklist

https://google.github.io/styleguide/pyguide.html