Commit 1fdca00e authored by Your Name's avatar Your Name
Browse files

fix doc

parent 80344b1b
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+14 −0
Original line number Original line Diff line number Diff line
__pycache__/
*.py[cod]
\#*\#
.\#*
*~
.env
*env/
libclang*so
Dockerfile
build/
*egg-info/
*png
test_*/
git-global-secret
 No newline at end of file
+4 −27
Original line number Original line Diff line number Diff line
@@ -10,15 +10,13 @@ while getopts "cptlr:" opt
do
do
   case "$opt" in
   case "$opt" in
      c ) clona=1 ;;
      c ) clona=1 ;;
      p ) pyinsta=1 ;;
      t ) tmuxa=1 ;;
      t ) tmuxa=1 ;;
      l ) linka=1 ;;
      r ) shift $(( OPTIND - 2 )) && REPOS=($@) && break
      r ) shift $(( OPTIND - 2 )) && REPOS=($@) && break
   esac
   esac
done
done


if [ -z "$clona" ] && [ -z "$pyinsta" ] && [ -z "$tmuxa" ] && [ -z "$linka" ];then
if [ -z "$clona" ] && [ -z "$tmuxa" ]; then
    echo 'usage: ./cloneall.bash -c (clone repos) -p (python install and tests) -t (attach to tmux) -l (full tree of links) -r (repos)'
    echo 'usage: ./cloneall.bash -c (clone repos) -t (attach to tmux) -r (repos list, e.g. core io octree) '
    exit 1
    exit 1
fi
fi


@@ -29,37 +27,16 @@ if [ ! -z "$clona" ]; then
       echo "export DEBUG=1" >> .env
       echo "export DEBUG=1" >> .env
    fi
    fi
    . .env
    . .env
    [[ ! -d "venv" ]] && python3 -mvenv venv
    . venv/bin/activate
    pip install --upgrade pip
    pip install autopep8
    pip install matplotlib
    for REPO in "${REPOS[@]}"; do
    for REPO in "${REPOS[@]}"; do


	[[ ! -d "$REPO" ]] && git clone ssh://git@git.ia2.inaf.it/hotwheels/$REPO.git
	[[ ! -d "$REPO" ]] && git clone ssh://git@git.ia2.inaf.it/hotwheels/$REPO.git
        pushd $REPO
        pushd $REPO
	[[ ! -d "venv" ]] && python3 -mvenv venv && . venv/bin/activate && pip install autopep8  && pip install PyYaml
        git switch dev || echo no dev branch
        git switch dev || echo no dev branch
	if [[ "$REPO" != "gitlab-profile" ]]; then
	    [ ! -z "$pyinsta" ] && python -mpip install -e .[edit] && python -m hotwheels.checkup hotwheels/
	fi
        popd
        popd
    done
    done
fi
fi


if [ ! -z "$linka" ]; then
    mkdir -p full/hotwheels
    touch full/hotwheels/__init__.py || echo cant touch
    for f in core/hotwheels/*; do
	[[ "${f##*/:0:2}" == "__" ]] && continue
	ln -sf $PWD/$f full/hotwheels/${f##*/}
    done
    for REPO in "${REPOS[@]}"; do
	if [ "$REPO" != "core" ] && [ "$REPO" != "gitlab-profile" ]; then
	    ln -sf $PWD/$REPO/hotwheels/$REPO full/hotwheels
	fi
    done
fi

if [ ! -z "$tmuxa" ]; then
if [ ! -z "$tmuxa" ]; then
    
    
    if ! tmux has-session -t $SESSION_NAME ; then
    if ! tmux has-session -t $SESSION_NAME ; then
@@ -77,8 +54,8 @@ if [ ! -z "$tmuxa" ]; then
	    fi
	    fi
            # Initialize the environment in the first window
            # Initialize the environment in the first window
            tmux send-keys -t $SESSION_NAME:$index ". .env" C-m
            tmux send-keys -t $SESSION_NAME:$index ". .env" C-m
            tmux send-keys -t $SESSION_NAME:$index ". venv/bin/activate" C-m
            tmux send-keys -t $SESSION_NAME:$index "cd $PWD/$value" C-m
            tmux send-keys -t $SESSION_NAME:$index "cd $PWD/$value" C-m
            tmux send-keys -t $SESSION_NAME:$index ". venv/bin/activate" C-m
	    tmux rename-window $value
	    tmux rename-window $value
            
            
	done
	done
+1 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ In case you need to work on many modules, you can clone and install all default


```bash
```bash
wget https://www.ict.inaf.it/gitlab/hotwheels/gitlab-profile/-/raw/main/cloneall.bash
wget https://www.ict.inaf.it/gitlab/hotwheels/gitlab-profile/-/raw/main/cloneall.bash
./cloneall.bash -cp # will clone and pip-install all hotwheels modules
bash cloneall.bash -c # will clone all hotwheels modules
```
```


If you want to create a folder with all the modules soft-linked into the folder `hotwheels/*`, add the flag `-l` to `cloneall.bash` to get this folder tree in a folder named `full/hotwheels/*`. This is helpful in navigating the files with the IDE when development has strong refactoring and one need to edit multiple modules.
If you want to create a folder with all the modules soft-linked into the folder `hotwheels/*`, add the flag `-l` to `cloneall.bash` to get this folder tree in a folder named `full/hotwheels/*`. This is helpful in navigating the files with the IDE when development has strong refactoring and one need to edit multiple modules.