Skip to content

Latest commit

 

History

History
73 lines (40 loc) · 3.22 KB

CONTRIBUTING.md

File metadata and controls

73 lines (40 loc) · 3.22 KB

Contributing with InfoDengue

Prerequisites

Setting up the environment

  1. Fork and clone both repositories: > AlertaDengue: https://github.com/AlertaDengue/AlertaDengue > Data: https://github.com/AlertaDengue/Data (Contains randomly generated data for testing and development.)

  2. Configure Demo Database in your local machine:

    Follow Data/README.md to build and deploy the Demo Database image.

  3. Open the repository AlertaDengue with your IDE and use Miniforge (see documentation) to create and activate the working environment (alertadengue-dev):

    $ mamba env create -f conda/environment.yaml
    $ conda activate alertadengue-dev
    
  4. Install the environment dependencies with Poetry (see documentation):

     $ poetry install
    

Building the app

With the environment dependencies set, it's time to prepare it to deploy. Use the Makefile in your terminal to create a .env file in the root of the project, this file will contain variables which will be needed to the building.

  1. Create .env file using Makefile:

    $ make prepare-env
    
  2. Synchronize all Map and Static Files:

    $ make sync-static-geofiles
    
  3. Build the app containers:

    $ make container-build
    

    This step will possibly fail if the .env file isn't properly filled. Please check if there isn't any empty attribute that is stopping the build.

  4. After the build, start the Docker images with the command:

    $ make container-start
    

Setting up Git, GitHub

In order to push your work to the main project, you will need to configure the remotes Upstream and Origin within your local repository following the steps below, this will ensure you are working with the most updated version of the project. For more details about commiting, check the Git Guides here.

  1. Add Origin & Upstream:

     $ git remote add origin git@github.com:<user>/AlertaDengue.git
     $ git remote add upstream git@github.com:AlertaDengue/AlertaDengue.git
    
  2. Fetch all branches:

     $ git fetch --all
    
  3. Commit & Create pull request

    When the changes in your branch are done (please, read about Best Practices with Git before commiting), it's time to push the commits to your fork and create a pull request so the maintainers can review and merge into the AlertaDengue repository.

     $ git push
    

    Your IDE should redirect you to the GitHub page with your Pull Request specifying the commits and the files that you have worked on. Write a message telling us about all your changes and click on Create Pull Request.