-
Notifications
You must be signed in to change notification settings - Fork 639
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
Idea on how to handle manually editing the docs files while keeping the automated conversion #396
Comments
I agree this sounds simpler to manage than other ideas that have been kicked around, provided the procedure is documented in the contributing section of the web site so we never forget how to manage it. Implementing this procedure would close #283 and allow us to begin working on #284 immediately (and allow us to accept PRs to update API documentation). However, the tag
Changes to JavaDocToMarkdownConverterSince Perhaps the simplest way to enforce this would be to remove git tracking for
By that I hope you mean The "LOCAL", "BASE", and "REMOTE" branches visible side by side as well as a way to quickly scroll to each merge conflict. The scrollbars are linked so you see the same section in each pane when you scroll one of them. There are color coded arrows to quickly inject different blocks/lines of text or for more complicated edits manual editing is also allowed. Beyond Compare Pro also has features that allow ignoring of "unimportant changes" such as whitespace or code comments, which make some changes easier to deal with. In this example, I am merging At the end of the operation of a file, it creates a backup of the merge conflict in a file with a It takes a little getting used to, but it is much quicker to pop in a block of text by clicking a colored arrow or to resolve a conflict by clicking on an exclamation point than going through the blocks in the raw source file that git creates. |
yep! without a lot of work we can very quickly start getting all of the docs and code samples fixed up
yep sure, I'm happy with
yes exactly. I just use GitExtensions so this happens all automatically for me. I use KDiff instead of beyond compare since I like it better and it does all the 3 way merging, auto guessing, whitespace options, etc... (although it looks like it was made in the 80s and never changed)
Yep all of what you said makes sense. The converter code could even be removed entirely from the master branch if we wanted and only live in the conversion branches. I have no experience with what I'm happy to get started on this if we agree with the branch naming? |
I poked around under the hood of This issue can be addressed simply by:
We don't have to use the official NuGet.org feed for this, it can be MyGet, Azure Devops, GitHub, or whatever as long as it is Internet-accessible.
Sure, that's fine. |
I have converted the To install the latest version of the tool in the scripts to a local path, just run the command:
Then run the command:
The parameters are exactly the same as they were before. Then to clean up, run the command:
You might want to put that last line in a finally block to ensure the script is re-runnable in the case of an exception. The GitHub repo is only meant to be temporary until an Apache repo is set up for it. I haven't yet removed the tool from this repo, but I suggest to do so and update the scripts before doing any branching. The changes I made are enough to decouple the docs build scripts from any specific version of the tool, but the |
Well done sir! 🎉 Amazing start, looks like I have some work to start on :) |
@NightOwl888 This is complete now, there is a new branch What needs to happen now is:
There's a bunch of other outstanding docs tasks too that I'll look into. I'll close this one. |
Per @Shazwazza, when I asked him via chat whether it is now safe to update the documents with .NET-specific content:
It sounds like override files are probably better for maintenance. But on the other hand, it sounds like it might be confusing for contributors if they think that modifying the original will modify the API site. We should probably do an experiment with each to try to get a feel for which choice is the right one for given scenarios. |
I think what is easiest is in most cases is to only use override files when namespace documentation doesn't already exist. Namespace documentation will exist for most namespaces in the lucene.net project based on how our markdown converter tool works. This will be consistent with how the "Improve this doc" button works on the documentation. When clicking on that button and namespace documentation exists, it will edit the currently existing file. When namespace documentation doesn't exist already (this is rare), there will be no "Improve this doc" button. In this case we should use override files. As an example of such a namespace, see https://lucenenet.apache.org/docs/4.8.0-beta00009/api/analysis-phonetic/Lucene.Net.Analysis.Phonetic.Language.html There might be some cases where we use override files even if the namespace doc is already there. I think this can occur only if the updated docs are completely different from the originals. |
That was actually not part of Lucene, but part of the commons-codec package from Apache, which was imported to save us from maintaining an external library and porting the parts of it we don't need. There are a couple others, the SAX and TagSoup modules that were imported into Lucene.Net.Benchmarks to parse HTML. AFAIK, we could use HTML Agility Pack instead and dump these classes if someone were willing to analyze this at a higher level to map over the functionality. The only actual Lucene case I can think of where we are missing the document is the migration guide (#399), presumably because it was named Migrate.txt instead of following the other "overview" and "package" naming conventions. Lucene.Net.Codecs was only different because we were trying to release that document before we had the conversion process sorted out. Now that it is, would it make sense to integrate these changes back into the original doc? Are there any other cases you can specifically recall where the documentation doesn't exist in Lucene? If there are no other exceptions and your suggestion is not to use override files on the rest, I am on board with that - it would be fewer files to maintain and less confusing to contributors. |
Decided to create a central discussion about this here instead of all of the ideas getting lost in various threads :)
Here's some found previous notes
The issue is: We have a conversion program that converts the Lucene (java) docs to a doc format that we can use for Lucene.Net. Each time this is run it will overwrite our docs files. This means that any manual updates made to these docs files such as fixing spelling mistakes and more importantly code snippets would just be overwritten.
I have a simple proposal
In various old threads we had some complex proposals but none of these are 'perfect' and won't cater very well for things like spelling mistakes. Instead of inventing some system, we can simply use Git:
docs/converted/4.8.1
and created frommaster
converted
branches are the only branches we ever execute theJavaDocToMarkdownConverter
conversion program.JavaDocToMarkdownConverter
once we create this branch. There will probably be no changes now since we've already executed this in master.converted
branch to the master branchJavaDocToMarkdownConverter
because we've made some fixes to it to fix some conversions, formatting, etc... we re-run this on theconverted
branch, then merge changes to the master branch. This will trigger a bunch of merge conflicts which can be resolved by Git merge.We won't be running this conversion program that often so the amount of merging would be minimal and we'd only have merge conflicts on files that we've changed that have large conflicts with changes we've made in the converter ... which would be quite rare so I don't foresee a lot of work with a Git merge.
Some basic rules to this:
converted
branch from master since this will mean merge conflicts are not triggered and everythig would just be overwritten againconverted
branch will be created from the currentconverted
branch and the conversion is run there for the new lucene version.@NightOwl888 Any thoughts on that?
The text was updated successfully, but these errors were encountered: