Skip to content
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 a search based document for write-the #20

Closed
wants to merge 28 commits into from

Conversation

James4Ever0
Copy link

This document is generated using: https://github.com/james4ever0/prometheous

You can view the website at: https://james4ever0.github.io/write-the/

@Wytamma
Copy link
Owner

Wytamma commented Jan 9, 2024

Hi @James4Ever0, thanks for the PR! Can you explain what it is? 😅 it looks like you can search the code but that's already available through the mkdocs website e.g.
image

@James4Ever0
Copy link
Author

James4Ever0 commented Jan 9, 2024

Hi @James4Ever0, thanks for the PR! Can you explain what it is? 😅 it looks like you can search the code but that's already available through the mkdocs website.

Here is a brief intro about this tool. The main development is at prometheous.

I want to explain that this tool is language agnostic. It does not analyze the code AST nor split it by functions. Instead it splits the code into chunks. I have already finished the chunk comment, summation and search functionality.

Your AST part is good, but it shall be optional (for files like txt, toml), with fallback (grammar errors, new syntax). It shall be built by chunk processing as well (say if you have a large function, you need to split it into chunks. Or you have some code outside of functions you should process as well, like code under if __name__ == "__main__":).

I am currently working on file hierarchy functionality so people can see summaries of folders and files in a clear structure.

The best part is it works for anything. All you need to do is to create .fdignore files to mark out files you do not want to document like LICENSE, PNG files etc. Even better this tool will help you identify some bad practice like data in code (would like to identify code duplication though) and help you refactor your code. You can visualize the ignored files by using vignore. You would see progress while running this tool, see what is going on with LLM and it is pretty fast.

I have used your tool and created this tool. I did use some code from you and improved it (visualize progress token by token, allowing special token within query). The reason behind is that when processing a function or class with hundreds of lines your tool would get stuck, and I did not see progress behind the scene. Later I recognized that your tool is not language agnostic nor providing fine-grained control over files to document.

Additionally, it has a file path and hash based cache system so rebuilding documentation will only happen around changed files and folders. If only it can just process the changed part instead of the whole file again!

The ideas behind are generative search, active search and hierarchical search, maybe selective search as well. All for better information retrieval.

@Wytamma
Copy link
Owner

Wytamma commented Jan 9, 2024

Sounds like a great project @James4Ever0! I’m glad you found the write-the code useful. The file hierarchy feature seems really cool 😎

I will create issues for the bugs that you’ve listed and hopefully can get them resolved soon.

Do you have a way to integrate your documentation index with the current mkdocs website?

@Wytamma
Copy link
Owner

Wytamma commented Jan 10, 2024

Looks like you're still adding updates to this PR so I'm going to convert it to a WIP.

@Wytamma Wytamma marked this pull request as draft January 10, 2024 01:14
@James4Ever0
Copy link
Author

Do you have a way to integrate your documentation index with the current mkdocs website?

I was adjusting my webpage layout. Using existing documentation framework would be nice.

@Wytamma
Copy link
Owner

Wytamma commented Mar 15, 2024

Let me know if you figure out the mkdocs integration!

@Wytamma Wytamma closed this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants