-
Notifications
You must be signed in to change notification settings - Fork 235
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
Create workflow converting markdown-based changlog to lua-based changelog #6444
Conversation
Hi @Zjonn, this looks exciting! I'll make some time next weekend to review it. Would you like me to incorporate it further into the workflow, or would you like to try and do that yourself? |
Hi @Garanas |
Please set it to ready for review once you are done with your changes |
7db1f24
to
f2b33fa
Compare
f2b33fa
to
6ee8db9
Compare
I added a workflow that can be run manually or through another workflow. In short:
|
That looks like a great start! I've looked at a few files and so far it looks good. I'll come with a more in-depth review in a few days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it looks good and the output is as promised!
A general suggestion:
- (1) Generated files should be marked as generated. Please add a header block of comments stating that the lua changelog files are generated. Preferably with a reference to the source file and the logic responsible for generating it.
And two functional requests:
-
(1) The changelog files will be loaded as regular modules, via either the
import
statement or thedoscript
statement. For this the table inside the file needs to be named. Can you add aChangelog = {...}
in front of each table? -
(2) It would good if the integrity of the generated lua files are checked automatically. In a separate job you can install Lua, retrieve the artifact and check that all files can be interpret. The step should fail if one (or more) files can not be interpret. Make sure to use the needs field to tell the interpreter about the dependency between the jobs.
The last job is especially relevant since maintainers come and go. Not everyone may be aware of the details of this workflow file. And by testing the output automatically we can catch 'simple' issues long before it would reach any staging or production area.
For future reference, this was the output the review was made with:
It took a bit longer to review this than anticipated, life got in between 😃 .
Thanks for the review @Garanas. I like the idea of adding information that the file was generated automatically and how
Sure, no problem
Thanks for the tip |
f45a473
to
1ab6b1e
Compare
b555bc9
to
ca0cd98
Compare
ca0cd98
to
00aeaea
Compare
I think I have made all the changes we have discussed. You can find newest workflow results here. Validation job reuses already existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work 👍
As an extension to your work here: #6472 , with that we have everything we need to start updating the Lua of the game. We'll save several megabytes of memory all together and we'll have consistent changelogs 😃 ! |
@Zjonn I forgot - the contributions have no license at the top of the file. Would it be fine to license the contributions of this pull request with the MIT license? |
Resolves #6237 and #6238
Please take a look @Garanas
Description
Following PR is introducing python script converting Markdown files to Lua.
Markdown files are formatted before conversion to Lua file using mdformat (it's python alternative to prettier).
Why I chose python? There are several reasons:
Additionaly I wrote
setup_python_env.sh
script for users not familiar with python, it can create python virtual enviorement for them, install required packages and source it.Testing done on the proposed changes
Tested manually in local environment
Checklist