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

feat: create a script to detect missing functions #846

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Odonno
Copy link
Contributor

@Odonno Odonno commented Sep 14, 2024

Create a script to detect missing functions in the documentation.

  • Read the list of functions from the source code of the surrealdb repository...
  • ...and the currently documented functions in this repository
  • Check and output the differences

Current output:

image

Note that it can also detect documented functions that no longer exist.

TODO list:

Copy link

netlify bot commented Sep 14, 2024

👷 Deploy request for surrealdb-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3d45fca

@Dhghomon
Copy link
Contributor

This is pretty helpful! Just about done a PR that adds many of them. They are mostly of this type:

  • Already documented: crypto::blake3 and math::pow (looks like a false positive)
  • Path exists but not implemented: all the string:: functions except smithwaterman, mahalanobis, spearman.
  • Aliases: record::table(), string::similarity::smithwaterman() (same code as ::fuzzy), array::every, array::includes, array::index_of, array::some. Going to skip them on this PR I think as we should probably think of a good way to display all the aliases in a unified way first.
  • type::geometry(): this is a funny one as it only takes an input that is already a geometry. I'm thinking holding off on this one until it becomes more useful (like taking an object).

The rest of them I added. Shout out to search::analyze() which is exactly the function I wanted! I had no idea it was already there.

@Dhghomon Dhghomon mentioned this pull request Sep 16, 2024
@Odonno Odonno force-pushed the feat/script-missing-functions branch from 293bf92 to 41c293c Compare September 16, 2024 17:44
@Odonno
Copy link
Contributor Author

Odonno commented Sep 16, 2024

Yes, small mistakes for math::pow and crypto::blake3.

I suppose I need to exclude "not yet implemented functions" but I want that to be easily editable. What do you think of an arg (env variable) directly in the yml file of the GitHub Action @Dhghomon ?

The currently remaining functions:

image

@Odonno Odonno force-pushed the feat/script-missing-functions branch from c7dce08 to 1e78232 Compare September 16, 2024 18:47
@Odonno Odonno force-pushed the feat/script-missing-functions branch from 1e78232 to 3d45fca Compare September 16, 2024 18:50
@Odonno
Copy link
Contributor Author

Odonno commented Sep 16, 2024

Done. Only aliases remains and the new function geo::is::valid. See:

image

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.

Documentation: Missing functions in documentation page for type function module
2 participants