Skip to content

CI

CI #1159

Workflow file for this run

name: CI
on:
push:
schedule:
- cron: '0 1 * * *' # Test every day at 1AM
jobs:
# Based on https://github.com/py-actions/flake8#quick-start
flake8-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
ignore: "E116,E201,E202,E203,E211,E221,E222,E226,E225,E227,E228,E231,E241,E251,E261,E262,E265,E266,E271,E272,E301,E302,E303,E305,E402,F403,F405,E501,W504,E701,E702,E711,E713,E714,E722,E731,E741,F841,W391,W605"
# E116 unexpected indentation (comment)
# E201 whitespace after '('
# E202 whitespace before ')'
# E203 whitespace before ':'
# E211 whitespace before '['
# E221 multiple spaces before operator
# E222 multiple spaces after operator
# E225 missing whitespace around operator
# E226 missing whitespace around arithmetic operator
# E227 missing whitespace around bitwise or shift operator
# E228 missing whitespace around modulo operator
# E231 missing whitespace after ','
# E241 multiple spaces after ','
# E251 unexpected spaces around keyword / parameter equals
# E261 at least two spaces before inline comment
# E262 inline comment should start with '# '
# E265 block comment should start with '# '
# E266 too many leading '#' for block comment
# E271 multiple spaces after keyword
# E272 multiple spaces before keyword
# E301 expected 1 blank line, found 0
# E302 expected 2 blank lines, found 1
# E303 too many blank lines (3)
# E305 expected 2 blank lines after class or function definition, found 1
# E402 module level import not at top of file
# F403 unable to detect undefined names
# F405 may be undefined, or defined from star imports
# E501 line too long
# W504 line break after binary operator
# E701 multiple statements on one line (colon)
# E702 multiple statements on one line
# E711 comparison to None should be 'if cond is not None:'
# E713 test for membership should be 'not in'
# E714 test for object identity should be 'is not'
# E722 do not use bare 'except'
# E731 do not assign a lambda expression, use a def
# E741 ambiguous variable name
# F841 local variable is assigned to but never used
# W391 blank line at end of file
# W605 invalid escape sequence '\s'
Full_Analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Create conda env and install dependencies
run: |
conda config --set channel_priority strict
conda config --add channels conda-forge
conda env create -f environment.yml -n coffea-env
conda list -n coffea-env
- name: Install local pip packages
run: |
mkdir dir_for_topcoffea
cd dir_for_topcoffea
git clone https://github.com/TopEFT/topcoffea.git -b pin_dec06_2024
cd topcoffea
conda run -n coffea-env pip install -e .
cd ../..
conda run -n coffea-env pip install -e .
- name: Conda list
run: |
conda list -n coffea-env
- name: Install pip packages
run: |
conda run -n coffea-env pip install xgboost
conda run -n coffea-env pip install mt2
conda list -n coffea-env
- name: Download root files
run: |
wget --no-verbose http://uaf-10.t2.ucsd.edu/~mdittric/for_ci/for_wwz/WWZto4L2Nu_4F_TuneCP5_13p6TeV_amcatnlo-pythia8_Run3Summer22NanoAODv12-130X_mcRun3_2022_realistic_v5-v2_NANOAODSIM_WWZ_MC_2024_0811/output_9.root
wget --no-verbose http://uaf-10.t2.ucsd.edu/~mdittric/for_ci/for_wwz/WWZJetsTo4L2Nu_4F_TuneCP5_13TeV-amcatnlo-pythia8_RunIISummer20UL17NanoAODv9-106X_mc2017_realistic_v9-v2_NANOAODSIM_WWZ_MC_2024_0811/output_2.root
- name: Pytest setup
run: |
conda install -y -n coffea-env -c conda-forge pytest pytest-cov root_base
mkdir histos
- name: Run WWZ processors over test R2 file
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append tests/test_futures_wwz_r2.py
- name: Get WWZ yields R2
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append -k test_make_yields_after_processor_wwz_r2
- name: Check WWZ yields R2
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append -k test_compare_yields_after_processor_wwz_r2
- name: Run WWZ processors over test R3 file
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append tests/test_futures_wwz_r3.py
- name: Get WWZ yields R3
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append -k test_make_yields_after_processor_wwz_r3
- name: Check WWZ yields R3
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append -k test_compare_yields_after_processor_wwz_r3