This is not an officially supported Google product.
This repository is based on a template that can be used to seed a repository for a new Google open source project. See https://opensource.google/docs/releasing/
This template uses the Apache license, as is Google’s default. See the documentation for instructions on using alternate license.
Every file containing source code must include copyright and license information. This includes any JS/CSS files that you might be serving out to browsers. (This is to help well-intentioned people avoid accidental copying that doesn’t comply with the license.)
Apache header:
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
git init
git remote add origin git@github.com:googleinterns/power-data-graphing-intern-2020.git
git checkout main
git pull
...
make local changes
...
git add your_file_name
git commit -m "Changes description"
git push -u origin main
If you encountered “Permission denied (publickey), please set up SSH key following the instruction at: https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
Note: If you met compatbility issue, please consider install Node to v18.12.0 and Angular Cli to 14.2.13
npm install -g @angular/cli
Check version by running
ng version
go to fronend folder, and run following commands to build the frontend
npm install
ng serve
Make sure you have python3.7+, pip3, python3-venv installed on your machine
To check pip3 version, run pip3 -V
, or run sudo apt-get install python3-pip
to install it on your machine
Run sudo apt-get install python3-venv
to install python3-venv.
python3 -m venv venv
or virtualenv venv
. (Recommend to put the environment folder at project’s root folder)source venv/bin/activate
pip3 install wheel
pip3 install 'package-name'
pip3 install -r requirements.txt
(Only need to run this command at the first time)./build.sh
deactivate
After finishing set up the frontend and backend, open the browser(recommend chrome) and visit “http://localhost:4200/”, you should be able to see the website connected with the backend.
gcloud init
, auenticate with your google acount, and select the option of setting up a new project by entering a new project id, for tank-big-data-plotting, the project id is: google.com:tank-big-data-plotting-285623ng build --prod
. Then go to the generated /dist folder, run gcloud app deploy
. Make sure if your gcloud project setup is correctly, and the target service is set as defaultgcloud app deploy
, and make sure the target service is set as api.Note: If you meet into permission issue, please send requests to longzhao@google.com to ask for GCP project permission.
If you need to debug the project, please go to the following links to check for debugging info
Frontend real time logs: https://pantheon.corp.google.com/logs/query;query=resource.type%3D%22gae_app%22%0Aresource.labels.module_id%3D%22default%22;cursorTimestamp=2023-11-21T21:04:29.604806Z;duration=PT1H?serviceId=default&project=google.com:tank-big-data-plotting-285623
Backend real time logs: https://pantheon.corp.google.com/logs/query;query=resource.type%3D%22gae_app%22%0Aresource.labels.module_id%3D%22api%22;duration=PT1H?serviceId=api&versionId=20221101t190352&project=google.com:tank-big-data-plotting-285623