-
Notifications
You must be signed in to change notification settings - Fork 7
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
Further development, end of 2022 ("phase one") #522
Comments
@kalaspuffar I added two items under "Finalize and release an official version (without Pipeline 2)". We have touched on this on e-mail earlier, but it wasn't described here. We haven't finalized and released an official version until we have documentation and a tagged version on docker hub. I hope this is ok. |
Hi @josteinaj Well, it's fine if MTM and NLB want to Document and Verify the process before we see this issue resolved. Just tell me if we at Textalk are expected to do anything more with this issue. Best regards |
The API is the same as for https://github.com/mtmse/talking-book-validator/, right? Is there any documentation for that one? @martinpub @karladamt @oscarlcarlsson what do you think about documentation? Also, could you test the latest version, and see that it works for you as a replacement for your talking-book-validator? It's available as the docker image |
Hi @josteinaj The current documentation we use today is the This file explains the API in an OpenAPI format that you could generate a live document/viewer and that could be used for testing and verification as well. But it should also be read as a simple file. For more information about the format you could read up on https://www.openapis.org/ Best regards |
Yes, I imported the yaml earlier into Postman to test the API and it works great 👍. We should probably link to that file in the description on gh-pages. And I think we also need a short example of how to use the validator. Something along the lines of:
|
Hi @josteinaj That might be the way to validate that the docker image works. Something along the line of: Update your
To validate the docker image usage run:
Then look at the JSON file for a response. On the other hand, if you want to run the validation locally, then it would be much easier just to download a prebuilt jar file from us and run:
or something similar. The only thing you need to install yourself then would be ACE, which is documented already on the daisy homepage. Best regards |
Hi @josteinaj Forgot to mention. ACE is not a requirement for the application, just for 2020-1 rules. So if you run it without, you'll get a prompt to install ACE for correct 2020-1 validation. But the application will still give you a report without that section. Best regards |
Hi.
|
@oscarlcarlsson have you had time for more testing? Is the current version good enough for use in production at MTM? |
@josteinaj I got access to the web interface of webarch's validator last week. |
Sounds great! Does that mean that it is only the documentation that is missing for phase one? |
Not quite. I have found some old issues that are back in the current version due to using the NLB-version as the master file. I am running some files in the validator at the moment and repporting them in the Trello. I am looking for the errors on github to link them here as well. the current errors i am experiencing are: and: Neither error is flagged in the MTM-fork of the validator. |
When it comes to the backlink issue, that is something we resolved "recently". We have had an open PR for months that was approved a couple of weeks ago. |
Created an PR for the HR in sidebar issue. |
PR #521 is now deployed on Webarch Validator service. |
Great! I have done a test-run on a title and it validated this time. |
Do you need any specific input for #478 @kalaspuffar ? |
No, not really, just pointed out when we added the restriction you now get a warning for. |
I've run into the issue reported in #532 on some files that I've run through the validator today. |
When it comes to #478 the validator is correct but what you want with your EPUB is another question in general.
Then you have the reference:
As you need to have a back reference to all references to the note, you are missing 2 links. In this case, they are in the same paragraph, so that you will jump to the same spot. But that is no assurance; in most cases, this would not be the case and will confuse the reader. Fredrik and I have talked about this, and maybe a meeting of the specification council would be suitable for the beginning of 2023. Having only one backlink seems unreasonable for some material, and having multiple is confusing. This seems like a solution for a reading system issue, not a specification issue. Best regards |
I just noticed that @oscarlcarlsson had some issues with 2015-1 EPUBs here: #515, so we should verify that 2015-1 still works before making the release. |
From meeting between Textalk, MTM and NLB on 22. June:
|
Hi @kalaspuffar! I just wanted to check where we are on this one. Is it being worked on? |
bump @kalaspuffar |
Hi @josteinaj No, I understood from our last meeting that I should prepare the docker image for release. That PR is merged. And send an email with documentation information to you and that is also done. I hope that I've not missed or misunderstood any my responsibilities. Currently I'm not doing anything more for this release. Best regards |
Hi Daniel! I can't remember having received the documentation, could you resend it to me so that I can have another look? It should be in a form that fits into this page: And since it's a new API, we can't just point to the Pipeline 2 API documentation. We need to provide API documentation on that page (or a separate page) as well, along with examples of how to run jobs. |
Hi @josteinaj I am sending the same information I sent in the last mail here as it might not arrive, and here we have documentation of what has been discussed. When it comes to documentation, the SwaggerAPI / OpenAPI documentation can be viewed either by downloading the editor or going to https://editor.swagger.io/ You could either download the file and upload it to the editor or import the URL directly. Building the docker image should not be more complicated than building any other image:
And running it only requires exposing the web server port to access the API.
If there is anything else you need for the documentation then don't hesitate to reach out. Best regards |
Hi Daniel! Right, I found the e-mail now. It was right before summer vacation and I see I've forgot to reply to it. Sorry. We need some documentation of the usage in addition to the yaml. Could you write the commands with some comments on how to use it? Say I have an EPUB, how do I post it to the API (with curl or wget example), how do I check the status of the job (if it's asynchronous), and how can I get the results? For basic usage, I don't think we should require users to open swagger or similar. |
Hi @josteinaj The swagger documentation is following the standard and can be used to produce pretty much what you want. Open it in the editor and export it as an zip file with html documents or print it as a PDF depending on what you want to present. But the best representation is the live view where you can try the API out. Best regards |
Hi @josteinaj Seems they had removed the print utility, so I've found another site that could generate PDF output for those that don't want the interactive GUI. Best regards |
Hi Daniel. Thank you. Could you also write a step-by-step example of how to validate an EPUB from the command line? Using either curl or wget. This is so that the somewhat-technical users, that are not developers, can use the validator without too much trouble. Regards |
Hi @josteinaj Well docker images with a restish API aren't for command line but I guess the easiest is to run
If you know how to run curl you probably can build a jar package. If you require something for none developers we need a WebUI in the image for uploading. But that is not in the current scope of the project Otherwise I could record a video on how to run it from Postman. Also not in the current scope of the project. Best regards |
POST /v1/Validation/ I remember we discussed an option that didn't require OneDrive? The default should not be OneDrive. OneDrive is a MTM/Webarch-specific feature. Could it also be possible to POST an EPUB directly to the API? That would make the API easier to use in many cases. It was possible when we used the Pipeline 2 API. |
Hi @josteinaj The PDF is a bit harder to read, but there are two options for the same API endpoint. So the /v1/Validation can have either a JSON body or a form-data post.
As I said earlier, I could create a video for Postman, a webpage for uploads, or a small client API. But I never done a multipart upload via curl, but if it works, I guess it would look something like this:
Best regards |
Thanks! It seems to work to validate like that 👍. So first I start the container in one terminal like this: docker run --publish 8080:80 nlbdev/nordic-epub3-dtbook-migrator And then in another terminal, I navigate to the sample EPUB in src/test/resources/2020-1 and run: curl -s -F config='{"noEPUBCheck":false,"noACE":false,"schema":"2020-1"}' -F file=@X60352A.epub http://localhost:8080/v1/Validation The response I get is this: {
"uploadFilePath": "X60352A.epub",
"datetime": "2023-09-08 12:50:02",
"book": "Om det nord-tschudiska språket",
"schema": "2020-1",
"report": {
"issue-count": 0,
"filename": "X60352A.epub",
"schema-info": {
"opf_and_html": {
"filename": "nordic2020-1.opf-and-html.xsl",
"description": "Cross-document references and metadata",
"document-type": "Nordic EPUB3 OPF+HTML"
},
"ace": {
"filename": "",
"description": "Validating with ACE 1.2.7",
"document-type": "DAISY Accessibility Checker for EPUB"
},
"opf": {
"filename": "nordic2020-1.opf.xsl",
"description": "",
"document-type": "Nordic EPUB3 Package Document"
},
"content_files_schema": {
"filename": "nordic2020-1.xsl",
"description": "",
"document-type": "Nordic HTML (EPUB3 Content Document)"
},
"epub": {
"filename": "",
"description": "General EPUB requirements",
"document-type": "Nordic EPUB3"
},
"nav_ncx": {
"filename": "nordic2020-1.nav-ncx.xsl",
"description": "",
"document-type": "Nordic EPUB3 NCX and Navigation Document"
},
"nav_references": {
"filename": "nordic2020-1.nav-references.xsl",
"description": "References from the navigation document to the content documents",
"document-type": "Nordic EPUB3 Navigation Document References"
},
"epubcheck": {
"filename": "",
"description": "Validating with EPUBCheck 5.0.0",
"document-type": "EPUBCheck EPUB3"
},
"xhtml": {
"filename": "nordic-html5.rng",
"description": "",
"document-type": ""
}
},
"created": "2023-09-08 14:50:07",
"guideline": "Nordic EPUB Guideline 2020-1",
"issues": [],
"status": "SUCCESS"
}
} It says "SUCCESS", but the docker container logs an exception, is it anything to worry about?
Postman-video, webpage for uploads and client API:
I've added documentation to the homepage now, with both how to use it as a command line interface, and using the REST API (using curl as an example): Do you think it looks ok? |
Hi @josteinaj It looks ok, but I think you have a small typo in the first command Best regards |
|
~ ❯ docker run --rm -it nlbdev/nordic-epub3-dtbook-migrator bash
root@dbe2d2b76506:/var/www/html# ace
[0920/151038.747077:FATAL:electron_main_delegate.cc(294)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/local/lib/nodejs/node-v16.18.0-linux-x64/lib/node_modules/@daisy/ace/node_modules/electron/dist/electron exited with signal SIGTRAP
root@dbe2d2b76506:/var/www/html# ace --no-sandbox
[30:0920/151043.903579:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[30:0920/151044.180912:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[30:0920/151044.180923:ERROR:env.cc(255)] The platform failed to initialize. Exiting.
The futex facility returned an unexpected error code.
/usr/local/lib/nodejs/node-v16.18.0-linux-x64/lib/node_modules/@daisy/ace/node_modules/electron/dist/electron exited with signal SIGABRT @kalaspuffar how do I validate with ace? |
Hi @josteinaj I'm not sure what is going wrong there. But this Docker image has been tested, and we have gotten Ace results. Perhaps the ace engine has been updated since last we tested ? Looking at the class for Ace in the client, there are no special flags.
Best regards |
It seems that the latest working version of |
@kalaspuffar I tagged a |
Hi @josteinaj I've searched on DockerHub, and I can't see it at all. If I search for "nordic-epub3" I can find a sbsdev released 3 years back but not your version. I tried to log in as well but could not find it either. Is it a private repository? Best regards |
Hi @josteinaj We have also looked into the Ace repository, and version 1.2.8 should work just fine. But as of version 1.3.0 they have deprecated Puppeteer as a main driver for the Axe plugin validation. Puppeteer is a tool to run Chrome in a headless mode and is good if you want to run it in a docker container, for instance. I don't know if Chrome has also deprecated Puppeteer, and that could be the leading factor in this change. But Ace is now using a pure Electron implementation to create nodejs interfaces by starting a slimmed-down version of Chrome on your desktop. Because it will open a window, it will not work inside a docker container without a graphical interface. Best regards |
Hi @kalaspuffar! We recently went through and made stuff private, and this must've been made private by mistake. Could you try again now? Now it should be public. |
Hi @josteinaj It seems to work just fine now that I have access. Best regards |
Great! Thanks for testing. Then we have made a release! 🎉 |
@AndersEkl @martinpub will you communicate the release in the guidelines group and other relevant people and organizations? |
Thanks @josteinaj for the heads up. I will be out of office for the coming month, but I leave this to @oscarlcarlsson and @AndersEkl. Are there release notes published for 2.0.0? |
There are no release notes other than the description on the website: https://nlbdev.github.io/nordic-epub3-dtbook-migrator/ |
The text was updated successfully, but these errors were encountered: