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

Collect & add more Playground examples #25

Closed
4 of 6 tasks
fsteeg opened this issue May 5, 2021 · 19 comments · Fixed by #67
Closed
4 of 6 tasks

Collect & add more Playground examples #25

fsteeg opened this issue May 5, 2021 · 19 comments · Fixed by #67

Comments

@fsteeg
Copy link
Member

fsteeg commented May 5, 2021

Small examples with different source and target formats, e.g. MARC-to-JSON, JSON-to-JSON, HTML-to-JSON.

We can discuss these with Playground links here in the ticket.

Functional reviewer: @TobiasNx

Code reviewer: @fsteeg

@acka47 acka47 assigned fsteeg and unassigned acka47 and TobiasNx May 5, 2021
@acka47 acka47 changed the title Add more Playground examples Collect & add more Playground examples May 5, 2021
@fsteeg fsteeg assigned TobiasNx and unassigned fsteeg Jun 23, 2021
@TobiasNx

This comment has been minimized.

@fsteeg

This comment has been minimized.

@fsteeg
Copy link
Member Author

fsteeg commented Nov 22, 2021

As an idea for a simple, yet configurable integration in the playground UI:

Provide each sample in a text file, load files in playground to populate 'Load sample' drop down with examples, using file name of the text file, e.g. marc_to_json. Examples can then be configured / maintained by adding / editing these text files.

@katauber katauber assigned katauber and unassigned TobiasNx Nov 24, 2021
@fsteeg
Copy link
Member Author

fsteeg commented Nov 24, 2021

As a naming convention for the example files, maybe we could use something like <where-we-read-from>_<what-we-decode>_to_<what-we-encode>, e.g. http_json_to_json or oai-pmh_mods_to_json.

@katauber
Copy link
Member

katauber commented Dec 9, 2021

Deployed to https://test.metafacture.org/playground/

@katauber katauber removed their assignment Dec 9, 2021
@katauber
Copy link
Member

@TobiasNx I installed again to https://test.metafacture.org/playground/ with these changes:

  1. When loading an example and process it and then switch to a new example the result box is not cleared.

AFter loading a new example, the result box is cleared now.

  1. The MarcXML-to-JSON example does not seem to work, only if you select the morph-option. This is weird since the flux does not need any fix or morph.

Yes, you found a bug! I fixed this.

  1. There should be some kind of tool tip concerning the PG_Data. It should be some explained.

I did not implement something for this. Where and when do you think is the best place for such a tooltip? I am not really sure, how to solve this. If we need this explained, we maybe need also explained how to use the fix and morph editor?

@katauber katauber assigned TobiasNx and unassigned katauber Dec 16, 2021
TobiasNx added a commit that referenced this issue Dec 16, 2021
@TobiasNx
Copy link
Contributor

+1 Now it seems to work.
Maybe @dr0i can say something about the Pica-to-Marc workflow that does not work, which is build from the examples in the runner.

Are they too old?

I updated and added some examples. @dr0i could you ave a look at https://github.com/metafacture/metafacture-playground/blob/25-examples/resources/examples/Web_Pica-to-MarcXML_(morph) why this workflow does not process? It is copied from:

https://github.com/metafacture/metafacture-core/tree/master/metafacture-runner/src/main/dist/examples/morph/pica-to-marcxml
See here in Playground

@TobiasNx TobiasNx assigned dr0i and katauber and unassigned TobiasNx Dec 16, 2021
@dr0i
Copy link
Member

dr0i commented Dec 16, 2021

@TobiasNx workflow seems fine - at least it is processed when executed with flux.sh. The logs at the server (only found nohup.out) just logs Processed flux file. - and that's it.
Have to dig a bit more how to log/debug the playground...

@dr0i
Copy link
Member

dr0i commented Dec 30, 2021

Deployed the fix (metafacture/metafacture-core#435) to test: http://test.lobid.org/playground/.

@dr0i dr0i assigned TobiasNx and unassigned dr0i Dec 30, 2021
@dr0i
Copy link
Member

dr0i commented Jan 3, 2022

Note: changed metafacture-core-dependencies at productive server in project.clj to master-SNAPSHOT (and pulled the metafacture-core before and installed it locally to ~/.m2 ). So, if 25-examples will be merged into main the playground can be deployed by pulling and restarting it - the fix in metafacture-core will be part of the redeployment.

@dr0i
Copy link
Member

dr0i commented Jan 3, 2022

@TobiasNx in the output the marc record's attribute type is missing, like <marc:record type="Bibliographic">. Don't know if this is kind of mandatory resp. if we should not provide it, as a good example. Probably there is something missing in the morph.

@TobiasNx
Copy link
Contributor

As I stated here: metafacture/metafacture-core#402 (comment)

type is optional: https://www.loc.gov/standards/marcxml/xml/spy/spy.html#element_record_Link044CBAB8
it can have the following values: https://www.loc.gov/standards/marcxml/xml/spy/spy.html#simpleType_recordTypeType_Link01A148C8

Since it is not mandatory we do not need to do this, but we would need to add this as part of the morph.

@katauber
Copy link
Member

Please re-review after functinal changes in code review @TobiasNx

@TobiasNx
Copy link
Contributor

+1

@TobiasNx TobiasNx removed their assignment Jan 20, 2022
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 a pull request may close this issue.

5 participants