Skip to content

ncsu-landscape-dynamics/pandemic_dashboard

Repository files navigation

Pandemic Dashboard

Demo gif

app build status

This project was bootstrapped with Create React App.


Contributing

This section is designed to clarify the branch structure of this repository and where new features and bug fixes should go.

Reproducibility

  1. Spend time ensuring that your code is easy for others to read:

    • Make sure you've used spaces and your variable names are concise, but informative

    • Use comments to indicate where your problem lies

    • Do your best to remove everything that is not related to the problem.
      The shorter your code is, the easier it is to understand.

Branch Structure

  1. master is the stable version of the model that is used for official releases and is the production branch of this repository.
  2. staging is the branch used to test new functionality in a live testing (i.e. the same as production) environment. This is where new functionality is implemented and testing before being merged with Master and
  3. bugfix/thingnotworking are branched off of master then merged back via a pull request once the bug is fixed.
  4. feature/new_feature is where new features are developed before they are merged into staging via a pull request. For example, we are adding steering (aka adapative management) but this dramatically changes the dashboard and database so it is being built to test in staging before going to production.

Bug Fixes

Most bugs/issues will be found in the master branch as it is the branch being used in production. Thus bug fixes should be merged into master once tested. Bug fixes should be released as minor versions (e.g. if major release is 1.0 then the first bug fix would be released as version 1.1).

New Features

When creating new features create a branch from master using the following syntax feature/new_feature. For example, we want to add a new display feature for visualizing regional pest introductions, the branch created would be named feature/regional_introductions_display (or similar). New features will be merged into master once tested based on the priorities of our stakeholders first. Once new features are tested in a live testing environment with any other new features being included in the next major release we will merge them into master and create an official major release version (e.g. update from version 1.1 to version 2.0).

If you are interested in contributing to Pandemic Dashboard development and are not a core developer on the model, please take a look at the following documents to make the process as seamless as possible.

  1. Contributor Code of Conduct
  1. Contributor Guide

Running the Application

Prerequisites:

  1. Github account and git installed

  2. An adequate version of NodeJS and npm should be installed. Here is the command to check the installation and version.

    node --version

    npm --version

Getting Started

  • Step 1: Clone this repository to get the project files:

    git clone "https://github.com/ncsu-landscape-dynamics/pandemic_dashboard.git"

  • Step 2: Go to the project repo:

    cd pandemic_dashboard

  • Step 3: Install local node_module dependencies folder:

    npm install

  • Step 4: Run the application:

    npm start

You can now see the app running in the localhost browser popup like this:

local app

Publishing Your Changes to Live Website

  • The publication process for this application is automated with GitHub Actions

  • So when the following commands are run on your local machine, the entire npm publishing process is automatically activated (as specified by this configured Workflow file)

    • In your terminal / cmd, run your typical GitHub commands to upload your changes:

      git add .
      git commit -m "text describing changes / updates"
      git push

  • Now, any local changes made to the application will:

    1. Automatically update remote repository code and files
    2. Compile an optimized application build
    3. Deploy updated build to the live version of the application (hosted on Github Pages)
  • To monitor the status of your changes, or investigate why a build was unsuccessful, visit this repository's GitHub Actions tab


Authors


License

Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details.