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

Build docs for Python / TypeScript #2992

Closed
wants to merge 29 commits into from

Conversation

eifrah-aws
Copy link
Contributor

With this PR, I have introduced a documentation based on GitHub pages using mkdocs framework.
We use different tool to extract the docs written in the code and convert them into markdown which is then displayed in the "mkdocs".

For TypeScript, I have used the popular tool typedoc. The docs can be generated using:

npm run docs

For python, mkdocs comes with a plugin mkdocsstring which has a built-in handler for python - so no extra work is needed.

To build the docs locally, you can run:

docs/build-docs.sh [serve]

If serve is passed, then the docs are can be access on a local webserver running on http://127.0.0.1:8000.

If serve is not passed, then the docs are only converted into markdown language and are placed under: docs/markdown folder. The script builds the docs for both TypeScript & Python.

To see the current docs you can visit a local deployment I created here:
https://eifrah-aws.github.io/glide-for-redis/

@eifrah-aws eifrah-aws requested a review from a team as a code owner January 22, 2025 11:01
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You need to add an entry point (landing page) to client's docs. If it is not generated automatically, you can make it manually, it won't change.
  2. You need to add TOC (table of content) or navigation for client docs:
    (probably need extra config for doc gen or use extra tool)
    1. Navigation over classes
    2. Inside class
  3. Need to update developer docs with instruction how to run doc gen
  4. Python client docs are empty
  5. Node client docs require grooming (config tuning or more tooling)

In the current state "docs" are just list of APIs, they don't describe how to start with GLIDE, what to do and so on.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong and file renderred incorrectly, please fix


function build_docs() {
# NodeJS
(cd ${BASE_DIR}/node && npm run docs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need npm i there I think

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Comment on lines +80 to +90
extra_css:
- style.css
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need empty css?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we store this file in another place?
I assume a user navigates into docs dir and all files there should be for the user's reading.


### append()

> **append**(`key`, `value`): `Promise`\<`number`\>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that line (and all similar ones) should be in a code block for readability.
Something like

Suggested change
> **append**(`key`, `value`): `Promise`\<`number`\>
> `append(key, value): Promise<number>`

| ------ | ------ | ------ | ------ |
| <a id="defaultdecoder"></a> `defaultDecoder` | `protected` | [`Decoder`](../enumerations/Decoder.md) | `Decoder.String` |
| <a id="isclosed"></a> `isClosed` | `protected` | `boolean` | `false` |
| <a id="promisecallbackfunctions"></a> `promiseCallbackFunctions` | `readonly` | \[`PromiseFunction`, `ErrorFunction`, `undefined` \| [`Decoder`](../enumerations/Decoder.md)\][] \| \[`PromiseFunction`, `ErrorFunction`\][] | `[]` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here (3rd column)


#### Returns

`Promise`\<`number`\>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty file? why?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, all others are empty too

@Yury-Fridlyand Yury-Fridlyand added the docs Documentation label Jan 22, 2025

Refer to the [Supported Engine Versions table](https://github.com/valkey-io/valkey-glide/blob/main/README.md#supported-engine-versions) for details.

# Getting Started - Python Wrapper
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be here in the main page

edlng and others added 24 commits January 23, 2025 13:34
* Go: XDel command added

Signed-off-by: Prateek Kumar <[email protected]>
* Go: Zcount command

Signed-off-by: Prateek Kumar <[email protected]>
* Go: `XREAD`.

Signed-off-by: Yury-Fridlyand <[email protected]>
* Go: ZScore command added

Signed-off-by: Prateek Kumar <[email protected]>
* Go: Add command ZScan

Signed-off-by: TJ Zhang <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
Co-authored-by: Adar Ovadia <[email protected]>
* GO: add xpending command

Signed-off-by: jbrinkman <[email protected]>
* GO Implement Dump and ObjectEncoding command

Signed-off-by: EdricCua <[email protected]>
* Implement Echo Command

Signed-off-by: EdricCua <[email protected]>
* Go: `XREADGROUP`.

Signed-off-by: Yury-Fridlyand <[email protected]>
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <[email protected]>
* Go: `XAUTOCLAIM`.

Signed-off-by: Yury-Fridlyand <[email protected]>
…-io#2956)

* Go: update return types & response handlers for scan commands

Signed-off-by: TJ Zhang <[email protected]>
…-io#2958)

* Implement Object Freq, Idle and RefCount

Signed-off-by: EdricCua <[email protected]>
…2888)

* Sort,Sort_RO,Sort Store commands

Signed-off-by: Niharika Bhavaraju <[email protected]>
* Go: `XGROUP CREATE`.

Signed-off-by: Yury-Fridlyand <[email protected]>
…y-io#2975)

* go xGroupCreateConsumer and XGroupDelConsumer

Signed-off-by: jbrinkman <[email protected]>

Co-authored-by: Yury-Fridlyand <[email protected]>
* Fix return types.

Signed-off-by: Yury-Fridlyand <[email protected]>
Fix return types

Signed-off-by: Yury-Fridlyand <[email protected]>
* Go: Add XAck command

Signed-off-by: Prateek Kumar <[email protected]>
* Go: `XGROUP SETID`.

Signed-off-by: Yury-Fridlyand <[email protected]>
* Go: `XGROUP CREATE`.

Signed-off-by: Yury-Fridlyand <[email protected]>
Yury-Fridlyand and others added 5 commits January 23, 2025 13:34
* Go: `HRANDFIELD`.

Signed-off-by: Yury-Fridlyand <[email protected]>
)

* Added bitmap commands,wait commands

Signed-off-by: Niharika Bhavaraju <[email protected]>
* Define new function, change paramter type to Union, add conditionals for IFEQ

Signed-off-by: Angraybill <[email protected]>

* Tests for IFEQ, positive and negative cases

Signed-off-by: Angraybill <[email protected]>

* Update Changelog

Signed-off-by: Angraybill <[email protected]>

* Import OnlyIfEqual in init file

Signed-off-by: Angraybill <[email protected]>

---------

Signed-off-by: Angraybill <[email protected]>
* Go: Add command XClaim

Signed-off-by: TJ Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.