Skip to content

dev03 pulling code with git

kurtw555 edited this page Jul 18, 2018 · 3 revisions

check that all needed pull requests resolved

Resolve dev/master branch status by checking the branches github pages for each of the deployed repos on the main wiki page.

initial cloning and setting up the qed repo

# to create a qed_project repo (where _project = _blank (for everything), _cts, _cyan, 
#_hem, _hms, _hwbi, _pisces, or _uber)
git clone --recursive https://github.com/quanted/qed.git # e.g project = ubertool
cd qed
git submodule foreach --recursive git status # make sure nothing detached, etc

if there are submodule issues

# sometimes you may have to use git submodule commands
# if you did not clone --recursive (but only the first time after cloning repo)
# or if the git clone --recursive was not fully successful 
# or whenever a new submod is added
git submodule update --init --recursive
git submodule foreach --recursive git status # make sure nothing detached, etc

local recursive updating of qed

#everytime
git submodule foreach --recursive git checkout dev # or some other branch
#or, if you do not have the branch locally
#git submodule foreach --recursive git checkout dev origin/dev # or some other branch
git submodule foreach --recursive git fetch
git submodule foreach --recursive git pull origin dev # or some other branch
git submodule foreach --recursive git status

local testing of dev branch changes across submodules

#any necessary changes to the qed_project repo need to be manually moved to branch of qed repo
#pycharm Code- Optimize Imports while viewing requirements.txt
#pycharm Code - Inspect Code - Whole Project
#pycharm Code - Code Cleanup
#pycharm testing- using settings_local.py
#pycharm - stand up flask in configurations
#pycharm- run django via configurations
nosetests

pull requests for all dev-master different branches

Merge approvals by a qed admin different from whomever initiated the pull request.

local testing of master branches

within qed project

git checkout master
git pull    
#the first time after cloning repo or whenever a new submod is added
git submodule update --init --recursive
#everytime
git submodule foreach --recursive git checkout master
git submodule foreach --recursive git fetch
git submodule foreach --recursive git pull origin master
git submodule foreach --recursive git status
#pycharm Code- Optimize Imports while viewing requirements.txt
#pycharm Code -Inspect Code - Whole Project
#pycharm testing
#any fixes need to be pushed to dev or other branch and then reintegrated
#pycharm - stand up flask in configurations
#pycharm- run django via configurations
nosetests

if problems

# removing git submodules
git submodule deinit <asubmodule> #no slashes
git rm <asubmodule>

running on a local machine

run redis locally

# linux /mac
cd 
redis-server on linux/mac
# windows
cd 
redis-server redis.windows.conf

PyCharm configuration for celery

  • so
  • Create new 'Run/Debug Configuration' using 'Python'
  • Set script to 'C:\PATHTO celery.exe in env'
    • example: 'C:\Program Files\Anaconda3\env\py36_qed\Scripts\Celery.exe'
      • example2 'C:\Users\TPurucke\AppData\Local\Continuum\Anaconda3\Scripts'
  • Set Script parameters to: '-A tasks worker -Q sam -loglevel=debug -concurrency=1 -n sam_worker'
  • Set Working Directory to 'C:\PATHTO celery.exe in env'
    • example: 'C:\Program Files\Anaconda3\env\py36_qed\Scripts\Celery
  • Save/Apply and Run celery (trying to run in debug mode fails)

Additional Info:

  • sample code can be found in quanted\qed_ubertool sam branch
  • In pycharm with run flask_cgi.py and django in debug mode, celery can be run and watched
  • QED celery process diagram

PyCharm configuration for flask

PyCharm configuration for django