cheminfo / biologic-converter

MIT License
1 stars 2 forks source link

refactor: param names, new techniques, bug fixes and tests #38

Closed ghost closed 1 year ago

ghost commented 1 year ago

Changes:

For a visual test of the data this code can be used in react-science (modification in biologic loader):

function preferredXY(technique: string, variables: MeasurementDataVariable) {
  if (!technique) return variables;// this line may be commented as well
  variables.x = variables.a;
  variables.y = variables.b;
  return variables;
}

This is flagged as breaking change because the parameters will be named differently.

BREAKING CHANGE: Use MPT parameters as they appear in the text file.

codecov[bot] commented 1 year ago

Codecov Report

Base: 94.98% // Head: 96.33% // Increases project coverage by +1.34% :tada:

Coverage data is based on head (8d8fb8b) compared to base (d4518d0). Patch coverage: 98.82% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #38 +/- ## ========================================== + Coverage 94.98% 96.33% +1.34% ========================================== Files 25 27 +2 Lines 538 545 +7 Branches 153 147 -6 ========================================== + Hits 511 525 +14 + Misses 26 20 -6 + Partials 1 0 -1 ``` | [Impacted Files](https://codecov.io/gh/cheminfo/biologic-converter/pull/38?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo) | Coverage Δ | | |---|---|---| | [src/utility/ids.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL3V0aWxpdHkvaWRzLnRz) | `100.00% <ø> (ø)` | | | [src/mpr/modules/utility/getParameters.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3V0aWxpdHkvZ2V0UGFyYW1ldGVycy50cw==) | `93.33% <92.30%> (-2.32%)` | :arrow_down: | | [src/mpr/modules/parseLogs.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3BhcnNlTG9ncy50cw==) | `100.00% <100.00%> (ø)` | | | [src/mpr/modules/parseSettings.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3BhcnNlU2V0dGluZ3MudHM=) | `100.00% <100.00%> (ø)` | | | [src/mpr/modules/utility/mapIRangeToMPT.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3V0aWxpdHkvbWFwSVJhbmdlVG9NUFQudHM=) | `77.58% <100.00%> (ø)` | | | [src/mpr/modules/utility/oleToDate.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3V0aWxpdHkvb2xlVG9EYXRlLnRz) | `100.00% <100.00%> (ø)` | | | [src/mpr/modules/utility/preParamsLookUp.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3V0aWxpdHkvcHJlUGFyYW1zTG9va1VwLnRz) | `100.00% <100.00%> (ø)` | | | [src/mpr/modules/utility/techniqueFromId.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wci9tb2R1bGVzL3V0aWxpdHkvdGVjaG5pcXVlRnJvbUlkLnRz) | `100.00% <100.00%> (ø)` | | | [src/mps/utility/addKeyValueToResult.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wcy91dGlsaXR5L2FkZEtleVZhbHVlVG9SZXN1bHQudHM=) | `100.00% <100.00%> (ø)` | | | [src/mpt/parseLogAndSettings.ts](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo#diff-c3JjL21wdC9wYXJzZUxvZ0FuZFNldHRpbmdzLnRz) | `100.00% <100.00%> (ø)` | | | ... and [6 more](https://codecov.io/gh/cheminfo/biologic-converter/pull/38/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cheminfo)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.