-
Notifications
You must be signed in to change notification settings - Fork 54
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: import samples additional attributes - flash point and refractive index #2214
base: main
Are you sure you want to change the base?
Conversation
@@ -556,7 +556,10 @@ def build_sql_reaction_sample(columns, c_id, ids, checkedAll = false) | |||
# deleted_at: ['wp.deleted_at', nil, 10], | |||
molecule_name: ['mn."name"', '"molecule name"', 1], | |||
molarity_value: ['s."molarity_value"', '"molarity_value"', 0], | |||
molarity_unit: ['s."molarity_unit"', '"molarity_unit"', 0], |
There was a problem hiding this comment.
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. [615/100]
@@ -127,6 +127,12 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
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 filter_with_permission_and_detail_level is too high. [<13, 34, 28> 45.92/25]
@@ -127,6 +127,12 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
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 filter_with_permission_and_detail_level is too high. [20/7]
@@ -127,6 +127,12 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
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]
@@ -127,6 +127,12 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/PerceivedComplexity: Perceived complexity for filter_with_permission_and_detail_level is too high. [22/8]
sample['dry_solvent'] = row['dry_solvent'] if row['dry_solvent'].present? | ||
sample['purity'] = row['purity'] if row['purity'].present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/BlockLength: Block has too many lines. [89/25]
spec/lib/export/export_excel_spec.rb
Outdated
sample_json['refractive_index'] = refractive_index | ||
sample_json['molarity_value'] = '2.45' | ||
sample_json['molarity_unit'] = 'M' | ||
exporter.instance_eval('@headers =["melting pt", "flash point", "refractive index", "molarity"]', __FILE__, __LINE__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/LineLength: Line is too long. [123/120]
spec/lib/import/import_sdf_spec.rb
Outdated
rows: [{ | ||
'inchikey' => 'DTHMTBUWTGVEFG-DDWIOCJRSA-N', | ||
'molfile' => Rails.root.join('spec/fixtures/mf_with_data_01.sdf').read, | ||
'description' => "MOLECULE_NAME\n(R)-Methyl-2-amino-2-phenylacetate hydrochloride ?96%; (R)-(?)-2-Phenylglycine methyl ester hydrochloride\n\nSAFETY_R_S\nH: 319; P: 305+351+338\n\nSMILES_STEREO\n[Cl-].COC(=O)[C@H](N)c1ccccc1.[H+]\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/LineLength: Line is too long. [241/120]
spec/lib/import/import_sdf_spec.rb
Outdated
{ inchikey: 'DTHMTBUWTGVEFG-DDWIOCJRSA-N', | ||
is_partial: false, | ||
molfile_version: 'V2000', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/MultilineHashBraceLayout: Closing hash brace must be on the same line as the last hash element when opening brace is on the same line as the first hash element.
spec/lib/import/import_sdf_spec.rb
Outdated
{ inchikey: 'DTHMTBUWTGVEFG-DDWIOCJRSA-N', | ||
is_partial: false, | ||
molfile_version: 'V2000', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.
LCOV of commit
|
LCOV of commit
|
lib/import/import_chemicals.rb
Outdated
key = to_snake_case(column_header) | ||
format_value = value.strip | ||
def self.build_chemical_data(map_column, chemical, key, formated_value) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body beginning.
LCOV of commit
|
7734b77
to
f0f7636
Compare
@@ -127,6 +127,14 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
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 filter_with_permission_and_detail_level is too high. [<13, 35, 30> 47.9/25]
@@ -127,6 +127,14 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
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 filter_with_permission_and_detail_level is too high. [21/7]
@@ -127,6 +127,14 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
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. [34/30]
@@ -127,6 +127,14 @@ def filter_with_permission_and_detail_level(sample) | |||
string.split(',').join(' - ') | |||
elsif column == 'solvent' | |||
extract_label_from_solvent_column(sample[column]) || '' | |||
elsif column == 'refractive index' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/PerceivedComplexity: Perceived complexity for filter_with_permission_and_detail_level is too high. [23/8]
LCOV of commit
|
f0f7636
to
0c7a6b7
Compare
LCOV of commit
|
enhancement to import fields like Location, Melting Point, Boiling Point, flash point, refractive index, density, and molarity and chemical volume with units, and fix existing bugs. |
Chemotion.dev.12.webm |
LCOV of commit
|
…attributes (flash point and refractive index)
485f974
to
17dda99
Compare
LCOV of commit
|
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