esg-epfl-apc / astrojsvis

0 stars 0 forks source link

finalize and publish fits reading library #9

Open volodymyrss opened 9 months ago

volodymyrss commented 9 months ago

with short manual, example

following https://github.com/esg-epfl-apc/astrojsvis/issues/2

francoismg commented 8 months ago

Library work in progress is available here : https://github.com/esg-epfl-apc/fits-reader

Still a bit of refactoring to do on the library and cleaning (adding image_utils, decompress, .....) Make better webpack config and architecture Make awilix works for DI ? Add jest for unit test Test with different fits file (binary table, ascii table, image, compressed image) Add github actions and branches for automatic build and publication on npm

francoismg commented 2 months ago

FITS reader library is now available as an npm package as "fits-reader-js" @burnout87 @dsavchenko

will update readme on the library repo with the new info

you can add it your package.json file like that :

"dependencies": { "fits-reader-js": "^1.0.0" },

import :

import {parseFITS} from "fits-reader-js/fits-reader";

and then use exposed entry point function like that

this.file = parseFITS(arrayBuffer);

burnout87 commented 2 months ago

FITS reader library is now available as an npm package as "fits-reader-js" @burnout87 @dsavchenko

Thanks @francoismg for the info, I dont use node/npm within the context of the frontend-tab-generator, as of now, I am just cloning from this repo. Will there be a link from the github pages ? What do you recommend to use?

volodymyrss commented 2 months ago

Could you @francoismg please write publishing instruction?

volodymyrss commented 2 months ago

Need also provide a way to link to the library (CDN?)

francoismg commented 2 months ago

FITS reader library is now available as an npm package as "fits-reader-js" @burnout87 @dsavchenko

Thanks @francoismg for the info, I dont use node/npm within the context of the frontend-tab-generator, as of now, I am just cloning from this repo. Will there be a link from the github pages ? What do you recommend to use?

Maybe one easy way could be to use unpkg, it enables you to fetch any files that is published on npm so no need to load it from a cdn

For the fits reader library the url would be : https://unpkg.com/fits-reader-js@1.0.0/fits-reader.js

Do you think that would do or do you want me to continue looking for solutions?

burnout87 commented 2 months ago

this is an interesting appraoch, I will test it and let you know

burnout87 commented 2 months ago

this is an interesting approach, I will test it and let you know

first round of tests I did confirm it works, thanks

burnout87 commented 1 week ago

On my side, this can be closed