Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Conversion rate #2272

Merged
merged 1 commit into from
Dec 19, 2024
Merged

feat: Conversion rate #2272

merged 1 commit into from
Dec 19, 2024

Conversation

adambasha0
Copy link
Contributor

  • rather 1-story 1-commit than sub-atomic commits

  • commit title is meaningful => git history search

  • commit description is helpful => helps the reviewer to understand the changes

  • code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured

  • added code is linted

  • tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited

  • in case the changes are visible to the end-user,  video or screenshots should be added to the PR => helps with user testing

  • testing coverage improvement is improved.

  • CHANGELOG :  add a bullet point on top (optional: reference to github issue/PR )

  • parallele PR for documentation  on docusaurus  if the feature/fix is tagged for a release

@adambasha0 adambasha0 self-assigned this Dec 18, 2024
@adambasha0 adambasha0 requested a review from PiTrem December 18, 2024 16:03
@@ -614,6 +614,7 @@ def build_sql_reaction_sample(columns, c_id, ids, checkedAll = false)
# reactions_sample:
equivalent: ['r_s.equivalent', '"r eq"', 10],
reference: ['r_s.reference', '"r ref"', 10],
conversion_rate: ['r_s.conversion_rate', '"r conversion rate"', 10],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/ModuleLength: Module has too many lines. [611/100]

@@ -113,7 +113,7 @@ def create_new_sample(sample, fixed_label)
:type, :molecule, :collection_id, :short_label, :waste, :show_label, :coefficient, :user_labels,
:boiling_point_lowerbound, :boiling_point_upperbound,
:melting_point_lowerbound, :melting_point_upperbound, :segments, :gas_type,
:gas_phase_data
:gas_phase_data, :conversion_rate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/AbcSize: Assignment Branch Condition size for create_new_sample is too high. [<9, 35, 5> 36.48/25]

@@ -215,6 +215,7 @@ def associate_sample_with_reaction(sample, modified_sample, material_group)
type: reactions_sample_klass,
gas_type: sample.gas_type,
gas_phase_data: sample.gas_phase_data,
conversion_rate: sample.conversion_rate,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/AbcSize: Assignment Branch Condition size for associate_sample_with_reaction is too high. [<2, 26, 2> 26.15/25]

@@ -215,6 +215,7 @@ def associate_sample_with_reaction(sample, modified_sample, material_group)
type: reactions_sample_klass,
gas_type: sample.gas_type,
gas_phase_data: sample.gas_phase_data,
conversion_rate: sample.conversion_rate,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/MethodLength: Method has too many lines. [32/30]

@@ -82,6 +82,7 @@ class Import::ImportJson
# 'r_uuid' => nil,
# 'r_reference' => nil,
# 'r_equivalent' => nil,
# 'r_conversion_rate' => nil,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/ClassLength: Class has too many lines. [284/200]

@@ -374,7 +375,8 @@ def add_to_reaction(klass, el, new_el)
if new_data && new_data[r_uuid] && new_data[r_uuid]['id']
@log['samples'][el_uuid][klass.name] = klass.create(
sample_id: new_el.id, reaction_id: new_data[r_uuid]['id'],
reference: ref, equivalent: eq, position: el['r_position']
reference: ref, equivalent: eq, position: el['r_position'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.

@@ -361,7 +361,7 @@ def material_hash(material, is_product=false)
mol: valid_digit(mmol, digit),
mmol_unit: mmol_unit,
equiv: valid_digit(s.equivalent, digit),
molecule_name_hash: s[:molecule_name_hash]
molecule_name_hash: s[:molecule_name_hash],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/ClassLength: Class has too many lines. [627/200]

@@ -361,7 +361,7 @@ def material_hash(material, is_product=false)
mol: valid_digit(mmol, digit),
mmol_unit: mmol_unit,
equiv: valid_digit(s.equivalent, digit),
molecule_name_hash: s[:molecule_name_hash]
molecule_name_hash: s[:molecule_name_hash],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/AbcSize: Assignment Branch Condition size for material_hash is too high. [<10, 51, 7> 52.44/25]

@@ -361,7 +361,7 @@ def material_hash(material, is_product=false)
mol: valid_digit(mmol, digit),
mmol_unit: mmol_unit,
equiv: valid_digit(s.equivalent, digit),
molecule_name_hash: s[:molecule_name_hash]
molecule_name_hash: s[:molecule_name_hash],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/CyclomaticComplexity: Cyclomatic complexity for material_hash is too high. [8/7]

@@ -361,7 +361,7 @@ def material_hash(material, is_product=false)
mol: valid_digit(mmol, digit),
mmol_unit: mmol_unit,
equiv: valid_digit(s.equivalent, digit),
molecule_name_hash: s[:molecule_name_hash]
molecule_name_hash: s[:molecule_name_hash],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/MethodLength: Method has too many lines. [32/30]

Copy link

LCOV of commit 777ec6b during Continuous Integration #4266

Summary coverage rate:
  lines......: 66.7% (14313 of 21448 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@adambasha0 adambasha0 force-pushed the conversion-rate-v1.10 branch from 777ec6b to ee9ce0c Compare December 19, 2024 12:41
Copy link

LCOV of commit ee9ce0c during Continuous Integration #4273

Summary coverage rate:
  lines......: 66.7% (14297 of 21448 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@PiTrem PiTrem merged commit 24bfddb into v1.10 Dec 19, 2024
2 of 3 checks passed
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.

2 participants