Skip to content

Commit ff875f7

Browse files
feat: add github action and format peaks for XRD (#96)
1 parent e5b7d98 commit ff875f7

4 files changed

Lines changed: 608 additions & 553 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16.10.0
15+
registry-url: https://registry.npmjs.org/
16+
- run: yarn install
17+
- run: yarn compile
18+
- run: yarn publish
19+
env:
20+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@complat/chem-spectra-client",
3-
"version": "1.0.0-rc18",
3+
"version": "1.0.0-rc19",
44
"description": "ChemSpectra client side server.",
55
"repository": {
66
"type": "git",
@@ -20,7 +20,7 @@
2020
"react-dom": "^17.0.2"
2121
},
2222
"dependencies": {
23-
"@complat/react-spectra-editor": "1.0.0-rc18",
23+
"@complat/react-spectra-editor": "1.0.0-rc19",
2424
"@emotion/react": "^11.11.1",
2525
"@emotion/styled": "^11.11.0",
2626
"@mui/icons-material": "^5.14.9",

src/lib/components/content.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Content extends React.Component {
104104
}
105105

106106
formatPks({
107-
peaks, layout, shift, isAscend, decimal, isIntensity, integration, curveSt,
107+
peaks, layout, shift, isAscend, decimal, isIntensity, integration, curveSt, waveLength,
108108
}) {
109109
const { fileSt } = this.props;
110110
const { jcamp, jcampList } = fileSt;
@@ -118,11 +118,10 @@ class Content extends React.Component {
118118
}
119119
const { entity } = data;
120120
const { features } = entity;
121+
const { temperature } = entity;
121122
const { maxY, minY } = Array.isArray(features) ? {} : (features.editPeak || features.autoPeak);
122123
const boundary = { maxY, minY };
123-
const body = FN.peaksBody({
124-
peaks, layout, decimal, shift, isAscend, isIntensity, boundary, integration,
125-
});
124+
const body = FN.peaksBody({ peaks, layout, decimal, shift, isAscend, isIntensity, boundary, integration, waveLength, temperature,}); //eslint-disable-line
126125
const wrapper = FN.peaksWrapper(layout, shift);
127126
const desc = RmDollarSign(wrapper.head) + body + wrapper.tail;
128127
return desc;
@@ -197,10 +196,10 @@ class Content extends React.Component {
197196
}
198197

199198
writePeak({
200-
peaks, layout, shift, isAscend, decimal, isIntensity, integration, curveSt,
199+
peaks, layout, shift, isAscend, decimal, isIntensity, integration, curveSt, waveLength,
201200
}) {
202201
const desc = this.formatPks({
203-
peaks, layout, shift, isAscend, decimal, isIntensity, integration, curveSt,
202+
peaks, layout, shift, isAscend, decimal, isIntensity, integration, curveSt, waveLength,
204203
});
205204
const { updateDescAct } = this.props;
206205
updateDescAct(desc);

0 commit comments

Comments
 (0)