-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from FAST-HEP/branch-v0.21.X
merging 0.21.0 into master
- Loading branch information
Showing
51 changed files
with
2,291 additions
and
857 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
flake8==3.5.0 | ||
twine==1.12.1 | ||
|
||
pytest==4.5.0 | ||
pytest-cov==2.7.1 | ||
pytest-runner==4.4 | ||
codecov==2.0.15 | ||
flake8==4.0.1 | ||
twine==3.8.0 | ||
pytest-lazy-fixture==0.6.3 | ||
pytest==6.2.5 | ||
pytest-cov==3.0.0 | ||
pytest-runner>=5.3.2 | ||
codecov==2.1.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
venv_* | ||
output | ||
log.txt | ||
HEPTutorial | ||
fast_cms_public_tutorial* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -fr output/* | ||
rm -fr venv_* | ||
rm -fr fast_cms_public_tutorial_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/env bash | ||
REPO=github.com/kreczko/fast-carpenter.git | ||
|
||
python -m pip install pipx | ||
pipx install virtualenv | ||
|
||
if [ ! -d HEPTutorial ]; then | ||
wget http://opendata.cern.ch/record/212/files/HEPTutorial_0.tar | ||
tar -xf HEPTutorial_0.tar HEPTutorial/files/ | ||
rm HEPTutorial_0.tar | ||
fi | ||
|
||
|
||
|
||
# e.g. 1becc47 and 1b0912f | ||
version1=$1 | ||
version2=$2 | ||
|
||
function version_lt() | ||
{ | ||
test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; | ||
} | ||
|
||
echo "Comparing $version1 and $version2" | ||
|
||
# set up versions | ||
for version in $version1 $version2 | ||
do | ||
if [ ! -d "venv_${version}" ] | ||
then | ||
virtualenv -p python3 venv_$version | ||
fi | ||
source venv_$version/bin/activate | ||
echo "installing git+git://${REPO}@${version}" | ||
pip install --quiet git+git://$REPO@$version | ||
|
||
fc_version=$(fast_carpenter --version | cut -d ' ' -f2) | ||
tutorial_version=uproot4 | ||
if version_lt $fc_version "0.20.0" | ||
then | ||
tutorial_version=uproot3 | ||
# TODO: this needs some extra setup e.g. for coffea to work | ||
fi | ||
if [ ! -d "fast_cms_public_tutorial_${tutorial_version}" ] | ||
then | ||
git clone \ | ||
-b kreczko-${tutorial_version} \ | ||
[email protected]:FAST-HEP/FAST_cms_public_tutorial.git \ | ||
fast_cms_public_tutorial_${tutorial_version} | ||
|
||
pip install --quiet -r fast_cms_public_tutorial_${tutorial_version}/requirements.txt | ||
fi | ||
|
||
mkdir -p output/${version} | ||
done | ||
|
||
# run versions | ||
for version in $version1 $version2 | ||
do | ||
source venv_$version/bin/activate | ||
fc_version=$(fast_carpenter --version | cut -d ' ' -f2) | ||
tutorial_version=uproot4 | ||
if version_lt $fc_version "0.20.0" | ||
then | ||
tutorial_version=uproot3 | ||
fi | ||
echo "Running with commit=$version, fast_carpenter=$fc_version, tutorial=$tutorial_version" | ||
export PYTHONPATH=fast_cms_public_tutorial_${tutorial_version}:$PYTHONPATH | ||
|
||
time fast_carpenter \ | ||
--mode="coffea:local" \ | ||
--outdir output/${version}/ \ | ||
fast_cms_public_tutorial_${tutorial_version}/file_list.yml \ | ||
fast_cms_public_tutorial_${tutorial_version}/sequence_cfg.yml | tee output/${version}/log.txt | ||
|
||
time fast_plotter \ | ||
-y log \ | ||
-c fast_cms_public_tutorial_${tutorial_version}/plot_config.yml \ | ||
-o output/${version}/plotter \ | ||
output/${version}/tbl_dataset.*.csv | tee output/${version}/plotter_log.txt | ||
done | ||
|
||
# compare | ||
diff -r output/${version1}/ output/${version2} | tee output/diff.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## Intro | ||
|
||
The purpose of `fast_carpenter` is to process HEP data using standard tools. | ||
As such most of the code consists of bridges/adapters between data import tools, | ||
data processing tools, data export tools and various other tools for tasks in between. | ||
|
||
|
||
|
||
|
||
|
||
```mermaid | ||
graph TD; | ||
A-->B; | ||
A-->C; | ||
B-->D; | ||
C-->D; | ||
``` | ||
|
||
|
||
```mermaid | ||
graph TD; | ||
abc.MutableMapping-->TreeToDictAdaptor; | ||
IndexProtocol-->IndexWithAliases; | ||
IndexProtocol-->IndexDotTransform; | ||
TreeLike-->TreeToDictAdaptor; | ||
AdapterMethods-->Uproot3Methods; | ||
AdapterMethods-->Uproot4Methods; | ||
TreeToDictAdaptor-->TreeToDictAdaptorV0; | ||
IndexDotTransform-->TreeToDictAdaptorV0; | ||
IndexWithAliases-->TreeToDictAdaptorV0; | ||
Uproot3Methods-->TreeToDictAdaptorV0; | ||
TreeToDictAdaptor-->TreeToDictAdaptorV1; | ||
IndexDotTransform-->TreeToDictAdaptorV1; | ||
IndexWithAliases-->TreeToDictAdaptorV1; | ||
Uproot4Methods-->TreeToDictAdaptorV1; | ||
``` | ||
|
||
```mermaid | ||
classDiagram | ||
class TreeToDictAdaptor | ||
TreeToDictAdaptor : arrays() | ||
TreeToDictAdaptor : keys() | ||
``` | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.