Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

How to Contribute

Jacob Rodgers edited this page Oct 1, 2020 · 11 revisions

Contributing:

First and foremost, your best bet is to join oneleif via the discord on the Homepage. From there, head over to the issues tab to see what needs to be worked on. If you feel comfortable doing something, assign yourself to it!

You can see our general direction and goals in the goals and roadmap section.

Process:

Experienced:

Our main branch is develop, and you should branch from that. Our format for changes is feature/NAME where NAME is a suitable name for your changes. Pull requests require 2 reviewers, of which the main choices would be @yudjinn, or @0xLeif; make sure to assign yourself to the PR so we don't get competition. We recommend using a virtual environment using the requirements.txt in the repo. You will need to add a secret key to your environment variables under the name ONEFIT_SECREY_KEY

Beginners:

  1. Clone the repository on your machine
  2. Installation:
  • Get a secret key off djecrety.ir and add it to your environment variables under 'ONEFIT_SECRET_KEY'
    • This can be done in linux bad adding export ONEFIT_SECRET_KEY=**** in your .bashrc, where **** is the key from djecrety.io
  • Install python3 on your machine, and open up a terminal in the repository directory
  • Create and activate a virtualenvironment in the base of the repository: python3 -m venv .venv
    • activate the virtualenv by sourcing the script: . ./.venv/bin/activate or source ./.venv/Scripts/activate
    • This must be done everytime you use a new terminal; IDE's like VSCode will automatically source them for you
    • You can tell you're in a virtualenv because you will see (.venv) in the terminal line
  • Install dependencies: pip install -r requirements.txt You should now be fully installed!
  • You can start the django project by navigating into the project directory and run python3 manage.py runserver which start the site; you can access it by navigating to localhost:8000 in your browser.
  1. Pick an issue to address (or if you'd like to add something not tracked, feel free!) and create a branch to hold your proposed changes: git checkout -b feature/NAME where NAME is a suiting name for your changes
  2. Make your changes (Make sure it doesnt break anything~~) and push your branch to the repo
  • Add all of your changes by using git add -A
  • Stage your changes in a commit: git commit -m "MESSAGE" where MESSAGE describes your changes in a few words
  • Push 'em up using git push and type in your github credentials!
  1. Create a Pull Request to merge your branch with develop
  • Make sure to add 2 reviewers; this can be @yudjinn, @ambid17, or @0xLeif if you arent familiar with the code owners
  1. Once the reviews are done, and any corrections have been made, click "Merge" then click "delete branch"
  • Back on your local repository, now that the branch is deleted, make sure to git checkout develop to switch back to the main branch, then git branch -d feature/NAME (name of branch) then git pull to pull your changes that have been merged!

There ya go! That's the whole process!

Thanks for joining the community and contributing to oneFit!