-
Notifications
You must be signed in to change notification settings - Fork 3
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
PLATEAU Document 02 work #101
Conversation
First question: this document starts with section 0. Should I remove the numbers, and if yes, then how to handle that section 0? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 96.67% 98.34% +1.66%
==========================================
Files 42 46 +4
Lines 1054 1327 +273
==========================================
+ Hits 1019 1305 +286
+ Misses 35 22 -13 ☔ View full report in Codecov by Sentry. |
I have decided to set section 0's style to "abstract". Then we have a number of annexes. Those are lettered. It would make sense to set them as "appendix", but then: when "改訂履歴" # Document history is also appendix. |
So, I handled annexes as appendices. But document history is also an appendix for now. |
This is ready. I can find no more issues that can be fixed automatically. I am including the document 02 below: |
hello @hmdne thank you for starting work on document two. the issues about "strange tables" may either be mistakes or just editorial changes to the document to help mitigate page breaks, etc. they could be restyled manually to make them more normal, then the conversion tool would handle them, and metanorma would compensate for things like page breaks. what would you like me to do to help with this? |
@ReesePlews The problem in general is much more complicated unfortunately. There are different semantics in HTML and AsciiDoc, for instance, in AsciiDoc you should define a number of columns up front (in some cases it's mandatory, in some not?). Then there are colspans and rowspans - if only they were applied correctly, we wouldn't have an issue, but the document often has tables with colspans and rowspans that escape the table boundary. After all, it's not a real error in HTML - the table renders correctly, but in AsciiDoc we basically have no delimiter for rows like in HTML (at least if the number of columns is specified) and it's more strict from what I experienced. Either way, I have fixed those issues and both 01 and 02 documents do handle all tables correctly. So in some cases we just adjust the colspans/rowspans, in some we add empty cells that are missing in a row. You can take a look at the test [1], for the cases that I have covered, though I'm sure there will be more problems in the future. In case of document 02, there was one table which I had to add cells in front of, not at the end of the row. Anyway, to be clear, the document is now rendered correctly, mostly, with the issues I have mentioned above. |
@hmdne perhaps we should add this to the mn-samples-plateau repo, so we can work with that more easily? |
@ReesePlews I have created a PR to this repository, feel free to merge. |
@hmdne thank you for the explanation. if i am understanding correctly there were some cases in the HTML for both doc1 and doc2 that had to be corrected manually, is that correct? and those manual corrections you made are in the html files currently found in reference-docs folder in the repo? if so, should we change the name so we know they are modified? |
No. I made no corrections by hand. I added a verbatim output from reverse_adoc and marked some places (in the first post) where I found hand corrections will be needed. Anyway, while the tables were quite hard to do, this I was able to solve with algorithms. The bigger problem are lists (and indentation). In the incoming document, they tend to be... without any apparent order. Those are made using one or more of:
I was able to just handle the CSS styles, which is why sometimes there are fragments like:
|
To be clear, I used this document as input, also verbatim: (The second HTML) |
In AsciiDoc though, not in HTML. |
@hmdne thank you for the information. many things are new to me about this conversion process, so there is some confusion. for both docs 1 and 2 once a converted set of asciidoc files have been produced, i dont think we will be using the original html anymore, as the metanorma tool chain would be generating all of the doc types (html, doc, pdf). of course we want the converter to handle as much as possible but when the input html data is so messed up, there is only so much it can do. if i am understanding correctly, the manual revisions you have made now (in the original html for both documents) and is enough to get highly usable asciidoc bases ready for further work. please do the merge to the main branch. i am still somewhat hesitant about doing that, especially when so much manual work has been done i dont want to cause a problem. thank you |
@ReesePlews As I said before, no manual modifications have been done to the original HTML document (nor to AsciiDoc). All modifications are done automatically, on the HTML document during the conversion process. If you use reverse_adoc (current branch) on the input document, you will have exactly the same AsciiDoc output as I have committed to the -samples repo. Do you want me to merge this PR, or metanorma/mn-samples-plateau#23 ? |
@hmdne thank you for clarifying and updating the conversion tool to handle more unique import cases. yes, please the PR so that doc2 will appear in the sources directory. later today i will try and run the converter on doc2 using the instructions from our work with doc1. thank you again for making these updates to the conversion tool. |
@hmdne a question... i have tried to modify my .gitignore file so that my working tests do not get pushed to the main repo. however github desktop is asking me to submit these to "main" should i do that, for the following two files? |
Gemfile surely shouldn't be gitignored in upstream code. Also, instead of using .gitignore, you may use a local exclude: .git/info/exclude It has the same syntax as .gitignore, but is local to your repository. It works alongside .gitignore. |
thank you @hmdne i will remove that line from gitignore and read about "exclude" |
hello @hmdne what should i do with the edit to my Gemfile? should i commit back to the server or stash that? |
@ReesePlews IIRC you just uncommented "sassc". It should be safe to commit. |
as suggested by hmdne i will commit this change metanorma/coradoc#101 (comment)
hello @hmdne i committed the Gemfile but it stopped with that same --no-no-install-fonts error can you check that when you have time. thank you. |
@ReesePlews I will update the workflow. It's a separate issue. |
@ReesePlews the fixes are here: metanorma/mn-samples-plateau#24 |
thanks @ronaldtse, does each repo need to be updated? |
@ReesePlews yes. FYI @CAMOBAP the impact of not updating v1 is real. |
@ronaldtse I understand, but I will still try to defend the approach to not do it. GitHub Actions delivery is not much different from delivering other software, we have to update major on breaking changes, this is what happens with If we decide to update v1 instead of moving to the next one, why do we use versioning for actions at all? Versioning is not always about comfort but about consistency too. We have some abandoned flavors that are working with old version of metanorma, v1 update will break them If one day metanorma will introduce breaking changes i suppose we will not update previous one, so why should we do this way with GHA? |
I don’t disagree with the principles you stated but I have two comments.
From the users’ perspective, doing an upgrade on an action step, when they have no idea what has even changed (and clearly they won’t care about the difference in no-install or no-no-install), is just an annoyance and leaves a bad taste. In any case, we cannot have an action version that fails by default. |
And this is probably the moment we think about allowing users to choose Metanorma versions in the action! |
Good point, let me implement the fix that will handle flags based on a version of metanorma
Users already have control over this, by choosing the version in:
|
Tasks that need to be done for the document 02 to be parsed (it will grow over time):
Breaking:
Semantic:
Minor bugs:
Manual fixes needed:
\
cc: @ronaldtse @ReesePlews
Metanorma PR checklist