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

Conversion rate rebased to v1.9.3 #2242

Open
wants to merge 32 commits into
base: branch-from-v1.9.3
Choose a base branch
from

Conversation

adambasha0
Copy link
Contributor

@adambasha0 adambasha0 commented Nov 18, 2024

  • 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

PiTrem and others added 28 commits July 9, 2024 12:06
* chore: rm obsolete files

* chore: update nodejs - relax range on LTS

* ci: refactor preparation script

* ci: update github-ci dockerfile
- re enable DJ delayed modus after models/report_spec
- add failure feedback message to spec
- DJ logger to stdout in test env
Bumps [rack-contrib](https://github.com/rack/rack-contrib) from 2.3.0 to 2.5.0.
- [Release notes](https://github.com/rack/rack-contrib/releases)
- [Changelog](https://github.com/rack/rack-contrib/blob/main/CHANGELOG.md)
- [Commits](rack/rack-contrib@v2.3.0...v2.5.0)

---
updated-dependencies:
- dependency-name: rack-contrib
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: limit attempts for sending welcome mail

so that to avoid uncessary sus traffic is the email undeliverable.

Define max_attempts as mailer class methods.

* chore: remove deused mailer job

* fix: avoid sending welcome email to dev seed users
… in report (#1951)

display the "Additional information for publication and purification details" for reactions with paragraph structure (similar to the description field) 

resolve: #1866

Co-authored-by: Tasnim Mehzabin <[email protected]>
- dep update
- nmrium format v3 to v5
- store molfile into nmrium data

- dep update

-  also fix  import

Co-authored-by: Lan Le <[email protected]>
…#1973)

fix method of how parent element of the attachment is found:

- take into account that attachments can be associated to other model not only through the container model but also directly with `attachable`.

- add tests for attachment in analysis container
Bumps [actionpack](https://github.com/rails/rails) from 6.1.7.7 to 6.1.7.8.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.1.3.4/actionpack/CHANGELOG.md)
- [Commits](rails/rails@v6.1.7.7...v6.1.7.8)

---
updated-dependencies:
- dependency-name: actionpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#1978)

* add decision if annotated or original image should be fetched

* enable magnify of image in cell line analysis

resolve #1927
 eventLister added to editor to wait for the editor to be ready before loading the molfile
- db/schema.rb update: `rake db:migrate`  on empty pg14 DB

- model annotation: `rake annotate_models`

-  db add missing indices:

  -- collection-cellline remove potential duplicates before introducing uniq index
      with migration test
  -- add missing indices for collections_cellline collections_research_plan
…ion (#1915)

-   `name agnostic` method to get the proper assoicated Collections{Element} for a given AR model through collectable concern or the other way around through the collecting concern

  update colleciton api accordingly 
  also remove redundant parameter validation

-  lit api use constant mapping

- DRY collection-cellline operations

---------

Co-authored-by: PiTrem <[email protected]>
also add adm routine to
 - restore those
 - ensure consistent `All` collection content

To trigger the recovery or restoration of the locked collections
navigate as an Admin to:
` /api/v1/admin/jobs/queue_task?task=collection_restore`
Alternately load db/seeds/shared/collections.seed.rb from the rails
console.
mv person default profile to profile model
* Add option to force remote display resizing :
- Hide the device list on entering focus mode
- Show the device list on entering blur mode
- Enter blur mode when unhidding the device list
- Wait before DeviceList is displayed before resizing the screen
- Change label of ScreenResizing Button

* Fix jumping viewport when screen is clicked :
resolve #2006
* changed methylene chloride to dichloromethane (dcm - methylene chloride)
…1960)

* Generalised initializers that load config from a yaml file

* Only the validation section is config dependentant.

* ensure  Rails.application.{structure_editors,ketcher_service} is defined and an instance
    of ActiveSupport::OrderedOptions, when config/{structure_editors,ketcher_service}.yml:
        -- is missing or
        -- is present but nothing defined for the current environment

* add minor validation when loading the config yml

* should also resolve #1929 when the example file is just copied: proper key in the yml example file

---------

Co-authored-by: PiTrem <[email protected]>
@@ -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]

@@ -111,7 +111,7 @@ def create_new_sample(sample, fixed_label)
:id, :is_new, :is_split, :reference, :equivalent, :position,
: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
:melting_point_lowerbound, :melting_point_upperbound, :segments, :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. [<7, 30, 4> 31.06/25]

@@ -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.

Metrics/AbcSize: Assignment Branch Condition size for add_to_reaction is too high. [<6, 26, 9> 28.16/25]

@@ -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.

Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.

@@ -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.

@@ -333,7 +333,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. [606/200]

@@ -333,7 +333,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]

@@ -333,7 +333,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]

@@ -333,7 +333,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]

@adambasha0 adambasha0 force-pushed the conversion-rate-rebased-to-v1.9.3 branch from 50c3f64 to 2bd68f2 Compare November 18, 2024 15:17
@adambasha0 adambasha0 force-pushed the conversion-rate-rebased-to-v1.9.3 branch from 2bd68f2 to 6adfa08 Compare November 18, 2024 15:26
@adambasha0 adambasha0 self-assigned this Nov 19, 2024
@PiTrem PiTrem force-pushed the conversion-rate-rebased-to-v1.9.3 branch from 6adfa08 to bd5f05f Compare November 20, 2024 08:58
ElementPermissionProxy.new(current_user, element, user_ids).read_dataset?)

if !can_dwnld && (element = @attachment.container&.root&.containable || @attachment.attachable)
can_dwnld = if element.is_a?(Container)

Choose a reason for hiding this comment

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

Metrics/BlockNesting: Avoid more than 3 levels of block nesting.

@message = content_path.read
@output = markdown(@message)

mail(to: @user.email, subject: '[ELN] Welcome to Chemotion.')

Choose a reason for hiding this comment

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

Rails/I18nLocaleTexts: Move locale texts to the locale files in the config/locales directory.

@@ -20,8 +20,7 @@
# updated_at :datetime not null
# template :string default("standard")
# mol_serials :text default([])
# si_reaction_settings :text default({"Name"=>true, "CAS"=>true, "Formula"=>true, "Smiles"=>true,
# "InCHI"=>true, "Molecular Mass"=>true, "Exact Mass"=>true, "EA"=>true})
# si_reaction_settings :text default({"Name"=>true, "CAS"=>true, "Formula"=>true, "Smiles"=>true, "InCHI"=>true, "Molecular Mass"=>true, "Exact Mass"=>true, "EA"=>true})

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. [182/120]

end
self.profile.update_columns(data: data)
def profile
super || (new_record? && build_profile ) || create_profile

Choose a reason for hiding this comment

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

Layout/SpaceInsideParens: Space inside parentheses detected.

@@ -333,7 +333,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. [605/200]

@@ -423,7 +479,7 @@
end

describe 'POST /api/v1/attachments/thumbnails' do
pending 'not yet implemented'
pending

Choose a reason for hiding this comment

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

RSpec/PendingWithoutReason: Give the reason for pending.

@PiTrem PiTrem force-pushed the conversion-rate-rebased-to-v1.9.3 branch from bd5f05f to e4330d7 Compare November 20, 2024 13:29
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.