CenterForTheBuiltEnvironment / comfort-dash

Revision of the CBE Comfort Tool using Dash.
4 stars 12 forks source link


Logo

CBE Thermal Comfort Tool

This is the official repository for the CBE Thermal Comfort Tool

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This is the official repository for the CBE Thermal Comfort Tool. The CBE Thermal Comfort Tool is a web application to calculate and visualize thermal comfort indices.

(back to top)

Built With

Python

(back to top)

Getting Started

To get a local copy up and running follow these simple steps. Clone the repository and run the following commands:

pipenv install
pipenv shell
python app.py

Then you can run the application using the following command:

python app.py

(back to top)

Usage

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature') using commit conventions.
  4. Bump the version bump-my-version bump patch
  5. Push to the Branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

Test the application

I wrote some tests with playwright to make sure the application is displaying properly. All the tests are located in the tests folder.

In order to run the tests, you need to have the application running locally.

python app.py

You will also need to install the playwright dependencies, more info here:

playwright install

Test generation

Detailed guide on how to generate tests can be found here

playwright codegen http://localhost:9090

If you want to generate tests for a specific device, you can run the following command:

playwright codegen --device="iPhone 13" http://localhost:9090

Deploy the application

The application is deployed automatically using a GitHub action. If you want to deploy the application manually, you can run the following command:

gcloud components update
pipenv requirements > requirements.txt
pipenv requirements --dev > dev-requirements.txt
gcloud config set account federicotartarini@gmail.com
python -m pytest tests/test_public_urls.py --base-url http://0.0.0.0:9090
python -m pytest --numprocesses 3 --base-url http://0.0.0.0:9090
python -m pytest --numprocesses 3 --base-url https://comfort-tool-v2-test-6ncu37myea-uc.a.run.app
gcloud builds submit --project=comfort-327718 --substitutions=_REPO_NAME="comfort-tool-v2-test"
gcloud builds submit --project=comfort-327718 --substitutions=_REPO_NAME="comfort-tool-v2"

Kill application running locally

lsof -i :9090
kill -9 <PID>

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Federico Tartarini - federicotartarini@gmail.com

Project Link: CenterForTheBuiltEnvironment/comfort-dash

(back to top)

Contributors

(back to top)

Teams & responsibilities

Group Task Team Main focus
- Admin Revolving, weekly Meetings & communication (e.g. notes, agenda)
A Front-End Ruixin Wu, Jiaming Zheng, Xuhui Wang, Zhou Tong Front-End design and Dash implementation
A Visuals Jiadong Zhang, Yan Zhang Develop plots for main UI
B Data Management Shiyi Shen, Haozhen Li Manage use of data within app
B Back-End Yinyan Liu, Junan Lu, Jinjia Bai, Chao Jiang Develop app back-end
- Testing Haozhen Li Writing tests for the app