{"id":28429582,"url":"https://github.com/weaviate/docs","last_synced_at":"2025-07-04T18:30:26.623Z","repository":{"id":273329167,"uuid":"917595898","full_name":"weaviate/docs","owner":"weaviate","description":"The documentation repo for Weaviate Database, Cloud, Agents and much more!","archived":false,"fork":false,"pushed_at":"2025-07-03T11:37:34.000Z","size":643840,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-03T12:30:47.581Z","etag":null,"topics":["docs","documentation","embeddings","llm","open-source","vector-database","weaviate"],"latest_commit_sha":null,"homepage":"https://weaviate-docs.netlify.app/docs/weaviate","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaviate.png","metadata":{"files":{"readme":"README-tests.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-16T09:38:36.000Z","updated_at":"2025-07-01T13:26:29.000Z","dependencies_parsed_at":"2025-07-03T12:35:13.922Z","dependency_job_id":null,"html_url":"https://github.com/weaviate/docs","commit_stats":null,"previous_names":["weaviate/docs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/weaviate/docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate%2Fdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate%2Fdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate%2Fdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate%2Fdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaviate","download_url":"https://codeload.github.com/weaviate/docs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate%2Fdocs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263596512,"owners_count":23486159,"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":["docs","documentation","embeddings","llm","open-source","vector-database","weaviate"],"created_at":"2025-06-05T13:38:28.334Z","updated_at":"2025-07-04T18:30:26.605Z","avatar_url":"https://github.com/weaviate.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Tests for Code Examples\n\nAt Weaviate, we maintain automated tests to ensure the accuracy and functionality of our code examples. This testing framework helps us catch issues early and maintain high-quality documentation.\n\n## Overview\n\nOur code examples are designed as self-contained, runnable scripts. Each script includes inline assertions to verify its functionality. These tests are managed through various testing frameworks and can be executed centrally to validate all examples.\n\n## Prerequisites\n\nBefore running tests, ensure you have:\n\n- Python 3.8+ and Node.js installed\n- **Java 8+ and Maven** (for Java examples)\n- Docker (required for running Weaviate instances)\n- Rust and Cargo (for some examples)\n- API keys for vectorization services:\n  - `COHERE_APIKEY`\n  - `HUGGINGFACE_APIKEY`\n  - `OPENAI_APIKEY`\n\n## Setup\n\n1. Create and activate a Python virtual environment:\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n```\n\n2. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n## Running Tests\n\n### Python Tests\n\nRun all Python tests:\n```bash\npytest\n```\n\nRun specific test files:\n```bash\npytest tests/path/to/test_file.py\n```\n\n### Java Tests\n\n1. Start Weaviate instances:\n```bash\ntests/start-weaviate.sh\n```\n\n2. Navigate to the Java examples directory:\n```bash\ncd _includes/code/howto/java\n```\n\n3. Set required environment variables:\n```bash\nexport OPENAI_APIKEY=\"your-openai-api-key\"\n# Optional: Set other API keys if needed\nexport COHERE_APIKEY=\"your-cohere-api-key\"\nexport HUGGINGFACE_APIKEY=\"your-huggingface-api-key\"\n```\n\n4. Install dependencies and run tests:\n```bash\n# Install dependencies\nmvn clean install\n\n# Run all tests\nmvn test\n\n# Run tests with specific tags\nmvn test -Dgroups=\"crud\"\nmvn test -Dgroups=\"create\"\n\n# Run a specific test class\nmvn test -Dtest=ManageDataCreateTest\n```\n\n5. Stop Weaviate instances when finished:\n```bash\ntests/stop-weaviate.sh\n```\n\n### Golang Tests\n\n1. Start Weaviate instances:\n```bash\ntests/start-weaviate.sh\n```\n\n2. Navigate to the Go examples directory:\n```bash\ncd _includes/code/howto/go/docs\n```\n\n3. Update dependencies:\n```bash\ngo mod tidy\n```\n\n4. Run tests:\n```bash\n# Run all tests\ngo test\n\n# Run specific test file\ngo test \u003cfile_path\u003e -v\n# Example:\ngo test docs/manage-data.classes_test.go -v\n```\n\n5. Stop Weaviate instances:\n```bash\ntests/stop-weaviate.sh\n```\n\n## Test Fixtures\n\nThe test suite includes several fixtures to help with testing:\n\n- `empty_weaviates`: Provides a clean Weaviate instance for testing\n- More fixtures are planned for different test scenarios\n\n## Troubleshooting\n\n- If tests fail to connect to Weaviate, ensure Docker is running and the Weaviate instances are up\n- For API key issues, verify your environment variables are set correctly\n- If you encounter dependency issues, try updating your virtual environment and reinstalling requirements\n\n## Contributing\n\nIf you find issues with the tests or documentation:\n1. Check if the issue is already reported on GitHub\n2. If not, create a new issue with:\n   - The test that's failing\n   - Your environment details\n   - Any error messages\n   - Steps to reproduce\n\n## Thanks\n\nA big thanks to Jeremy for suggesting this testing framework! 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate%2Fdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaviate%2Fdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate%2Fdocs/lists"}