fastjet icon indicating copy to clipboard operation
fastjet copied to clipboard

Add repository reset tools for developers

Open matthewfeickert opened this issue 1 year ago • 3 comments

After a local build of the the package

python -m pip install --upgrade --verbose .

the repository is left in a dirty state with additional untracked files in both the repository and the Git submodules. It would be useful to add either a Makefile or a noxfile.py that impliments git clean commands to quickly reset the repository and submodules to a clean state with a single command.

matthewfeickert avatar Feb 20 '24 08:02 matthewfeickert

An attempt at this (which hasn't been looked at for a long time, so might need fixing) is the following build.sh script

#!/bin/bash

# rm the directories that are created but are also in .gitignore
rm -rf CGAL-5.6*
rm -rf build
rm -rf src/fastjet/_fastjet_core/

cd fastjet-core
git reset --hard fastjet-3.4.2
git clean -f
cd plugins/SISCone/siscone
git clean -f
cd ../../../
cd ..

cd fastjet-contrib
git clean -f
cd ..

python -m pip install --upgrade --verbose .

matthewfeickert avatar Sep 09 '24 20:09 matthewfeickert

cc @jmduarte and co given Discussion https://github.com/scikit-hep/fastjet/discussions/302

matthewfeickert avatar Sep 09 '24 21:09 matthewfeickert

A better script:

#!/bin/bash

rm -rf CGAL-5.6*

# c.f. https://gist.github.com/nicktoumpelis/11214362
git submodule foreach --recursive git clean -d -f -x
git submodule foreach --recursive git reset --hard

python -m pip install --upgrade --verbose .

matthewfeickert avatar Sep 13 '24 03:09 matthewfeickert