Thank you for your interest in contributing to the repository. Regardless of the size of the contribution you make, all contributions are welcome and are appreciated.
If you are new to contributing to open source, please read the Open Source Guides on How to Contribute to Open Source.
Please read the Palisadoes Contributing Guidelines.
Code contributions come in the form of pull requests. These are done by forking the repo and making changes locally.
Make sure you have read the Documentation for Setting up the Project
The process of proposing a change to the repository can be summarized as:
-
Fork the repository and branch off
develop. -
Your newly forked repository can be cloned locally using
git clone <YOUR FORKED REPO URL>. -
Make the Palisadoes Foundation's repo your
git upstreamfor your local repo. -
Make the desired changes to the repository.
-
Run the app and test your changes.
-
If you've added code, then test suites must be added.
-
General:
- We need to get to 100% test coverage for the app. We periodically increase the desired test coverage for our pull requests to meet this goal.
- Pull requests that don't meet the minimum test coverage levels will not be accepted. This may mean that you will have to create tests for code you did not write. You can decide which part of the code base needs additional tests if this happens to you.
-
Testing:
-
Test using this set of commands:
npm install npm run test --watchAll=false --coverage -
Debug tests in browser
You can see the output of failing tests in broswer by running
jest-previewpackage before running your testsnpm install npm run jest-preview npm run test --watchAll=false --coverageYou don't need to re-run the
npm run jest-previewcommand each time, simply run thenpm run testcommand if the Jest Preview server is already running in the background, it'll automatically detect any failing tests and show the preview athttp://localhost:3336as shown in this screenshot -
-
-
Test Code Coverage:
-
General Information
- The current code coverage of the repo is:
- You can determine the percentage test coverage of your code by running these two commands in sequence:
npm install npm run test --watchAll=false --coverage genhtml coverage/lcov.info -o coverage - The output of the
npm run testcommand will give you a tablular coverage report per file - The overall coverage rate will be visible on the penultimate line of the
genhtmlcommand's output. - The
genhtmlcommand is part of the Linuxlcovpackage. Similar packages can be found for Windows and MacOS. - The currently acceptable coverage rate can be found in the GitHub Pull Request file. Search for the value below the line containing
min_coverage.
- The current code coverage of the repo is:
-
Testing Individual Files
- You can test an individual file by running this command:
npm run test --watchAll=false /path/to/test/file - You can get the test coverage report for that file by running this command. The report will list all tests in the suite. Those tests that are not run will have zero values. You will need to look for the output line relevant to your test file.
npm run test --watchAll=false --coverage /path/to/test/file
- You can test an individual file by running this command:
-
Creating your code coverage account
-
You can also see your code coverage online for your fork of the repo. This is provided by
codecov.io-
Go to this link:
https://app.codecov.io/gh/XXXX/YYYYwhere XXXX is your GitHub account username and YYYY is the name of the repository -
Login to
codecov.iousing your GitHub account, and add your repo and branches to thecodecov.iodashboard.
-
Remember to add the
Repository Upload Tokenfor your forked repo. This can be found underSettingsof yourcodecov.ioaccount. -
Use the value of this token to create a secret named CODE_COV for your forked repo.

-
You will see your code coverage reports with every push to your repo after following these steps

-
-
-
-
-
After making changes you can add them to git locally using
git add <file_name>(to add changes only in a particular file) orgit add .(to add all changes). -
Before making a commit, run all hooks manually to catch and fix issues early using:
pre-commit run --all-files. Some hooks (like formatters) may auto-fix code. If so, re-add the fixed files using:git add .. -
After adding the changes you need to commit them using
git commit -m '<commit message>'(look at the commit guidelines below for commit messages). -
Once you have successfully commited your changes, you need to push the changes to the forked repo on github using:
git push origin <branch_name>.(Here branch name must be name of the branch you want to push the changes to.) -
Now create a pull request to the repository from your forked repo. Open an issue regarding the same and link your PR to it.
-
Ensure the test suite passes, either locally or on CI once a PR has been created.
-
Review and address comments on your pull request if requested.

.jpg)