Skip to content

Conversation

@xenova
Copy link
Collaborator

@xenova xenova commented Apr 8, 2023

Making a draft PR for comments and suggestions!

@kungfooman
Copy link
Contributor

Currently the output looks like:

image

I dislike the dot syntax in the so called "type application": Promise.<Array.<unknown>>

Should we just remove the dots (they are applied in both jsdoc and catharsis package)?

And then about the output... right now it's just one big file, does it need to be many smaller files? I couldn't find an option for that, probably that would require some API scripting.

@xenova
Copy link
Collaborator Author

xenova commented Apr 8, 2023

I dislike the dot syntax in the so called "type application": Promise.<Array.>
Should we just remove the dots (they are applied in both jsdoc and catharsis package)?

Agreed. Not too sure why they do that. Apparently it's an older syntax. That sounds like the easiest solution, yeah.

And then about the output... right now it's just one big file, does it need to be many smaller files? I couldn't find an option for that, probably that would require some API scripting.

I was looking at this yesterday, and I also couldn't find a way to do it from the CLI. Do you think we should do it on a file basis or a class basis? I'm trying to make it similar to huggingface.js' docs, which splits each class into a separate file.

This looks like it could work: https://github.com/jsdoc2md/jsdoc-to-markdown/wiki/How-to-create-one-output-file-per-class ?

@kungfooman
Copy link
Contributor

Do you think we should do it on a file basis or a class basis? I'm trying to make it similar to huggingface.js' docs, which splits each class into a separate file.

Hm, many projects already assume that one file = one class, but I guess you want to keep them all in one huge file?

Per-class-separation sounds better to me too.

Also worked out the PR that at least catharsis is not adding its strange syntax: xenova/catharsis#1

@xenova
Copy link
Collaborator Author

xenova commented Apr 8, 2023

but I guess you want to keep them all in one huge file?

For the most part, I'd actually prefer it to be separated... especially for the really large files. What about something like this:

docs/

  • index.md
  • _toctree.yml
  • file1.js/
    • classes/
      • class1.md
      • class2.md
      • ///
    • functions/
      • ...
  • file2.js/
  • ...

Not too sure if "functions"/"classes" are the way to break it up more though.

@takoyaro
Copy link

takoyaro commented Apr 8, 2023

For the most part, I'd actually prefer it to be separated... especially for the really large files. What about something like this:

docs/

  • index.md
  • _toctree.yml
  • file1.js/
    • classes/
      • class1.md
      • class2.md
      • ///
    • functions/
      • ...
  • file2.js/
  • ...

Not too sure if "functions"/"classes" are the way to break it up more though.

I personally prefer that approach as well. Keeping this library's docs consistent with the HF docs will be better for the Dev experience overall.

xenova added 28 commits May 13, 2023 19:59
Will switch back to main doc-builder after some issues are resolved
Will remove after merged
This means the script must be run from the project's root folder
GitHub actions places files in a folder called `__w`, which causes JSDoc to ignore all source files.

See jsdoc2md/jsdoc-to-markdown#137
Also adds support for:
1. `Prepend` normalizer
2. Chained decoding
3. Byte fallback
Also add unit test for decoding with and without special tokens
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 15, 2023

The documentation is not available anymore as the PR was closed or merged.

@xenova xenova merged commit 07f6733 into main May 15, 2023
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.

5 participants