Skip to content

Development

John Blance edited this page Dec 17, 2023 · 8 revisions

Setting up a new development environment

example from fresh raspbian install

  • install pip sudo apt-get install python3-pip
  • install poetry sudo apt-get install python3-poetry
  • install git sudo apt-get install git
  • generate a ssh key
  • add key to your git repo

Developing mppsolar

  • clone repo (use your clone of the mpp-solar repo) git clone [email protected]:jblance/mpp-solar.git
  • cd into folder cd mpp-solar
  • activate poetry virtual environmnet poetry shell
    • if you get the Failed to create the collection: Prompt dismissed.. error, try installing and disabling the keyring
    • pip install keyring
    • python -m keyring --disable
  • install dependancies poetry install --no-root --with dev
  • install editable version of mppsolar pip install -e .
  • test mppsolar -v, should give the -dev version, eg
Solar Device Command Utility, version: 0.16.14-dev, python version: 3.11.2

Rebase branch from master

  • git fetch origin (This syncs your main branch with the latest changes)
  • git rebase origin/master
  • Fix merge conflicts that arise
    • After fixing merge conflicts, git add FILE previously merge conflicted files
    • git rebase --continue (or git rebase --skip if git complains that there were no changes after resolving all conflicts)
    • Repeat as necessary as merge conflicts arise in the subsequent commits
  • Once the rebase is complete, enter git push origin HEAD --force
Clone this wiki locally