-
Notifications
You must be signed in to change notification settings - Fork 33
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
[MAINTENANCE] Serve Contributor Guide from Local File #323
[MAINTENANCE] Serve Contributor Guide from Local File #323
Conversation
…code repository, and update README instructions.
…code repository, and update README instructions.
code_doc_autogen.py
Outdated
new_local_file_path: str = wget.download(url, out=local_path) | ||
print(f'\nCONTRIBUTING.md downloaded and saved to: "{new_local_file_path}".') | ||
except Exception as e: | ||
print(f'Failed to download "CONTRIBUTING.md" file. Error: {e}') |
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.
this is a print, wonder if it's better to print or tu return an actual error
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.
@w4nderlust This is a very good point. I changed it such that it both prints the cause of the exception, includes the trace, and re-raises the exception such that it is fatal (script execution must not continue). Thank you.
6a7d2f0
to
02abb5d
Compare
32029c0
to
f0cb738
Compare
docs/developer_guide/contributing.md
Outdated
projects it made possible, shout out on Twitter every time it has helped you, or simply star the | ||
repo to say "thank you". | ||
|
||
Check out the official [ludwig docs](https://ludwig-ai.github.io/ludwig-docs/) to get oriented |
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.
nit: Could we please capitalize Ludwig in "ludwig docs"?
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.
@Infernaught I cannot believe I missed that one. Fixing immediately -- this would have to be in the Ludwig-code repo. But I will update it here for now as well (custom). Once the next Ludwig-code lands, it will be automatic by running the code_doc_autogen.py
script. Thanks.vi
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.
LGTM! Nice change,
documentation are immensely valuable contributions as well. | ||
|
||
It also helps us if you spread the word: reference the library from blog posts on the awesome | ||
projects it made possible, shout out on Twitter every time it has helped you, or simply star the |
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.
I'm not sure what "reference the library from blog posts" means here. Is there a way to make this clearer? Something like, "Post about all of the awesome projects Ludwig has made possible".
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.
@Infernaught This would have to be fixed in the Ludwig-code repository.
deecb67
to
373ca7b
Compare
@@ -558,3 +598,4 @@ def generate_render_functions(_methods): | |||
f.write(mkdown) | |||
|
|||
# shutil.copyfile('../CONTRIBUTING.md', 'os.path.join(OUTPUT_DIR, 'contributing.md')) | |||
download_contributor_guide() # Sync from source in Ludwig code repository. |
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.
Perhaps we can consider rename the binary to generate_docs_auto_artifacts.py
or regenerate_docs_artifacts.py
as the scope of the script has expanded to not only parse docstrings, but syncrhronize standalone files from Ludwig github repo.
Also, would you be able to add a docstring at the top of this file describing what this script does?
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.
@justinxzhao Renaming the script would be out of scope as I only added a specific function, but I will try to describe it using a comment. Thanks.
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.
Ok! Thanks for adding the comment.
04e75f1
to
e8371ce
Compare
for more information, see https://pre-commit.ci
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.
As long as the appropriate changes get propagated correctly from the code repo, this LGTM! Thanks, Alex!
@@ -558,3 +598,4 @@ def generate_render_functions(_methods): | |||
f.write(mkdown) | |||
|
|||
# shutil.copyfile('../CONTRIBUTING.md', 'os.path.join(OUTPUT_DIR, 'contributing.md')) | |||
download_contributor_guide() # Sync from source in Ludwig code repository. |
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.
Ok! Thanks for adding the comment.
Scope
https://github.com/ludwig-ai/ludwig
) to display theCONTRIBUTING.md
guide (in a separate tab), the present approach is to download this file into the local documentation directory in the Ludwig documentation repository and then source it from this local file as before.code_doc_autogen.py
was modified in order to download the source contributor guide (usingwget
).README.md
was modified to provide the instructions to executepython code_doc_autogen.py
and commit the changes, if the source contributor guide was modified and synchronized.