GithubHelp home page GithubHelp logo

coffea4bees's Introduction

Coffea4bees

This is the repository for the 4b analyses at CMU based in coffea.

The package has a python component, where most of the analysis is made, and a c++ component meant to be run inside CMSSW.

Information about the analysis steps can be found in the README of the analysis folder.

Installation

How to run the python files

This repository assumes that you are running in a machine that has access to cvmfs. Then you can clone this repository as:

git clone ssh://[email protected]:7999/cms-cmu/coffea4bees.git

This code has been tested at the cmslpc, and to simplify the setup, it can be used with the container needed to run on lpc condor computers. To set this container:

curl -OL https://raw.githubusercontent.com/CoffeaTeam/lpcjobqueue/main/bootstrap.sh
bash bootstrap.sh

This creates two new files in this directory: shell and .bashrc. Additionally, this package contains a set_shell.sh file which runs the ./shell executable with the coffea4bees container. This container is based on the coffeateam/coffea-dask:latest container including some additional python packages.

source set_shell.sh

Remember to run this previous command (aka set your environment) every time you want to run something.

To know more about the container, you can see the Dockerfile. To know more information about the lpcjobqueue package click here.

In addition, dont forget to run your voms-proxy to have access to remote files:

voms-proxy-init -rfc -voms cms --valid 168:00

Conda environment

In case you want to run the package using a conda environmnent, you can use the environment.yml file. Notice however that there are some libraries missing in case you want to run the full framework.

How to run the src files

To be used inside CMSSW. More info later.

How to contribute

If you want to submit your changes to the code to the main repository (aka cms-cmu gitlab user) it is highly recommended to first fork this repository to your user. Then, in your local machine you can add your own fork to your working directory:

git remote add myRepo ssh://[email protected]:7999/USER/coffea4bees.git      ### change USER for your gitlab username

Then, if you want to push your changes to your own gitlab repository:

git add FILE1 FILE2 
git commit -m "add a message"
git push myRepo BRANCH        #### change BRANCH with the name of your branch

Once you are happy with your changes, you can make a merge request in the gitlab website to the main repository.

REANA

Launch with Snakemake on REANA

This package runs a workflow in REANA for every commit to the master. The output of the reana workflow can be found here:

In both cases one can find a directory with the date and the time the job run.

Information for continuos integration (CI)

By default only the master branch runs the gitlab CI workflow. If you want to push incomplete or buggy code, without running the CI workflow, create a new branch.

The workflow for the CI can be found in the gitlab-ci.yml file.

The CI runs on remote files and therefore it needs your grid certificate. If you want to run the gitlab CI workflow in your private fork, you need first to create some variables to set up your voms-proxy. You can follow these steps (except the last part, Using the grid proxy).

If you did this step correctly, then you can check in your pipelines and see that the stage build, job voms-proxy ran succesfully.

Information about the container

This packages uses its own container. It is based on coffeateam/coffea-dask:latest including some additional python packages. This container is created automatically in the gitlab CI step IF the name of the branch (and the merging branch in the case of a pull request to the master) starts with container_. Additionally, one can take a look at the file .dockerfiles/Dockerfile_analysis which is the one used to create the container.

Python sytle tips:

PEP8

https://peps.python.org/pep-0008/ https://pypi.org/project/pycodestyle/

> pycodestyle  --show-source base_class/plots.py

> pycodestyle --show-pep8 --show-source base_class/plots.py 

> pycodestyle --ignore E501,E222,E241,E202,E221,E201     --show-source analysis/processors/processor_HH4b.py

coffea4bees's People

Contributors

alefisico avatar chuyuanliu avatar johnalison avatar murthysindhu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.