Skip to content

Dev#1

Merged
Laurits7 merged 4 commits intomainfrom
dev
Apr 5, 2026
Merged

Dev#1
Laurits7 merged 4 commits intomainfrom
dev

Conversation

@Laurits7
Copy link
Copy Markdown
Member

@Laurits7 Laurits7 commented Apr 5, 2026

No description provided.

@Laurits7 Laurits7 merged commit 685a878 into main Apr 5, 2026
1 check failed
@Laurits7 Laurits7 deleted the dev branch April 5, 2026 07:52
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

🧹 Pylint Summary

🧾 Score:
Errors: 127
⚠️Warnings: 51
🛠️Refactors: 70

Show all Pylint messages
**ntupelizer/__init__.py:3:0** ⚠️ WARNING: *Module import itself*

```python
from . import validation

ntupelizer/init.py:4:0 ⚠️ WARNING: Module import itself

from . import orchestration_

ntupelizer/aleph/scripts/ntupelize_all.py:10:0 ⚠️ WARNING: Reimport 'os' (imported line 1)

import os

ntupelizer/aleph/scripts/ntupelize_all.py:23:0 🛠️ REFACTOR: Too many local variables (16/15)

def submit_slurm_job(input_paths: str, output_dir: str, idx: int) -> str:

ntupelizer/aleph/scripts/ntupelize_all.py:96:9 ⚠️ WARNING: Unused argument 'cfg'

def main(cfg: DictConfig) -> None:

ntupelizer/aleph/scripts/ntupelize_all.py:105:4 ❌ ERROR: No value for argument 'cfg' in function call

    main()

ntupelizer/aleph/scripts/ntupelize_all.py:4:0 📏 CONVENTION: standard import "subprocess" should be placed before third party import "hydra"

import subprocess

ntupelizer/aleph/scripts/ntupelize_all.py:5:0 📏 CONVENTION: standard import "pathlib.Path" should be placed before third party import "hydra"

from pathlib import Path

ntupelizer/aleph/scripts/ntupelize_all.py:10:0 📏 CONVENTION: *standard import "os" should be placed before third party imports "hydra", "jinja2.Environment", "omegaconf.DictConfig" and first party import "ntupelizer.aleph.tools.ntupelize_aleph" *

import os

ntupelizer/aleph/scripts/ntupelize_all.py:10:0 📏 CONVENTION: Imports from package os are not grouped

import os

ntupelizer/aleph/scripts/ntupelize_all.py:4:0 ⚠️ WARNING: Unused import subprocess

import subprocess

ntupelizer/aleph/scripts/ntupelize_all.py:8:0 ⚠️ WARNING: Unused ntupelize_aleph imported from ntupelizer.aleph.tools as na

from ntupelizer.aleph.tools import ntupelize_aleph as na

ntupelizer/aleph/scripts/ntupelize_list.py:7:0 ⚠️ WARNING: Reimport 'os' (imported line 1)

import os

ntupelizer/aleph/scripts/ntupelize_list.py:26:4 ❌ ERROR: No value for argument 'cfg' in function call

    main()

ntupelizer/aleph/scripts/ntupelize_list.py:7:0 📏 CONVENTION: *standard import "os" should be placed before third party imports "hydra", "omegaconf.DictConfig" and first party import "ntupelizer.aleph.tools.ntupelize_aleph" *

import os

ntupelizer/aleph/scripts/ntupelize_list.py:7:0 📏 CONVENTION: Imports from package os are not grouped

import os

ntupelizer/aleph/tools/io.py:26:0 📏 CONVENTION: Line too long (123/120)

    """Loads all .parquet files specified by the input. The input can be a list of input_paths, a directory where the files

ntupelizer/aleph/tools/io.py:35:0 📏 CONVENTION: Line too long (122/120)

            [default: None] Names of the columns/branches to be loaded from the .parquet file. By default all columns will

ntupelizer/aleph/tools/io.py:55:29 ⚠️ WARNING: Using an f-string that does not have any interpolated variables

            raise ValueError(f"Unexpected input_loc")

ntupelizer/aleph/tools/io.py:57:25 ⚠️ WARNING: Using an f-string that does not have any interpolated variables

        raise ValueError(f"Unexpected input_loc")

ntupelizer/aleph/tools/ntupelize_aleph.py:178:5 ⚠️ WARNING: TODO: Check that impact parameters are assigned correctly.

    # TODO: Check that impact parameters are assigned correctly.

ntupelizer/aleph/tools/ntupelize_aleph.py:268:8 ⚠️ WARNING: TODO For the last 5 variables need to define a calculator function.

    )  # TODO For the last 5 variables need to define a calculator function.

ntupelizer/aleph/tools/ntupelize_aleph.py:25:0 🛠️ REFACTOR: Too many local variables (43/15)

def calculate_impact_parameters(

ntupelizer/aleph/tools/ntupelize_aleph.py:36:4 📏 CONVENTION: Variable name "tanL" doesn't conform to snake_case naming style

    tanL = fill_values(events[f"{track_states_collection}.tanLambda"])

ntupelizer/aleph/tools/ntupelize_aleph.py:47:4 📏 CONVENTION: Variable name "tanL_error" doesn't conform to snake_case naming style

    tanL_error = fill_values(cov_matrix[:, :, 14])

ntupelizer/aleph/tools/ntupelize_aleph.py:177:24 ❌ ERROR: Value 'impact_parameters' is unsubscriptable

    impact_parameters = impact_parameters[impact_parameters_choice]

ntupelizer/aleph/tools/ntupelize_aleph.py:183:25 ❌ ERROR: Value 'pid_info' is unsubscriptable

                pad_from=pid_info["is_charged_hadron"],

ntupelizer/aleph/tools/ntupelize_aleph.py:194:23 ❌ ERROR: Generator 'generator' has no 'px' member

            "part_px": cand_p4.px,

ntupelizer/aleph/tools/ntupelize_aleph.py:195:23 ❌ ERROR: Generator 'generator' has no 'py' member

            "part_py": cand_p4.py,

ntupelizer/aleph/tools/ntupelize_aleph.py:196:23 ❌ ERROR: Generator 'generator' has no 'pz' member

            "part_pz": cand_p4.pz,

ntupelizer/aleph/tools/ntupelize_aleph.py:197:27 ❌ ERROR: Generator 'generator' has no 'energy' member

            "part_energy": cand_p4.energy,

ntupelizer/aleph/tools/ntupelize_aleph.py:198:23 ❌ ERROR: Generator 'generator' has no 'pt' member

            "part_pt": cand_p4.pt,

ntupelizer/aleph/tools/ntupelize_aleph.py:199:24 ❌ ERROR: Generator 'generator' has no 'eta' member

            "part_eta": cand_p4.eta,

ntupelizer/aleph/tools/ntupelize_aleph.py:200:24 ❌ ERROR: Generator 'generator' has no 'phi' member

            "part_phi": cand_p4.phi,

ntupelizer/aleph/tools/ntupelize_aleph.py:201:25 ❌ ERROR: Generator 'generator' has no 'mass' member

            "part_mass": cand_p4.mass,

ntupelizer/aleph/tools/ntupelize_aleph.py:202:26 ❌ ERROR: Value 'impact_parameters' is unsubscriptable

            "part_d0val": impact_parameters["d0val"],

ntupelizer/aleph/tools/ntupelize_aleph.py:203:26 ❌ ERROR: Value 'impact_parameters' is unsubscriptable

            "part_d0err": impact_parameters["d0err"],

ntupelizer/aleph/tools/ntupelize_aleph.py:204:26 ❌ ERROR: Value 'impact_parameters' is unsubscriptable

            "part_dzval": impact_parameters["dzval"],

ntupelizer/aleph/tools/ntupelize_aleph.py:205:26 ❌ ERROR: Value 'impact_parameters' is unsubscriptable

            "part_dzerr": impact_parameters["dzerr"],

ntupelizer/aleph/tools/ntupelize_aleph.py:207:36 ❌ ERROR: Value 'pid_info' is unsubscriptable

            "part_isChargedHadron": pid_info["is_charged_hadron"],

ntupelizer/aleph/tools/ntupelize_aleph.py:208:36 ❌ ERROR: Value 'pid_info' is unsubscriptable

            "part_isNeutralHadron": pid_info["is_neutral_hadron"],

ntupelizer/aleph/tools/ntupelize_aleph.py:209:29 ❌ ERROR: Value 'pid_info' is unsubscriptable

            "part_isPhoton": pid_info["is_photon"],

ntupelizer/aleph/tools/ntupelize_aleph.py:210:31 ❌ ERROR: Value 'pid_info' is unsubscriptable

            "part_isElectron": pid_info["is_electron"],

ntupelizer/aleph/tools/ntupelize_aleph.py:211:27 ❌ ERROR: Value 'pid_info' is unsubscriptable

            "part_isMuon": pid_info["is_muon"],

ntupelizer/aleph/tools/ntupelize_aleph.py:252:22 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_pt": jet_p4.pt,

ntupelizer/aleph/tools/ntupelize_aleph.py:253:23 ❌ ERROR: Generator 'generator' has no 'eta' member

            "jet_eta": jet_p4.eta,

ntupelizer/aleph/tools/ntupelize_aleph.py:254:23 ❌ ERROR: Generator 'generator' has no 'phi' member

            "jet_phi": jet_p4.phi,

ntupelizer/aleph/tools/ntupelize_aleph.py:255:26 ❌ ERROR: Generator 'generator' has no 'energy' member

            "jet_energy": jet_p4.energy,

ntupelizer/aleph/tools/ntupelize_aleph.py:257:39 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_sdmass": ak.ones_like(jet_p4.pt)

ntupelizer/aleph/tools/ntupelize_aleph.py:259:37 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_tau1": ak.ones_like(jet_p4.pt)

ntupelizer/aleph/tools/ntupelize_aleph.py:261:37 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_tau2": ak.ones_like(jet_p4.pt)

ntupelizer/aleph/tools/ntupelize_aleph.py:263:37 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_tau3": ak.ones_like(jet_p4.pt)

ntupelizer/aleph/tools/ntupelize_aleph.py:265:37 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_tau4": ak.ones_like(jet_p4.pt)

ntupelizer/aleph/tools/ntupelize_aleph.py:286:37 ❌ ERROR: Generator 'generator' has no 'part_p4' member

    jet_constituent_p4_sums = ak.sum(jet_assigned_particles.part_p4, axis=-1)

ntupelizer/aleph/tools/ntupelize_aleph.py:290:26 ❌ ERROR: Generator 'generator' has no 'part_pt' member

            "part_ptrel": jet_assigned_particles.part_pt / jet_data.jet_pt,

ntupelizer/aleph/tools/ntupelize_aleph.py:291:25 ❌ ERROR: Generator 'generator' has no 'part_energy' member

            "part_erel": jet_assigned_particles.part_energy / jet_data.jet_energy,

ntupelizer/aleph/tools/ntupelize_aleph.py:292:27 ❌ ERROR: Generator 'generator' has no 'part_eta' member

            "part_etarel": jet_assigned_particles.part_eta

ntupelizer/aleph/tools/ntupelize_aleph.py:294:27 ❌ ERROR: Generator 'generator' has no 'part_phi' member

            "part_phirel": jet_assigned_particles.part_phi - jet_data.jet_phi,

ntupelizer/aleph/tools/ntupelize_aleph.py:296:16 ❌ ERROR: Generator 'generator' has no 'part_eta' member

                jet_assigned_particles.part_eta,

ntupelizer/aleph/tools/ntupelize_aleph.py:297:16 ❌ ERROR: Generator 'generator' has no 'part_phi' member

                jet_assigned_particles.part_phi,

ntupelizer/aleph/tools/ntupelize_aleph.py:301:36 ❌ ERROR: Generator 'generator' has no 'part_eta' member

            "part_deta": f.deltaEta(jet_assigned_particles.part_eta, jet_data.jet_eta),

ntupelizer/aleph/tools/ntupelize_aleph.py:302:36 ❌ ERROR: Generator 'generator' has no 'part_phi' member

            "part_dphi": f.deltaPhi(jet_assigned_particles.part_phi, jet_data.jet_phi),

ntupelizer/aleph/tools/ntupelize_aleph.py:303:33 ❌ ERROR: Generator 'generator' has no 'mass' member

            "jet_mass_from_p4s": jet_constituent_p4_sums.mass,

ntupelizer/aleph/tools/ntupelize_aleph.py:304:31 ❌ ERROR: Generator 'generator' has no 'pt' member

            "jet_pt_from_p4s": jet_constituent_p4_sums.pt,

ntupelizer/aleph/tools/ntupelize_aleph.py:305:32 ❌ ERROR: Generator 'generator' has no 'eta' member

            "jet_eta_from_p4s": jet_constituent_p4_sums.eta,

ntupelizer/aleph/tools/ntupelize_aleph.py:306:32 ❌ ERROR: Generator 'generator' has no 'phi' member

            "jet_phi_from_p4s": jet_constituent_p4_sums.phi,

ntupelizer/aleph/tools/ntupelize_aleph.py:309:23 ❌ ERROR: Value 'jet_assigned_particles' is unsubscriptable

                field: jet_assigned_particles[field]

ntupelizer/aleph/tools/ntupelize_aleph.py:310:29 ❌ ERROR: Generator 'generator' has no 'fields' member

                for field in jet_assigned_particles.fields

ntupelizer/aleph/tools/ntupelize_aleph.py:318:27 ❌ ERROR: Value 'filled' is unsubscriptable

        {field: ak.flatten(filled[field], axis=1) for field in filled.fields}

ntupelizer/aleph/tools/ntupelize_aleph.py:318:63 ❌ ERROR: Generator 'generator' has no 'fields' member

        {field: ak.flatten(filled[field], axis=1) for field in filled.fields}

ntupelizer/aleph/tools/ntupelize_aleph.py:8:0 📏 CONVENTION: standard import "typing.Optional" should be placed before third party imports "hydra", "uproot", "vector", "numpy", "awkward", "omegaconf.DictConfig"

from typing import Optional, List

ntupelizer/aleph/tools/ntupelize_aleph.py:1:0 ⚠️ WARNING: Unused import hydra

import hydra

ntupelizer/aleph/tools/ntupelize_aleph.py:7:0 ⚠️ WARNING: Unused DictConfig imported from omegaconf

from omegaconf import DictConfig

ntupelizer/scripts/apply_weights.py:32:0 ❌ ERROR: Unable to import 'weight_tools'

import weight_tools as wt

ntupelizer/scripts/apply_weights.py:32:0 📏 CONVENTION: Import "import weight_tools as wt" should be placed at the top of the module

import weight_tools as wt

ntupelizer/scripts/apply_weights.py:44:4 📏 CONVENTION: Constant name "matrix_file" doesn't conform to UPPER_CASE naming style

    matrix_file = "sig_weights.npy" if is_signal else "bkg_weights.npy"

ntupelizer/scripts/apply_weights.py:28:0 📏 CONVENTION: standard import "pathlib.Path" should be placed before third party imports "numpy", "awkward"

from pathlib import Path

ntupelizer/scripts/compute_weights.py:32:0 ❌ ERROR: Unable to import 'weight_tools'

import weight_tools as wt

ntupelizer/scripts/compute_weights.py:32:0 📏 CONVENTION: Import "import weight_tools as wt" should be placed at the top of the module

import weight_tools as wt

ntupelizer/scripts/compute_weights.py:33:0 ❌ ERROR: Unable to import 'general'

import general as g

ntupelizer/scripts/compute_weights.py:33:0 📏 CONVENTION: Import "import general as g" should be placed at the top of the module

import general as g

ntupelizer/scripts/compute_weights.py:61:4 📏 CONVENTION: Constant name "config_dir" doesn't conform to UPPER_CASE naming style

    config_dir = str(Path(__file__).resolve().parents[1] / "config")

ntupelizer/scripts/compute_weights.py:25:0 📏 CONVENTION: standard import "pathlib.Path" should be placed before third party imports "numpy", "awkward"

from pathlib import Path

ntupelizer/scripts/compute_weights.py:28:0 ⚠️ WARNING: Unused OmegaConf imported from omegaconf

from omegaconf import OmegaConf

ntupelizer/scripts/compute_weights.py:33:0 ⚠️ WARNING: Unused general imported as g

import general as g

ntupelizer/scripts/merge_files.py:40:4 ⚠️ WARNING: Redefining name 'data' from outer scope (line 74)

    data = []

ntupelizer/scripts/merge_files.py:46:35 ❌ ERROR: Generator 'generator' has no 'fields' member

    print("Fields before merge: ", data.fields)

ntupelizer/scripts/merge_files.py:50:11 ❌ ERROR: Value 'data' is unsubscriptable

    data = data[perm]

ntupelizer/scripts/merge_files.py:55:21 ⚠️ WARNING: Redefining name 'data' from outer scope (line 74)

def split_train_test(data, split=0.8):

ntupelizer/scripts/merge_files.py:58:4 ⚠️ WARNING: Redefining name 'data_train' from outer scope (line 75)

    data_train = data[:ntrain]

ntupelizer/scripts/merge_files.py:59:4 ⚠️ WARNING: Redefining name 'data_test' from outer scope (line 75)

    data_test = data[ntrain:]

ntupelizer/scripts/ntupelize.py:7:0 ⚠️ WARNING: Reimport 'os' (imported line 1)

import os

ntupelizer/scripts/ntupelize.py:33:4 ❌ ERROR: No value for argument 'cfg' in function call

    main()

ntupelizer/scripts/ntupelize.py:7:0 📏 CONVENTION: *standard import "os" should be placed before third party imports "hydra", "omegaconf.DictConfig" and first party import "ntupelizer.tools.ntupelizer" *

import os

ntupelizer/scripts/ntupelize.py:7:0 📏 CONVENTION: Imports from package os are not grouped

import os

ntupelizer/scripts/slurm_status.py:11:13 ⚠️ WARNING: 'subprocess.run' used without explicitly defining the value for 'check'.

    result = subprocess.run(

ntupelizer/scripts/validate_ntuples.py:28:0 ❌ ERROR: Unable to import 'weight_tools'

import weight_tools as wt

ntupelizer/scripts/validate_ntuples.py:28:0 📏 CONVENTION: Import "import weight_tools as wt" should be placed at the top of the module

import weight_tools as wt

ntupelizer/scripts/validate_ntuples.py:29:0 ❌ ERROR: Unable to import 'general'

import general as g

ntupelizer/scripts/validate_ntuples.py:29:0 📏 CONVENTION: Import "import general as g" should be placed at the top of the module

import general as g

ntupelizer/scripts/validate_ntuples.py:30:0 ❌ ERROR: Unable to import 'data_integrity'

import data_integrity as di

ntupelizer/scripts/validate_ntuples.py:30:0 📏 CONVENTION: Import "import data_integrity as di" should be placed at the top of the module

import data_integrity as di

ntupelizer/scripts/validate_ntuples.py:126:4 ❌ ERROR: Unable to import 'matplotlib.pyplot'

    import matplotlib.pyplot as plt

ntupelizer/scripts/validate_ntuples.py:24:0 📏 CONVENTION: standard import "pathlib.Path" should be placed before third party imports "numpy", "awkward"

from pathlib import Path

ntupelizer/tools/clustering.py:8:0 📏 CONVENTION: Missing class docstring

class JetClusterer:

ntupelizer/tools/clustering.py:8:0 🛠️ REFACTOR: Too many instance attributes (8/7)

class JetClusterer:

ntupelizer/tools/clustering.py:8:0 🛠️ REFACTOR: Too few public methods (1/2)

class JetClusterer:

ntupelizer/tools/clustering.py:46:0 📏 CONVENTION: Missing class docstring

class RecoJetClusterer(JetClusterer):

ntupelizer/tools/clustering.py:46:0 🛠️ REFACTOR: Too few public methods (1/2)

class RecoJetClusterer(JetClusterer):

ntupelizer/tools/clustering.py:63:0 📏 CONVENTION: Missing class docstring

class GenJetClusterer(JetClusterer):

ntupelizer/tools/clustering.py:94:15 ❌ ERROR: Value 'self.all_jets' is unsubscriptable

        return self.all_jets[mask], self.all_constituent_indices[mask]

ntupelizer/tools/clustering.py:63:0 🛠️ REFACTOR: Too few public methods (1/2)

class GenJetClusterer(JetClusterer):

ntupelizer/tools/data_integrity.py:10:0 ❌ ERROR: Unable to import 'matplotlib.pyplot'

import matplotlib.pyplot as plt

ntupelizer/tools/data_integrity.py:11:0 ❌ ERROR: Unable to import 'matplotlib'

import matplotlib as mpl

ntupelizer/tools/data_integrity.py:12:0 ❌ ERROR: Unable to import 'matplotlib.figure'

from matplotlib.figure import Figure

ntupelizer/tools/data_integrity.py:15:0 ❌ ERROR: Unable to import 'general'

from general import reinitialize_p4, to_bh, deltaphi

ntupelizer/tools/data_integrity.py:103:0 🛠️ REFACTOR: Too many arguments (10/5)

def plot_variable_distribution(

ntupelizer/tools/data_integrity.py:103:0 🛠️ REFACTOR: Too many positional arguments (10/5)

def plot_variable_distribution(

ntupelizer/tools/data_integrity.py:135:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(7, 5.5))

ntupelizer/tools/data_integrity.py:196:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(7, 5.5))

ntupelizer/tools/data_integrity.py:254:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(7, 5.5))

ntupelizer/tools/data_integrity.py:323:12 📏 CONVENTION: Disallowed name "bar"

        for bar in ax.patches:

ntupelizer/tools/data_integrity.py:304:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(7, 5.5))

ntupelizer/tools/data_integrity.py:310:4 ⚠️ WARNING: Unused variable 'counts'

    counts, _, bars = ax.hist(

ntupelizer/tools/data_integrity.py:310:15 ⚠️ WARNING: Unused variable 'bars'

    counts, _, bars = ax.hist(

ntupelizer/tools/data_integrity.py:343:0 🛠️ REFACTOR: Too many arguments (6/5)

def plot_2d_jet_shape(

ntupelizer/tools/data_integrity.py:343:0 🛠️ REFACTOR: Too many positional arguments (6/5)

def plot_2d_jet_shape(

ntupelizer/tools/data_integrity.py:343:0 🛠️ REFACTOR: Too many local variables (17/15)

def plot_2d_jet_shape(

ntupelizer/tools/data_integrity.py:384:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(5, 5))

ntupelizer/tools/data_integrity.py:415:0 🛠️ REFACTOR: Too many local variables (28/15)

def plot_jet_shapes_for_decay_modes(

ntupelizer/tools/data_integrity.py:581:17 ❌ ERROR: Value 'gen_jet_en' is unsubscriptable

    gen_jet_en = gen_jet_en[valid]

ntupelizer/tools/data_integrity.py:582:18 ❌ ERROR: Value 'reco_jet_en' is unsubscriptable

    reco_jet_en = reco_jet_en[valid]

ntupelizer/tools/data_integrity.py:589:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(6, 5.5))

ntupelizer/tools/data_integrity.py:638:17 ❌ ERROR: Value 'gen_energy' is unsubscriptable

    gen_energy = gen_energy[valid]

ntupelizer/tools/data_integrity.py:639:18 ❌ ERROR: Value 'reco_energy' is unsubscriptable

    reco_energy = reco_energy[valid]

ntupelizer/tools/data_integrity.py:646:8 ⚠️ WARNING: Unused variable 'fig'

        fig, ax = plt.subplots(figsize=(6, 5.5))

ntupelizer/tools/data_integrity.py:676:0 🛠️ REFACTOR: Too many arguments (9/5)

def compare_distributions(

ntupelizer/tools/data_integrity.py:676:0 🛠️ REFACTOR: Too many positional arguments (9/5)

def compare_distributions(

ntupelizer/tools/data_integrity.py:800:0 🛠️ REFACTOR: Too many branches (14/12)

def validate_ntupelizer_output(

ntupelizer/tools/data_integrity.py:932:38 📏 CONVENTION: Use var.rsplit('_', maxsplit=1)[-1] instead

                xlabel=f"PFCandidate {var.split('_')[-1]} [mm]",

ntupelizer/tools/data_integrity.py:13:0 📏 CONVENTION: standard import "typing.Optional" should be placed before third party imports "numpy", "awkward", "matplotlib.pyplot", "matplotlib", "matplotlib.figure.Figure"

from typing import Optional, Dict

ntupelizer/tools/features.py:4:0 📏 CONVENTION: Function name "deltaR_etaPhi" doesn't conform to snake_case naming style

def deltaR_etaPhi(eta1, phi1, eta2, phi2):

ntupelizer/tools/features.py:27:0 📏 CONVENTION: Function name "deltaR_thetaPhi" doesn't conform to snake_case naming style

def deltaR_thetaPhi(theta1, phi1, theta2, phi2):

ntupelizer/tools/features.py:50:0 📏 CONVENTION: Function name "deltaPhi" doesn't conform to snake_case naming style

def deltaPhi(phi1, phi2):

ntupelizer/tools/features.py:68:0 📏 CONVENTION: Function name "deltaTheta" doesn't conform to snake_case naming style

def deltaTheta(theta1, theta2):

ntupelizer/tools/features.py:85:0 📏 CONVENTION: Function name "deltaEta" doesn't conform to snake_case naming style

def deltaEta(eta1, eta2):

ntupelizer/tools/gen_tau_info_matcher.py:11:0 📏 CONVENTION: Missing class docstring

class GenTauInfoMatcher:

ntupelizer/tools/gen_tau_info_matcher.py:59:12 🛠️ REFACTOR: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

            if abs(pdgid.charge(pdg_id)) > 0:

ntupelizer/tools/gen_tau_info_matcher.py:121:30 ❌ ERROR: Generator 'generator' has no 'energy' member

            "tau_vis_energy": tau_vis_p4s.energy,

ntupelizer/tools/gen_tau_info_matcher.py:146:4 🛠️ REFACTOR: Too many local variables (21/15)

    def fill_tau_info(self):

ntupelizer/tools/general.py:6:0 ❌ ERROR: Unable to import 'boost_histogram'

import boost_histogram as bh

ntupelizer/tools/general.py:9:18 ❌ ERROR: Value 'vector.awk(ak.zip({'mass': [0.0], 'x': [0.0], 'y': [0.0], 'z': [0.0]}))' is unsubscriptable

DUMMY_P4_VECTOR = vector.awk(

ntupelizer/tools/general.py:48:22 ❌ ERROR: Generator 'generator' has no 'pt' member

                "pt": p4.pt,

ntupelizer/tools/general.py:49:23 ❌ ERROR: Generator 'generator' has no 'eta' member

                "eta": p4.eta,

ntupelizer/tools/general.py:50:23 ❌ ERROR: Generator 'generator' has no 'phi' member

                "phi": p4.phi,

ntupelizer/tools/general.py:51:26 ❌ ERROR: Generator 'generator' has no 't' member

                "energy": p4.t,

ntupelizer/tools/lifetime.py:10:0 📏 CONVENTION: Line too long (125/120)

    [1] https://flc.desy.de/lcnotes/notes/localfsExplorer_read?currentPath=/afs/desy.de/group/flc/lcnotes/LC-DET-2006-004.pdf

ntupelizer/tools/lifetime.py:1:0 📏 CONVENTION: Too many lines in module (1507/1000)

"""

ntupelizer/tools/lifetime.py:49:0 🛠️ REFACTOR: Too many arguments (6/5)

def calc_track_origin_vectorized(

ntupelizer/tools/lifetime.py:49:0 🛠️ REFACTOR: Too many positional arguments (6/5)

def calc_track_origin_vectorized(

ntupelizer/tools/lifetime.py:88:4 📏 CONVENTION: Argument name "tanL" doesn't conform to snake_case naming style

    tanL: ArrayLike,

ntupelizer/tools/lifetime.py:86:0 🛠️ REFACTOR: Too many arguments (9/5)

def calc_pca_arc_length_vectorized(

ntupelizer/tools/lifetime.py:86:0 🛠️ REFACTOR: Too many positional arguments (9/5)

def calc_pca_arc_length_vectorized(

ntupelizer/tools/lifetime.py:86:0 🛠️ REFACTOR: Too many local variables (17/15)

def calc_pca_arc_length_vectorized(

ntupelizer/tools/lifetime.py:139:4 📏 CONVENTION: Argument name "tanL" doesn't conform to snake_case naming style

    tanL: ArrayLike,

ntupelizer/tools/lifetime.py:147:4 📏 CONVENTION: Argument name "tanL_error" doesn't conform to snake_case naming style

    tanL_error: ArrayLike,

ntupelizer/tools/lifetime.py:137:0 🛠️ REFACTOR: Too many arguments (14/5)

def calc_pca_arc_length_error_vectorized(

ntupelizer/tools/lifetime.py:137:0 🛠️ REFACTOR: Too many positional arguments (14/5)

def calc_pca_arc_length_error_vectorized(

ntupelizer/tools/lifetime.py:137:0 🛠️ REFACTOR: Too many local variables (38/15)

def calc_pca_arc_length_error_vectorized(

ntupelizer/tools/lifetime.py:239:4 📏 CONVENTION: Argument name "tanL" doesn't conform to snake_case naming style

    tanL: ArrayLike,

ntupelizer/tools/lifetime.py:236:0 🛠️ REFACTOR: Too many arguments (6/5)

def calc_pca_position_vectorized(

ntupelizer/tools/lifetime.py:236:0 🛠️ REFACTOR: Too many positional arguments (6/5)

def calc_pca_position_vectorized(

ntupelizer/tools/lifetime.py:275:4 📏 CONVENTION: Argument name "tanL" doesn't conform to snake_case naming style

    tanL: ArrayLike,

ntupelizer/tools/lifetime.py:276:4 📏 CONVENTION: Argument name "tanL_error" doesn't conform to snake_case naming style

    tanL_error: ArrayLike,

ntupelizer/tools/lifetime.py:267:0 🛠️ REFACTOR: Too many arguments (9/5)

def calc_pca_position_error_vectorized(

ntupelizer/tools/lifetime.py:267:0 🛠️ REFACTOR: Too many positional arguments (9/5)

def calc_pca_position_error_vectorized(

ntupelizer/tools/lifetime.py:267:0 🛠️ REFACTOR: Too many local variables (17/15)

def calc_pca_position_error_vectorized(

ntupelizer/tools/lifetime.py:314:0 🛠️ REFACTOR: Too many arguments (9/5)

def calc_impact_parameters_vectorized(

ntupelizer/tools/lifetime.py:314:0 🛠️ REFACTOR: Too many positional arguments (9/5)

def calc_impact_parameters_vectorized(

ntupelizer/tools/lifetime.py:314:0 🛠️ REFACTOR: Too many local variables (20/15)

def calc_impact_parameters_vectorized(

ntupelizer/tools/lifetime.py:399:0 🛠️ REFACTOR: Too many local variables (65/15)

def find_event_track_pcas(

ntupelizer/tools/lifetime.py:479:31 ❌ ERROR: Generator 'generator' has no 'astype' member

        particle_track_links = ak.to_numpy(

ntupelizer/tools/lifetime.py:544:4 📏 CONVENTION: Variable name "tanL" doesn't conform to snake_case naming style

    tanL = ak.to_numpy(event[f"{track_states_collection}.tanLambda"][valid_si_idx])

ntupelizer/tools/lifetime.py:554:15 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    d0_error = cov_matrix[:, 0]

ntupelizer/tools/lifetime.py:555:17 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    phi0_error = cov_matrix[:, 2]

ntupelizer/tools/lifetime.py:556:15 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    z0_error = cov_matrix[:, 9]

ntupelizer/tools/lifetime.py:557:4 📏 CONVENTION: Variable name "tanL_error" doesn't conform to snake_case naming style

    tanL_error = cov_matrix[:, 14]

ntupelizer/tools/lifetime.py:557:17 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    tanL_error = cov_matrix[:, 14]

ntupelizer/tools/lifetime.py:399:0 🛠️ REFACTOR: Too many statements (58/50)

def find_event_track_pcas(

ntupelizer/tools/lifetime.py:693:0 🛠️ REFACTOR: Too many arguments (10/5)

def calc_signed_impact_parameters(

ntupelizer/tools/lifetime.py:693:0 🛠️ REFACTOR: Too many positional arguments (10/5)

def calc_signed_impact_parameters(

ntupelizer/tools/lifetime.py:693:0 🛠️ REFACTOR: Too many local variables (22/15)

def calc_signed_impact_parameters(

ntupelizer/tools/lifetime.py:753:0 🛠️ REFACTOR: Too many arguments (6/5)

def find_all_track_pcas(

ntupelizer/tools/lifetime.py:753:0 🛠️ REFACTOR: Too many positional arguments (6/5)

def find_all_track_pcas(

ntupelizer/tools/lifetime.py:753:0 🛠️ REFACTOR: Too many local variables (98/15)

def find_all_track_pcas(

ntupelizer/tools/lifetime.py:844:8 ❌ ERROR: Value 'ak.broadcast_arrays(ak.local_index(tracks_begin_valid, axis=0), tracks_begin_valid)' is unsubscriptable

        ak.broadcast_arrays(

ntupelizer/tools/lifetime.py:883:34 ❌ ERROR: Value 'track_indices_counts_np' is unsubscriptable

    in_bounds = tracks_begin_np < track_indices_counts_np[event_indices_np]

ntupelizer/tools/lifetime.py:890:8 ❌ ERROR: Value 'track_indices_flat_np' is unsubscriptable

        track_indices_flat_np[

ntupelizer/tools/lifetime.py:907:23 ❌ ERROR: Value 'n_track_states_per_event' is unsubscriptable

        si_track_idx < n_track_states_per_event[event_indices_np]

ntupelizer/tools/lifetime.py:960:4 📏 CONVENTION: Variable name "track_states_D0" doesn't conform to snake_case naming style

    track_states_D0 = ak.flatten(events[f"{track_states_collection}.D0"])

ntupelizer/tools/lifetime.py:961:4 📏 CONVENTION: Variable name "track_states_Z0" doesn't conform to snake_case naming style

    track_states_Z0 = ak.flatten(events[f"{track_states_collection}.Z0"])

ntupelizer/tools/lifetime.py:963:4 📏 CONVENTION: Variable name "track_states_tanL" doesn't conform to snake_case naming style

    track_states_tanL = ak.flatten(events[f"{track_states_collection}.tanLambda"])

ntupelizer/tools/lifetime.py:973:26 ❌ ERROR: Value 'event_indices_np' is unsubscriptable

    valid_event_indices = event_indices_np[valid_indices]

ntupelizer/tools/lifetime.py:978:21 ❌ ERROR: Value 'track_states_D0' is unsubscriptable

    d0 = ak.to_numpy(track_states_D0[global_ts_idx])

ntupelizer/tools/lifetime.py:979:21 ❌ ERROR: Value 'track_states_Z0' is unsubscriptable

    z0 = ak.to_numpy(track_states_Z0[global_ts_idx])

ntupelizer/tools/lifetime.py:980:23 ❌ ERROR: Value 'track_states_phi' is unsubscriptable

    phi0 = ak.to_numpy(track_states_phi[global_ts_idx])

ntupelizer/tools/lifetime.py:981:4 📏 CONVENTION: Variable name "tanL" doesn't conform to snake_case naming style

    tanL = ak.to_numpy(track_states_tanL[global_ts_idx])

ntupelizer/tools/lifetime.py:981:23 ❌ ERROR: Value 'track_states_tanL' is unsubscriptable

    tanL = ak.to_numpy(track_states_tanL[global_ts_idx])

ntupelizer/tools/lifetime.py:982:24 ❌ ERROR: Value 'track_states_omega' is unsubscriptable

    omega = ak.to_numpy(track_states_omega[global_ts_idx])

ntupelizer/tools/lifetime.py:983:21 ❌ ERROR: Value 'track_states_xr' is unsubscriptable

    xr = ak.to_numpy(track_states_xr[global_ts_idx])

ntupelizer/tools/lifetime.py:984:21 ❌ ERROR: Value 'track_states_yr' is unsubscriptable

    yr = ak.to_numpy(track_states_yr[global_ts_idx])

ntupelizer/tools/lifetime.py:985:21 ❌ ERROR: Value 'track_states_zr' is unsubscriptable

    zr = ak.to_numpy(track_states_zr[global_ts_idx])

ntupelizer/tools/lifetime.py:986:29 ❌ ERROR: Value 'track_states_cov' is unsubscriptable

    cov_matrix = ak.to_numpy(track_states_cov[global_ts_idx])

ntupelizer/tools/lifetime.py:988:15 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    d0_error = cov_matrix[:, 0]

ntupelizer/tools/lifetime.py:989:17 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    phi0_error = cov_matrix[:, 2]

ntupelizer/tools/lifetime.py:990:15 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    z0_error = cov_matrix[:, 9]

ntupelizer/tools/lifetime.py:991:4 📏 CONVENTION: Variable name "tanL_error" doesn't conform to snake_case naming style

    tanL_error = cov_matrix[:, 14]

ntupelizer/tools/lifetime.py:991:17 ❌ ERROR: Value 'cov_matrix' is unsubscriptable

    tanL_error = cov_matrix[:, 14]

ntupelizer/tools/lifetime.py:753:0 🛠️ REFACTOR: Too many statements (96/50)

def find_all_track_pcas(

ntupelizer/tools/lifetime.py:1117:0 ⚠️ WARNING: Dangerous default value [] as argument

def get_jet_constituent_lifetime_vars(

ntupelizer/tools/lifetime.py:1117:0 ⚠️ WARNING: Dangerous default value [] as argument

def get_jet_constituent_lifetime_vars(

ntupelizer/tools/lifetime.py:1117:0 🛠️ REFACTOR: Too many arguments (9/5)

def get_jet_constituent_lifetime_vars(

ntupelizer/tools/lifetime.py:1117:0 🛠️ REFACTOR: Too many positional arguments (9/5)

def get_jet_constituent_lifetime_vars(

ntupelizer/tools/lifetime.py:1199:0 🛠️ REFACTOR: Too many arguments (8/5)

def calc_all_signed_ip_for_jets(

ntupelizer/tools/lifetime.py:1199:0 🛠️ REFACTOR: Too many positional arguments (8/5)

def calc_all_signed_ip_for_jets(

ntupelizer/tools/lifetime.py:1199:0 🛠️ REFACTOR: Too many local variables (24/15)

def calc_all_signed_ip_for_jets(

ntupelizer/tools/lifetime.py:1263:0 ⚠️ WARNING: Dangerous default value [] as argument

def assign_lifetime_vars_to_jets(

ntupelizer/tools/lifetime.py:1263:0 ⚠️ WARNING: Dangerous default value [] as argument

def assign_lifetime_vars_to_jets(

ntupelizer/tools/lifetime.py:1313:0 ⚠️ WARNING: Dangerous default value [] as argument

def replicate_lifetime_vars_per_jet(

ntupelizer/tools/lifetime.py:1313:0 ⚠️ WARNING: Dangerous default value [] as argument

def replicate_lifetime_vars_per_jet(

ntupelizer/tools/lifetime.py:1369:0 ⚠️ WARNING: Dangerous default value [] as argument

def get_event_reco_cand_lifetime_vars(

ntupelizer/tools/lifetime.py:1369:0 ⚠️ WARNING: Dangerous default value [] as argument

def get_event_reco_cand_lifetime_vars(

ntupelizer/tools/lifetime.py:1369:0 🛠️ REFACTOR: Too many arguments (8/5)

def get_event_reco_cand_lifetime_vars(

ntupelizer/tools/lifetime.py:1369:0 🛠️ REFACTOR: Too many positional arguments (8/5)

def get_event_reco_cand_lifetime_vars(

ntupelizer/tools/lifetime.py:1446:0 🛠️ REFACTOR: Too many arguments (8/5)

def calc_all_signed_ip_for_event_reco_cands(

ntupelizer/tools/lifetime.py:1446:0 🛠️ REFACTOR: Too many positional arguments (8/5)

def calc_all_signed_ip_for_event_reco_cands(

ntupelizer/tools/lifetime.py:1446:0 🛠️ REFACTOR: Too many local variables (24/15)

def calc_all_signed_ip_for_event_reco_cands(

ntupelizer/tools/matching.py:22:0 🛠️ REFACTOR: Too many local variables (20/15)

def dr_matching(collection1: ak.Array, collection2: ak.Array, delta_r: float = 0.4):

ntupelizer/tools/matching.py:32:8 📏 CONVENTION: Consider using enumerate instead of iterating with range and len

        for ij1 in range(len(j1)):

ntupelizer/tools/matching.py:36:12 📏 CONVENTION: Consider using enumerate instead of iterating with range and len

            for ij2 in range(len(j2)):

ntupelizer/tools/matching.py:58:0 📏 CONVENTION: Missing class docstring

class JetMatcher:

ntupelizer/tools/matching.py:2:0 ⚠️ WARNING: Unused import vector

import vector

ntupelizer/tools/ntupelizer.py:17:0 📏 CONVENTION: Missing class docstring

class EDM4HEPNtupelizer:

ntupelizer/tools/ntupelizer.py:17:0 🛠️ REFACTOR: Too many instance attributes (12/7)

class EDM4HEPNtupelizer:

ntupelizer/tools/ntupelizer.py:47:32 ❌ ERROR: Generator 'generator' has no 'mass' member

                        "mass": filler.mass,

ntupelizer/tools/ntupelizer.py:48:30 ❌ ERROR: Generator 'generator' has no 'x' member

                        "px": filler.x,

ntupelizer/tools/ntupelizer.py:49:30 ❌ ERROR: Generator 'generator' has no 'y' member

                        "py": filler.y,

ntupelizer/tools/ntupelizer.py:50:30 ❌ ERROR: Generator 'generator' has no 'z' member

                        "pz": filler.z,

ntupelizer/tools/ntupelizer.py:57:32 ❌ ERROR: Generator 'generator' has no 'mass' member

                        "mass": filler.mass,

ntupelizer/tools/ntupelizer.py:58:30 ❌ ERROR: Generator 'generator' has no 'x' member

                        "px": filler.x,

ntupelizer/tools/ntupelizer.py:59:30 ❌ ERROR: Generator 'generator' has no 'y' member

                        "py": filler.y,

ntupelizer/tools/ntupelizer.py:60:30 ❌ ERROR: Generator 'generator' has no 'z' member

                        "pz": filler.z,

ntupelizer/tools/ntupelizer.py:107:4 🛠️ REFACTOR: Too many local variables (32/15)

    def ntupelize(

ntupelizer/tools/ntupelizer.py:125:18 ⚠️ WARNING: Unused variable 'gen_constituent_indices'

        gen_jets, gen_constituent_indices = cl.GenJetClusterer(

ntupelizer/tools/ntupelizer.py:261:0 📏 CONVENTION: Missing class docstring

class PodioROOTNtuplelizer(EDM4HEPNtupelizer):

ntupelizer/tools/ntupelizer.py:282:0 📏 CONVENTION: Missing class docstring

class LCIOROOTNtuplelizer(EDM4HEPNtupelizer):

ntupelizer/tools/ntupelizer.py:6:0 📏 CONVENTION: standard import "typing.Optional" should be placed before third party imports "vector", "uproot", "numpy", "awkward", "particle.pdgid"

from typing import Optional

ntupelizer/tools/ntupelizer.py:14:0 📏 CONVENTION: *third party import "omegaconf.OmegaConf" should be placed before first party imports "ntupelizer.tools.general", "ntupelizer.tools.clustering", "ntupelizer.tools.particle_filters", "ntupelizer.tools.matching", "ntupelizer.tools.gen_tau_info_matcher", "ntupelizer.tools.lifetime" *

from omegaconf import OmegaConf

ntupelizer/tools/ntupelizer.py:14:0 📏 CONVENTION: Imports from package omegaconf are not grouped

from omegaconf import OmegaConf

ntupelizer/tools/particle_filters.py:6:0 📏 CONVENTION: Missing class docstring

class ParticleFilter:

ntupelizer/tools/particle_filters.py:40:0 📏 CONVENTION: Missing class docstring

class MCParticleFilter(ParticleFilter):

ntupelizer/tools/particle_filters.py:59:41 ❌ ERROR: Value 'self.particles_p4' is unsubscriptable

        stable_mc_p4 = g.reinitialize_p4(self.particles_p4[particle_mask])

ntupelizer/tools/particle_filters.py:63:0 📏 CONVENTION: Missing class docstring

class RecoParticleFilter(ParticleFilter):

ntupelizer/tools/tau_decaymode.py:35:4 🛠️ REFACTOR: Unnecessary "elif" after "return", remove the leading "el" from "elif"

    if n_uncommon > 0:

ntupelizer/tools/tau_decaymode.py:4:0 🛠️ REFACTOR: Too many return statements (18/6)

def get_decaymode(pdg_ids):

ntupelizer/tools/tau_decaymode.py:4:0 🛠️ REFACTOR: Too many branches (18/12)

def get_decaymode(pdg_ids):

ntupelizer/tools/weight_tools.py:4:0 ❌ ERROR: Unable to import 'matplotlib'

import matplotlib

ntupelizer/tools/weight_tools.py:6:0 ❌ ERROR: Unable to import 'general'

import general as g

ntupelizer/tools/weight_tools.py:7:0 ❌ ERROR: Unable to import 'mplhep'

import mplhep as hep

ntupelizer/tools/weight_tools.py:9:0 ❌ ERROR: Unable to import 'seaborn'

import seaborn as sns

ntupelizer/tools/weight_tools.py:11:0 ⚠️ WARNING: Reimport 'matplotlib' (imported line 4)

import matplotlib as mpl

ntupelizer/tools/weight_tools.py:11:0 ❌ ERROR: Unable to import 'matplotlib'

import matplotlib as mpl

ntupelizer/tools/weight_tools.py:13:0 ❌ ERROR: Unable to import 'matplotlib.pyplot'

import matplotlib.pyplot as plt

ntupelizer/tools/weight_tools.py:15:0 ❌ ERROR: Unable to import 'general'

from general import load_all_data

ntupelizer/tools/weight_tools.py:16:0 ❌ ERROR: Unable to import 'matplotlib'

from matplotlib import ticker

ntupelizer/tools/weight_tools.py:17:0 ❌ ERROR: Unable to import 'matplotlib.ticker'

from matplotlib.ticker import AutoLocator

ntupelizer/tools/weight_tools.py:30:0 🛠️ REFACTOR: Too many arguments (6/5)

def visualize_weights(

ntupelizer/tools/weight_tools.py:30:0 🛠️ REFACTOR: Too many positional arguments (6/5)

def visualize_weights(

ntupelizer/tools/weight_tools.py:74:0 🛠️ REFACTOR: Too many arguments (6/5)

def process_files(

ntupelizer/tools/weight_tools.py:74:0 🛠️ REFACTOR: Too many positional arguments (6/5)

def process_files(

ntupelizer/tools/weight_tools.py:84:15 🛠️ REFACTOR: Consider using 'with' for resource-allocating operations

        pool = multiprocessing.Pool(processes=8)

ntupelizer/tools/weight_tools.py:138:0 🛠️ REFACTOR: Too many local variables (16/15)

def plot_weighting_results(signal_data, bkg_data, sig_weights, bkg_weights, output_dir):

ntupelizer/tools/weight_tools.py:176:0 🛠️ REFACTOR: Too many arguments (10/5)

def plot_distributions(

ntupelizer/tools/weight_tools.py:176:0 🛠️ REFACTOR: Too many positional arguments (10/5)

def plot_distributions(

ntupelizer/tools/weight_tools.py:176:0 🛠️ REFACTOR: Too many local variables (19/15)

def plot_distributions(

ntupelizer/tools/weight_tools.py:193:4 ⚠️ WARNING: Unused variable 'fig'

    fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(20, 7), sharey=False)

ntupelizer/tools/weight_tools.py:240:0 🛠️ REFACTOR: Too many local variables (24/15)

def main(cfg: DictConfig):

ntupelizer/tools/weight_tools.py:406:4 ⚠️ WARNING: Unused variable 'fig'

    fig, ax = plt.subplots(nrows=1, ncols=1)

ntupelizer/tools/weight_tools.py:419:4 ❌ ERROR: No value for argument 'cfg' in function call

    main()

ntupelizer/tools/weight_tools.py:10:0 📏 CONVENTION: standard import "multiprocessing" should be placed before third party imports "hydra", "matplotlib", "numpy" (...) "mplhep", "awkward", "seaborn"

import multiprocessing

ntupelizer/tools/weight_tools.py:12:0 📏 CONVENTION: standard import "itertools.repeat" should be placed before third party imports "hydra", "matplotlib", "numpy" (...) "awkward", "seaborn", "matplotlib"

from itertools import repeat

ntupelizer/tools/weight_tools.py:11:0 📏 CONVENTION: Imports from package matplotlib are not grouped

import matplotlib as mpl

sim/check_files.py:17:68 📏 CONVENTION: Trailing whitespace

                print("sbatch run_sim.sh {} {}".format(seed, sname)) 

sim/check_files.py:4:0 📏 CONVENTION: Constant name "outpath" doesn't conform to UPPER_CASE naming style

outpath = "/local/joosep/clic_edm4hep/2024_03"

sim/check_files.py:16:34 ⚠️ WARNING: Duplicate string formatting argument 'sname', consider passing as named argument

            if not os.path.isfile("{}/{}/reco_{}_{}.root".format(outpath, sname, sname, seed)):

sim/check_files.py:16:34 📏 CONVENTION: Formatting a regular string which could be an f-string

            if not os.path.isfile("{}/{}/reco_{}_{}.root".format(outpath, sname, sname, seed)):

sim/check_files.py:17:22 📏 CONVENTION: Formatting a regular string which could be an f-string

                print("sbatch run_sim.sh {} {}".format(seed, sname)) 

sim/clicRec_e4h_input.py:1:0 📏 CONVENTION: Too many lines in module (2363/1000)

from Gaudi.Configuration import *

sim/clicRec_e4h_input.py:1:0 📏 CONVENTION: Module name "clicRec_e4h_input" doesn't conform to snake_case naming style

from Gaudi.Configuration import *

sim/clicRec_e4h_input.py:1:0 ❌ ERROR: Unable to import 'Gaudi.Configuration'

from Gaudi.Configuration import *

sim/clicRec_e4h_input.py:1:0 ⚠️ WARNING: Wildcard import Gaudi.Configuration

from Gaudi.Configuration import *

sim/clicRec_e4h_input.py:2:0 ❌ ERROR: Unable to import 'Gaudi.Configuration'

from Gaudi.Configuration import DEBUG, WARNING, INFO

sim/clicRec_e4h_input.py:4:0 ❌ ERROR: Unable to import 'Configurables'

from Configurables import LcioEvent, k4DataSvc, MarlinProcessorWrapper

sim/clicRec_e4h_input.py:5:0 ❌ ERROR: Unable to import 'k4MarlinWrapper.parseConstants'

from k4MarlinWrapper.parseConstants import *

sim/clicRec_e4h_input.py:5:0 ⚠️ WARNING: Wildcard import k4MarlinWrapper.parseConstants

from k4MarlinWrapper.parseConstants import *

sim/clicRec_e4h_input.py:7:0 📏 CONVENTION: Constant name "algList" doesn't conform to UPPER_CASE naming style

algList = []

sim/clicRec_e4h_input.py:14:0 ❌ ERROR: Undefined variable 'parseConstants'

parseConstants(CONSTANTS)

sim/clicRec_e4h_input.py:18:0 ❌ ERROR: Unable to import 'Configurables'

from Configurables import ToolSvc, Lcio2EDM4hepTool, EDM4hep2LcioTool

sim/clicRec_e4h_input.py:18:0 📏 CONVENTION: Import "from Configurables import ToolSvc, Lcio2EDM4hepTool, EDM4hep2LcioTool" should be placed at the top of the module

from Configurables import ToolSvc, Lcio2EDM4hepTool, EDM4hep2LcioTool

sim/clicRec_e4h_input.py:27:0 ❌ ERROR: Unable to import 'Configurables'

from Configurables import k4DataSvc, PodioInput

sim/clicRec_e4h_input.py:27:0 ⚠️ WARNING: Reimport 'k4DataSvc' (imported line 4)

from Configurables import k4DataSvc, PodioInput

sim/clicRec_e4h_input.py:27:0 📏 CONVENTION: Import "from Configurables import k4DataSvc, PodioInput" should be placed at the top of the module

from Configurables import k4DataSvc, PodioInput

sim/clicRec_e4h_input.py:83:22 ❌ ERROR: Undefined variable 'os'

    "DD4hepXMLFile": [os.environ["LCGEO"] + "/CLIC/compact/CLIC_o3_v14/CLIC_o3_v14.xml"],

sim/clicRec_e4h_input.py:2283:0 ❌ ERROR: Unable to import 'Configurables'

from Configurables import PodioOutput

sim/clicRec_e4h_input.py:2283:0 📏 CONVENTION: Import "from Configurables import PodioOutput" should be placed at the top of the module

from Configurables import PodioOutput

sim/clicRec_e4h_input.py:2361:0 ❌ ERROR: Unable to import 'Configurables'

from Configurables import ApplicationMgr

sim/clicRec_e4h_input.py:2361:0 📏 CONVENTION: Import "from Configurables import ApplicationMgr" should be placed at the top of the module

from Configurables import ApplicationMgr

sim/clicRec_e4h_input.py:18:0 📏 CONVENTION: Imports from package Configurables are not grouped

from Configurables import ToolSvc, Lcio2EDM4hepTool, EDM4hep2LcioTool

sim/clicRec_e4h_input.py:4:0 ⚠️ WARNING: Unused LcioEvent imported from Configurables

from Configurables import LcioEvent, k4DataSvc, MarlinProcessorWrapper

sim/clicRec_e4h_input.py:18:0 ⚠️ WARNING: Unused ToolSvc imported from Configurables

from Configurables import ToolSvc, Lcio2EDM4hepTool, EDM4hep2LcioTool

sim/clic_steer.py:45:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:49:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:51:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:54:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:56:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:59:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:60:2 📏 CONVENTION: Trailing whitespace

##    

sim/clic_steer.py:63:34 📏 CONVENTION: Trailing whitespace

##  set the default tracker action 

sim/clic_steer.py:64:50 📏 CONVENTION: Trailing whitespace

SIM.action.tracker = "Geant4TrackerWeightedAction" 

sim/clic_steer.py:66:38 📏 CONVENTION: Trailing whitespace

##  set the default calorimeter action 

sim/clic_steer.py:70:64 📏 CONVENTION: Trailing whitespace

##         example: SIM.action.mapActions['tpc'] = "TPCSDAction" 

sim/clic_steer.py:75:49 📏 CONVENTION: Trailing whitespace

## Configuration for the magnetic field (stepper) 

sim/clic_steer.py:90:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:94:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:97:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:100:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:103:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:106:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:107:2 📏 CONVENTION: Trailing whitespace

##    

sim/clic_steer.py:110:116 📏 CONVENTION: Trailing whitespace

##  default filter for calorimeter sensitive detectors; this is applied if no other filter is used for a calorimeter 

sim/clic_steer.py:113:69 📏 CONVENTION: Trailing whitespace

##  list of filter objects: map between name and parameter dictionary 

sim/clic_steer.py:114:0 📏 CONVENTION: Line too long (257/120)

SIM.filter.filters = {'edep0': {'parameter': {'Cut': 0.0}, 'name': 'EnergyDepositMinimumCut/Cut0'}, 'geantino': {'parameter': {}, 'name': 'GeantinoRejectFilter/GeantinoRejector'}, 'edep1kev': {'parameter': {'Cut': 0.001}, 'name': 'EnergyDepositMinimumCut'}}

sim/clic_steer.py:116:101 📏 CONVENTION: Trailing whitespace

##  a map between patterns and filter objects, using patterns to attach filters to sensitive detector 

sim/clic_steer.py:124:41 📏 CONVENTION: Trailing whitespace

## Configuration for the DDG4 ParticleGun 

sim/clic_steer.py:127:43 📏 CONVENTION: Trailing whitespace

##  direction of the particle gun, 3 vector 

sim/clic_steer.py:131:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:133:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:138:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:140:2 📏 CONVENTION: Trailing whitespace

##     

sim/clic_steer.py:145:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:148:2 📏 CONVENTION: Trailing whitespace

##     

sim/clic_steer.py:157:42 📏 CONVENTION: Trailing whitespace

##  position of the particle gun, 3 vector 

sim/clic_steer.py:164:57 📏 CONVENTION: Trailing whitespace

## Configuration for the output levels of DDG4 components 

sim/clic_steer.py:181:60 📏 CONVENTION: Trailing whitespace

## Configuration for the Particle Handler/ MCTruth treatment 

sim/clic_steer.py:184:30 📏 CONVENTION: Trailing whitespace

##  Keep all created particles 

sim/clic_steer.py:189:2 📏 CONVENTION: Trailing whitespace

##     

sim/clic_steer.py:195:31 📏 CONVENTION: Trailing whitespace

##  Printout at End of Tracking 

sim/clic_steer.py:198:33 📏 CONVENTION: Trailing whitespace

##  Printout at Start of Tracking 

sim/clic_steer.py:206:36 📏 CONVENTION: Trailing whitespace

## Configuration for the PhysicsList 

sim/clic_steer.py:212:2 📏 CONVENTION: Trailing whitespace

##     

sim/clic_steer.py:216:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:218:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:220:2 📏 CONVENTION: Trailing whitespace

## 

sim/clic_steer.py:223:2 📏 CONVENTION: Trailing whitespace

##     

sim/clic_steer.py:229:45 📏 CONVENTION: Trailing whitespace

## Properties for the random number generator 

sim/clic_steer.py:240:0 📏 CONVENTION: Trailing newlines

sim/clic_steer.py:3:0 ❌ ERROR: Unable to import 'DDSim.DD4hepSimulation'

from DDSim.DD4hepSimulation import DD4hepSimulation

sim/clic_steer.py:4:0 ❌ ERROR: Unable to import 'g4units'

from g4units import mm, GeV, MeV, m, deg

sim/clic_steer.py:4:0 ⚠️ WARNING: Unused GeV imported from g4units

from g4units import mm, GeV, MeV, m, deg

sim/clic_steer.py:4:0 ⚠️ WARNING: Unused deg imported from g4units

from g4units import mm, GeV, MeV, m, deg

sim/clic_steer.py:1:0 🛠️ REFACTOR: Similar lines in 2 files
==io:[65:71]
==ntupelizer.tools.general:[160:166]

    if len(input_data) > 0:
        data = ak.concatenate(input_data)
        print("Input data loaded")
    else:
        raise ValueError(f"No files found in {input_loc}")
    return data

sim/clic_steer.py:1:0 🛠️ REFACTOR: Similar lines in 2 files
==io:[19:43]
==ntupelizer.tools.general:[148:156]

    ret = ak.from_parquet(input_path, columns=columns)
    ret = ak.Array({k: ret[k] for k in ret.fields})
    return ret


def load_all_data(input_loc, n_files: int = None, columns: list = None) -> ak.Array:
    """Loads all .parquet files specified by the input. The input can be a list of input_paths, a directory where the files
    are located or a wildcard path.

    Args:
        input_loc : str
            Location of the .parquet files.
        n_files : int
            [default: None] Maximum number of input files to be loaded. By default all will be loaded.
        columns : list
            [default: None] Names of the columns/branches to be loaded from the .parquet file. By default all columns will
            be loaded

    Returns:
        input_data : ak.Array
            The concatenated data from all the loaded files
    """
    if n_files == -1:
        n_files = None

Inline annotations are also visible in the PR files tab.
Full report uploaded as an artifact pylint-report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant