Open samarth9008 opened 4 months ago
Hi @samarth9008
Could you please provide access to the Gdoc file mentioned above
@surbhi498 and @mayank922
Seeing the complexity of the task, can you guys pls co-ordinate and work on it together. It might take long for one person to work on it. Consider it as one of the team work testing task.
FYI @DanilYachmenev @gpsaggese @sonaalKant
Hi @samarth9008
Could you please provide access to the Gdoc file mentioned above
Shared.
Hi @samarth9008
I am unable to find dev_scripts/lint_md.sh
. Has the name of this file changed or is there any other way to use linter on md
files?
To run the linter follow this guide
Hi @samarth9008
I did follow the one in the docs for my previous PR but this doc docs/documentation_meta/all.gdocs.how_to_guide.md
mentions it incorrectly.
We could correct this line https://github.com/kaizen-ai/kaizenflow/blob/5ddfaadcdb332e39a8344741add21e32a7bb702d/docs/documentation_meta/all.writing_docs.how_to_guide.md?plain=1#L348
This was the old way of running linter specifically on md files. Lately we merged with our python linter and even md files can be lint using i lint --files ....
.
Feel free to create a PR for it.
Hi @samarth9008
The second task would be done by you right?
Yes
Hi @samarth9008, When we are running the test cases against the fun it gives error due to the interactive mode used in the function in script. We are using an alternative "pytest -s -v" to run the test cases locally. Is there any other alternative for this that would not give error while we create a PR for the same.
Instead of testing the script, can we only tests the function used in the function.
Do you mean that we just test the rest of the functionalities of this fun and don't test the docker command which uses the interactive mode?
docker_cmd = f"docker run --rm --user $(id -u):$(id -g) -it --workdir {work_dir} --mount {mount} {docker_container_name} {convert_docx_to_markdown_cmd}"
Hi @samarth9008
How do you want us to test the _move_media( ) function?
We can write a test case where if there is No media directory found
, it doesn't give any output just logs it.
To test for a directory that exists do you want us to create a test directory?
For now lets do one thing
Try to find tests cases similar to this case. Test case about scripts and see how they are tested.
Try to look around the code to understand how temp dir can be created. Looking through other code can give more idea. If function seems complex or have no idea how to move forward, lets leave a TODO and we will address it separately in a different issue.
I think we can leave a TODO for _convert_docx_to_markdown function.
We will try again working on _move_media( )
function and start working on _clean_up_artifacts function
I have raised PR for the Script. The Link is given as below https://github.com/kaizen-ai/kaizenflow/pull/1092#issue-2424171114
Hi @samarth9008, I have raised PR for the script enhancement Link is enclosed here with PR_For_Script_Enhancement
The doc for the flow is here
docs/documentation_meta/all.gdocs.how_to_guide.md
The script is here
dev_scripts/documentation/convert_docx_to_markdown.py
[x] Convert a Gdoc file into a markdown - https://docs.google.com/document/d/1vg2IipQ4csA18hv041uRjxyF_vcdHrWuhpejf2zhaUs/edit
[ ] Merge it and remove the Gdoc
[x] Add unit tests for the script -
[x] Extend the script to handle a few corner cases
I would focus on one thing at a time. Start with something easy and have multiple PRs to achieve the goal to ease up the review
FYI @gpsaggese @sonaalKant