{"id":27005679,"url":"https://github.com/relevanceai/relevanceai-readme-docs","last_synced_at":"2025-04-04T07:17:06.449Z","repository":{"id":42430924,"uuid":"445377864","full_name":"RelevanceAI/RelevanceAI-readme-docs","owner":"RelevanceAI","description":"RelevanceAI ReadMe Documentation ","archived":false,"fork":false,"pushed_at":"2022-04-06T12:55:05.000Z","size":38242,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-03T21:55:30.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RelevanceAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-07T02:47:51.000Z","updated_at":"2022-02-14T23:22:01.000Z","dependencies_parsed_at":"2022-09-09T19:34:46.441Z","dependency_job_id":null,"html_url":"https://github.com/RelevanceAI/RelevanceAI-readme-docs","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RelevanceAI%2FRelevanceAI-readme-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RelevanceAI%2FRelevanceAI-readme-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RelevanceAI%2FRelevanceAI-readme-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RelevanceAI%2FRelevanceAI-readme-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RelevanceAI","download_url":"https://codeload.github.com/RelevanceAI/RelevanceAI-readme-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135126,"owners_count":20889421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-04T07:17:05.352Z","updated_at":"2025-04-04T07:17:06.440Z","avatar_url":"https://github.com/RelevanceAI.png","language":"Jupyter Notebook","readme":"# RelevanceAI-readme-docs\n\nThis repository updates RelevanceAI's ReadMe Documentation [here](https://docs.relevance.ai/docs).\n\n## 🧠 Documentation\n\n## 🛠️  Requirements\n\n- [Node.JS ^14.x and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)\n- [Python ^3.7.0](https://www.python.org/downloads/release/python-3713/)\n- [rdme NPM client ^7.0.0](https://www.npmjs.com/package/rdme?activeTab=readme)\n\n## 🧰 OS Tested\n\n- Linux (Ubuntu 18.04.6 LTS (Bionic Beaver) Debian)\n\n## 👩🏻‍💻 Getting Started with this ReadMe sync repo\n\nThe `main` branch is the live branch in ReadMe.\nBy following instructions below, you will be able to preview/create any given version of the docs at any one time.\n\n```zsh\n❯ tree -L 1\n.\n├── assets                      ## Assets for this README\n├── colab_requirements.txt      ## Colab env reqs\n├── config                      ## Docs/ReadMe files\n├── docs                        ## Generated docs files\n├── docs_template               ## Templates and all resources for auto-generation\n├── examples                    ## For testing notebook tests\n├── export_md                   ## Ignore: Readme Markdown exports\n├── migration                   ## Ignore: instructions for the initial migration\n├── package.json                ## NPM deps\n├── package-lock.json           ## NPM deps lock\n├── rdmd.md                     ## Rdmd cheatsheet\n├── rdme.md                     ## Rdme cheatsheet\n├── README.md\n├── requirements.txt            ## Python reqs\n├── sync                        ## Automation scripts to build and sync docs\n└── __version__\n```\n\n\n1. Install dependencies if first time; note, this repo has both Python and NPM deps\n    ```zsh\n    ❯ git clone git@github.com:RelevanceAI/RelevanceAI-readme-docs.git\n    ❯ python -m venv .venv                 # Create new Python venv\n    ❯ source .venv/bin/activate            # Activate new venv\n    ❯ make install\n    ```\n\n2. Create a new branch for the ReadMe version you'd like to create if not already auto-created upon SDK release eg. v1.0.0\n   - Branch off the latest version that you'd like to fork from (if it is not `main`)\n    ```zsh\n    ❯ git checkout -b v1.0.0\n    ❯ git checkout -b v1.0.0-fix-typo\n    ```\n3. Make your desired changes to the relevant Markdown/notebooks in `docs_templates`. Sync your changes.\n\nThese are templates because all the files and notebooks in docs_templates are written in a templated language and are synced with code snippets.\n\n## 👩🏻‍💻  Adding a new guide\n\n4. To add new assets (i):\n   - Add new assets to the corresponding `_assets` folder in `docs_template`.\n   - Update asset links in `md` files to point to corresponding path.\n5. To add new notebooks:\n   - Add new notebooks to the corresponding `_notebooks` folder in `docs_template`.\n   - Update notebooks to point to the corresponding path.\n   - Colab notebook refs are of the form:\n  ```zsh\n   [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RelevanceAI/RelevanceAI-readme-docs/blob/v0.33.2/docs/getting-started/_notebooks/Intro_to_Relevance_AI.ipynb)\n  ```\n  - Please add this badge in top cell of notebook as well so it can be accessed from Github.\n\n## Optional: Adding new snippets\n\nIn order to keep consistency of the code snippets throughout the repo, you can use the snippet format below to update the snippets in all places.\n\n6. To add new snippet\n   - Add new snippets in the corresponding `_snippets` folder.\n   - Snippets are loaded in a nested fashion. Inner most `_snippets` with the same name will override general snippets in [`docs_template/_snippets/`](./docs_template/_snippets/).\n   - All snippets in `*.md` and `*.ipynb` files are prefaced with `@@@`.\n    ```markdown\n    @@@ relevanceai_installation , RELEVANCEAI_SDK_VERSION=RELEVANCEAI_SDK_VERSION @@@\n    @@@ \u003cSNIPPET_NAME\u003e, \u003cSNIPPET_PARAM_KEY_1\u003e=\u003cSNIPPET_PARAM_VALUE_1\u003e, \u003cSNIPPET_PARAM_KEY_2\u003e=\u003cSNIPPET_PARAM_VALUE_2\u003e, ...  @@@\n    ```\n    - If you want to concatenate snippets, please concatenate using the following format.\n    ```markdown\n    @@@ quickstart_docs; dataset_basics, DATASET_ID=QUICKSTART_DATASET_ID @@@\n    @@@ \u003cSNIPPET_1_NAME\u003e; \u003cSNIPPET_2_NAME\u003e, \u003cSNIPPET_2_PARAMS\u003e; \u003cSNIPPET_3_NAME\u003e, \u003cSNIPPET_3_PARAMS\u003e; @@@\n    ```\n\n## 👩🏻‍💻 Building and previewing docs locally\n7. Feel free to build the docs locally in order to preview your Markdown in Vscode.\n\n   ```zsh\n   ❯ python src/rdme_sync/build/build_docs.py -d\n\n   ```\n\n\n## Converting notebooks to Markdown\n\n8. You can now convert notebooks to ReadMe Markdown either in [`rdmd`](https://rdmd.readme.io/) format or `block` format (which allows for interactive editing in ReadMe).\n\n    ```zsh\n        ❯ sudo apt-get install pandoc ## or brew install pandoc\n        ❯ python src/rdme_sync/readme/nbconvert_rdmd.py -d -f \"block\"\n    ```\n\n## 👩🏻‍💻  Syncing your Changes\n\n\n9. Go the ReadMe Dash config and export the ReadMe API key `$RELEVANCEAI_README_API_KEY` variable from ReadMe Project Configuration\n   ![](./assets/readme_api_key.png)\n   ```zsh\n   ❯ export RELEVANCEAI_README_API_KEY='xxx'\n   ```\n10.  To run notebook tests, make sure to export your `TEST_ACTIVATION_TOKEN` from https://cloud.relevance.ai/sdk/api/.\n    ```zsh\n    ❯ export TEST_ACTIVATION_TOKEN=\"$TEST_PROJECT:$TEST_API_KEY:$TEST_REGION:$TEST_FIREBASEUID\"\n    ```\n11. Apply the changes and update the ReadMe documentations. By default, this script will sync all files in `docs`.\n    ```zsh\n    ❯ ./src/build_sync_readme.sh\n    ## Run in debug mode\n    ❯ ./src/build_sync_readme.sh true\n    ## Sync only a specific section, by default will sync everything in the generated `docs` folder.\n    ❯ ./src/build_sync_readme.sh false docs/clustering-features\n    ## Override the version, by default will create a new version from your current Git branch name\n    ❯ ./src/build_sync_readme.sh false docs/clustering-features v1.0.0-my-new-version\n    ```\n    View your synced changes in ReadMe eg. https://docs.relevance.ai/v0.31.0/docs/quick-tour\n\n\n\n\n## 👩🏻‍💻 Testing notebooks\n\n12. Test the notebooks for changes. By default, the script will process all notebooks in the `docs` folder if no `--notebooks` specified. This script will output error logs to the file `readme_notebook_error_log.txt`\n    ```zsh\n    ❯ python src/tests/test_notebooks.py\n    ## Run in debug mode\n    ❯ python src/tests/test_notebooks.py -d\n    ## Test on a selection of notebooks\n    ❯ python src/tests/test_notebooks.py -d --notebooks examples/Intro_to_Relevance_AI.ipynb examples/RelevanceAI-ReadMe-Quick-Feature-Tour.ipynb\n    ```\n    If you have a notebook you'd like to ignore in tests, add to the [notebook_ignore.txt](./src/notebook_ignore.txt) file.\n\n\n## 👩🏻‍💻  Committing your changes\n\n\n12. Install pre-commit! This helps with things like merge conflicts, linting and checking API keys to help with cleaner commits. 😊\n    ```zsh\n    pre-commit install\n    ```\n13. Commit your changes if what you see in the ReadMe documentation is correct! 🎉💪🏻\n\nSee [./src/README.md](./src/README.md) for more details about the build and sync scripts.\n\n\n## 👩🏻‍💻  Updating the ReadMe config\n\n14. To rebuild the config, if want to sync changes made in ReadMe\n    ```zsh\n    ❯ python src/rdme_sync/config/sync.py --method 'build' --version 'v2.0.0'\n    ```\n\n## For further reference\n### 👩🏻‍💻 Getting Started with rdme Client\n\nSee official [docs](https://www.npmjs.com/package/rdme/v/6.2.1) here for more details, else see rdme cheatsheet [here](./rdme.md).\n\n### 📘 Getting Started with ReadMe Markdown\n\nSee official [docs](https://rdmd.readme.io/docs/getting-started) here for more details, else see rdmd cheatsheet [here](./rdmd.md).\n\n### Helpful Tools\n\n- [jqplay](https://jqplay.org/s/VTxvuAo0T2) - For crafting jq queries\n- [Regexr](https://regexr.com/) - For validating Regex\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelevanceai%2Frelevanceai-readme-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelevanceai%2Frelevanceai-readme-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelevanceai%2Frelevanceai-readme-docs/lists"}