Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...



The following sections will explain the tabs organizing the structure of CBE Clima





These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
select weather file persists, user choice is kept in memory
git clone https://github.com/<your-account-name>/clima.git
cd climapipenv sync --devgit remote add upstream https://github.com/CenterForTheBuiltEnvironment/clima.git
git remote -vgit branch -a> * main
remotes/origin/HEAD -> origin/main
remotes/origin/development
remotes/origin/maingit checkout development
git checkout -b development origin/developmentgit checkout -b <your-branch-name>git push origin <your-branch-name>pipenv run ruff check .
pipenv run ruff format .pipenv run pre-commit install
# optional: run on all files
pipenv run pre-commit run --all-filespipenv sync --dev
pipenv run playwright install # Required to install browserspipenv run python main.pycd tests
pipenv run pytest --base-url=http://127.0.0.1:8080 -vv -n 2$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."$ git clone https://github.com/CenterForTheBuiltEnvironment/clima.git
$ cd clima pipenv install --devbumpversion patch # alternatively you can use minor or major instead of patchcd tests
pipenv run pytest --base-url=http://127.0.0.1:8080 -vv --numprocesses 4gcloud components update --quiet
gcloud auth login # or gcloud config set account ACCOUNT
gcloud config set project clima-316917
gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
docker buildx build --platform linux/amd64 -t us-central1-docker.pkg.dev/clima-316917/cloud-run-source-deploy/clima:latest .
# run locally to test
docker run --platform linux/amd64 --rm -p 8080:8080 us-central1-docker.pkg.dev/clima-316917/cloud-run-source-deploy/clima:latest
# Run detached, give a name, set env vars, and print logs
docker run -d --platform linux/amd64 --name clima-test -p 8080:8080 -e ENV=dev us-central1-docker.pkg.dev/clima-316917/cloud-run-source-deploy/clima:latest
docker logs -f clima-test
# if everything is ok push to google container registry
docker push us-central1-docker.pkg.dev/clima-316917/cloud-run-source-deploy/clima:latest
gcloud run deploy clima-test --image us-central1-docker.pkg.dev/clima-316917/cloud-run-source-deploy/clima:latest --region us-central1 --memory 4Gi --cpu 2 --platform managed --allow-unauthenticated --tag "v0-10-2"
# you can then deploy the main version changing the name and tag
gcloud run deploy clima --image us-central1-docker.pkg.dev/clima-316917/cloud-run-source-deploy/clima:latest --region us-central1 --memory 4Gi --cpu 2 --platform managed --allow-unauthenticated --tag "v0-10-2"gcloud builds submit --project=clima-316917 --substitutions=_REPO_NAME="clima-test",_PROJ_NAME="clima-316917",_IMG_NAME="test",_GCR="us.gcr.io",_REGION="us-central1",_MEMORY="4Gi",_CPU="2"gcloud builds submit --project=clima-316917 --substitutions=_REPO_NAME="clima",_PROJ_NAME="clima-316917",_IMG_NAME="main",_GCR="us.gcr.io",_REGION="us-central1",_MEMORY="4Gi",_CPU="2"
















<figure><img src="../../../.gitbook/assets/Desc stat RH.png" alt=""><figcaption><p>Descriptive statistics of relative humidity trend in a temperate climate, Berkeley (USA)</p></figcaption></figure>






































