You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
these should probably spawn separate individual follow-on tickets with more low-level detail, but here is a short high-level list of the initial things that need to be done to make this codebase production-worthy:
see allow specification of serialization type for exported RDF #14specification of serialization type for the RDF that's downloaded. presently, the retrieval function has a param that defaults to ld+json, but there's no facility to override that in the calling functions, and there's nothing like class level configuration (because it's just loose functions at the moment).
see write tests #6write tests. jest is already included as a dependency. my gut feeling at this point is that we should be able to mock the network connection part for simulating resource retrieval success/error, and do the rest as unit tests without mocking anything.
see make sinopia_exporter usable as a command line script #4make this usable from the command-line in a single invocation. for the initial code that i splatted out yesterday, i was just building and testing things from the node console. my inclination was to do something like the sinopia_acl codebase, using commander.js to parse options as needed. i have vague recollections of @mjgiarlo saying that commander didn't play so nicely with asynchronous functions and promises in general. but similar to what that codebase does for obtaining a cognito token, i think it's fine for commander to just kick off some asynchronous work, and to let the user check for the output files to see whether things are done. as it is, the test code will write a log file upon successful retrieval of all resources from a group. not sure if we want fancier or more user friendly indicators of completion.
see make sinopia_exporter usable as a command line script #4, for which this bit of work was a prereq structure https://github.com/LD4P/sinopia_exporter/blob/master/src/getGroupRDF.js so that it has proper exports and whatnot. this is my first time spinning up a node project from scratch, so when i wasn't able to get that working, i concentrated on getting the underlying retrieval mechanisms working. i figured i could do some pairing to get past that structural stuff with someone more node-savvy than i.
these should probably spawn separate individual follow-on tickets with more low-level detail, but here is a short high-level list of the initial things that need to be done to make this codebase production-worthy:
READMEspecification of serialization type for the RDF that's downloaded. presently, the retrieval function has a param that defaults told+json
, but there's no facility to override that in the calling functions, and there's nothing like class level configuration (because it's just loose functions at the moment).DevOpsDocserror handling. because there isn't any currently.hook up to circle for continuous integrationwrite tests.jest
is already included as a dependency. my gut feeling at this point is that we should be able to mock the network connection part for simulating resource retrieval success/error, and do the rest as unit tests without mocking anything.licensemake this usable from the command-line in a single invocation. for the initial code that i splatted out yesterday, i was just building and testing things from thenode
console. my inclination was to do something like the sinopia_acl codebase, usingcommander.js
to parse options as needed. i have vague recollections of @mjgiarlo saying that commander didn't play so nicely with asynchronous functions and promises in general. but similar to what that codebase does for obtaining a cognito token, i think it's fine for commander to just kick off some asynchronous work, and to let the user check for the output files to see whether things are done. as it is, the test code will write a log file upon successful retrieval of all resources from a group. not sure if we want fancier or more user friendly indicators of completion.structure https://github.com/LD4P/sinopia_exporter/blob/master/src/getGroupRDF.js so that it has properexport
s and whatnot. this is my first time spinning up a node project from scratch, so when i wasn't able to get that working, i concentrated on getting the underlying retrieval mechanisms working. i figured i could do some pairing to get past that structural stuff with someone more node-savvy than i.see also LD4P/sinopia_editor#797
The text was updated successfully, but these errors were encountered: