-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
273 additions
and
126 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: "2" | ||
checks: | ||
argument-count: | ||
enabled: true | ||
config: | ||
threshold: 6 | ||
complex-logic: | ||
enabled: true | ||
config: | ||
threshold: 10 | ||
file-lines: | ||
enabled: true | ||
config: | ||
threshold: 1000 | ||
method-complexity: | ||
enabled: true | ||
config: | ||
threshold: 10 | ||
method-count: | ||
enabled: true | ||
config: | ||
threshold: 20 | ||
method-lines: | ||
enabled: true | ||
config: | ||
threshold: 50 | ||
nested-control-flow: | ||
enabled: true | ||
config: | ||
threshold: 5 | ||
return-statements: | ||
enabled: true | ||
config: | ||
threshold: 5 | ||
similar-code: | ||
enabled: true | ||
identical-code: | ||
enabled: true | ||
plugins: | ||
pep8: | ||
enabled: false | ||
sonar-python: | ||
enabled: true | ||
config: | ||
tests_patterns: | ||
- tests/** | ||
exclude_patterns: | ||
- "config/" | ||
- "dist/" | ||
- "sdist" | ||
- "**/test/" | ||
- "**/tests/" |
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
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
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,11 @@ | ||
""" | ||
models package | ||
~~~~~~~~~~~~~~ | ||
These are various `pydantic` models useful for data parsing and validation in `pyhdtoolkit`. | ||
:copyright: (c) 2021 by Felix Soubelet. | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
from .beam import BeamParameters | ||
from .htc import BaseSummary, ClusterSummary, HTCTaskSummary | ||
from .madx import MADXBeam |
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,32 @@ | ||
""" | ||
Module models.beam | ||
------------------ | ||
Created on 2021.08.03 | ||
:author: Felix Soubelet (felix.soubelet@cern.ch) | ||
A module with `pydantic` models to validate and store data structures used in the `beam` module. | ||
""" | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class BeamParameters(BaseModel): | ||
""" | ||
Class to encompass, validate and manipulate properties of a particle beam. | ||
""" | ||
|
||
pc_GeV: Optional[float] # Beam momentum [GeV] | ||
B_rho_Tm: Optional[float] # Beam rigidity [T/m] | ||
E_0_GeV: Optional[float] # Particle rest mass energy [GeV] | ||
charge: Optional[float] # Particle charge in [e] | ||
E_tot_GeV: Optional[float] # Total beam energy [GeV] | ||
E_kin_GeV: Optional[float] # Kinectic beam energy [GeV] | ||
gamma_r: Optional[float] # Relativistic gamma | ||
beta_r: Optional[float] # Relativistic beta | ||
en_x_m: Optional[float] # Horizontal normalized emittance [m] | ||
en_y_m: Optional[float] # Vertical normalized emittance [m] | ||
eg_x_m: Optional[float] # Horizontal geometrical emittance | ||
eg_y_m: Optional[float] # Vertical geometrical emittance | ||
deltap_p: Optional[float] # Momentum deviation |
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
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.