Skip to content

Development

Jared Krajewski edited this page Sep 30, 2023 · 13 revisions

Setting up a development environment

  1. Clone repo to the local environment in your IDE of choice. If you are new to Git/GitHub, check out this article for a broad overview.

    • Open the terminal & change the working directory to the location you want the repository cloned to.

    • git clone https://github.com/codeforpdx/PASS.git learn more about git clone This will set the git origin to https://github.com/codeforpdx/PASS.git. By default, the branch is set to Master. learn more about git remote

    • Change the directory to the cloned directory, in this case, /PASS: cd ./PASS

    • Origin can be verified by running git remote -v which should show:

      origin https://github.com/codeforpdx/PASS.git (fetch)
      origin https://github.com/codeforpdx/PASS.git (push)
      
      
  2. Create a new branch to work on your feature (We recommend doing this via terminal). Branches should all be based off of Development:

    A. git switch Development or git checkout Development - to switch to the Development branch.

    B. git checkout -b "<your branch name>" learn more about git branches using the recommended naming convention:<issue number><branch name> with a concise title.

    Example: 112/delete-client-modal

This can also be done directly from an issue in GitHub with the following three steps(The default branch is Master and will need to be changed to Development). If done manually via the command line, link branch to corresponding GitHub issue.

A. Create a branch by clicking create a branch under Development within the issues page.

B. Select change branch source.

C. Select Development as the base branch.

  • Work on feature in your own branch. Setup instructions to locally run PASS can be found in the readme.

  • When feature is ready:

    • run git add . to add all changed files in commit. or git add <fileName> to include an individual file.
    • run git commit -m "some message about changes in commit" with a concise message to describe what changes are included in the push.
    • push to GitHub in terminal: git push origin <your branch name>

Contribution guidelines

Contributions should be made via pull requests on the development tree.

Here's an example of the full workflow:

  1. Select a feature or issue to work on
  2. Create a branch from the Development tree
  3. Work on your branch
  4. When the work is complete
    • Run linter and code formatted (ESlint and Prettier) to ensure compliance
    • Run unit tests VItest
  5. Resolve any issues with linting, formatting, and testing
  6. Start a pull request to merge your code with Development
    • Use the pull request template
    • Add relevant reviewers to your pull request
  7. Make changes as requested by reviewers
  8. Once approved, merge the branch
  9. Once merged, close your branch

Coding standards and style guides

This project uses ESlint for linting and Prettier for code formatting. They are included as dependencies and will be installed while following the instructions of the readme.

  • To lint your changes with ESLint follow the instructions here
  • To format your changes with Prettier follow the instructions here

For VSCode users, there are extensions available on the VSCode marketplace for ESlint and Prettier.

How to submit bug reports and feature requests

Bug Reporting

  • Bugs are reported via the GitHub built-in issues page for the repository https://github.com/codeforpdx/PASS/issues.
  • Current bug reporting template can be found here and will automatically populate when creating an issue in GitHub.

Provide the information requested in the template.

Feature Requests

  • Features are requested via the GitHub built-in issue page for the repository https://github.com/codeforpdx/PASS/issues.
  • Current feature request template can be found here and will automatically populate when creating an issue in GitHub.

Enhancement Requests

  • Enhancements are requested via the GitHub built-in issues page for the repository https://github.com/codeforpdx/PASS/issues.
  • Current bug reporting template can be found here and will automatically populate when creating an issue in GitHub.

How to create a pull request

If you are new to GitHub and/or the team, feel free to make your first pull request on the README/Contributing documentation to familiarize yourself with the project and GitHub. Add any comments and/or feedback and request reviews.

  • Make a pull request to the Development branch. Request reviews from team members - you’ll need their approval to merge. **Make sure to close your branch once merged.

  • Recommended reviewers:

    • Development -- Jared K, Ka Hung L, Kevin M, Tim S, Scott B
    • Documentation -- Jared K, Ka Hung L
    • Include screenshots whenever you’re building a frontend feature.

Continuous integration and testing procedures

  • PASS usesVitest for unit testing.
  • In Vitest, tests are simply async functions that throw errors for failures.
  • To run all repository unit tests npm run test
  • To run a single test npm run test "<filename>.test.js"

    Example: npm run test "navBar.test.js"

Top of page ⬆️

Clone this wiki locally