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

[WIP] First draft #3

Merged
merged 11 commits into from
Mar 30, 2020
Merged

[WIP] First draft #3

merged 11 commits into from
Mar 30, 2020

Conversation

kjappelbaum
Copy link
Collaborator

This is a first draft, I will still need to work on parsing some more metadata (like the specs of the instrument).

Sorry for the delay, just got my MacBook back from repair last week.

Copy link
Member

@lpatiny lpatiny left a comment

Choose a reason for hiding this comment

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

Looks great thanks !

const data = readFileSync(join(__dirname, '../../data/test.brml'));

it('check the output dictionary', async () => {
let result = await readBRML(data);
Copy link
Member

Choose a reason for hiding this comment

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

Please also check some values. At worse you can use https://jestjs.io/docs/en/snapshot-testing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tests on values added in da0378d.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will also move them to the refactored version (https://github.com/kjappelbaum/xrd/tree/spectrum_class).

* @param {} options={}
*/
// eslint-disable-next-line no-unused-vars
export function readBRML(binary, options = {}) {
Copy link
Member

Choose a reason for hiding this comment

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

Please use rather async / await syntax. We find the code easier to read. It looks like sync code while still being async.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hopefully a bit clearer in da0378d.

@kjappelbaum
Copy link
Collaborator Author

Thanks for the review and the time, I hope I fixed the issues.

@lpatiny lpatiny merged commit 87df211 into cheminfo:master Mar 30, 2020
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