Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Default reviewers for all changes
* @usecortex/hydradb-maintainers

# CLI commands
/src/hydradb_cli/commands/ @usecortex/hydradb-maintainers

# API client
/src/hydradb_cli/client.py @usecortex/hydradb-maintainers

# CI and tooling
/.github/ @usecortex/hydradb-maintainers
73 changes: 73 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Bug Report
description: Report a bug or unexpected behavior in HydraDB CLI
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for reporting a bug. Please fill out the sections below to help us reproduce and fix the issue.

- type: input
id: version
attributes:
label: CLI Version
description: "Output of `hydradb --version`"
placeholder: "hydradb-cli 0.1.0"
validations:
required: true

- type: input
id: python-version
attributes:
label: Python Version
description: "Output of `python --version`"
placeholder: "Python 3.12.0"
validations:
required: true

- type: input
id: os
attributes:
label: Operating System
placeholder: "macOS 14.2 / Ubuntu 22.04 / Windows 11"
validations:
required: true

- type: textarea
id: description
attributes:
label: Bug Description
description: A clear description of what happened and what you expected to happen.
placeholder: |
When I run `hydradb recall full "my query"`, I get an error...
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Minimal steps to reproduce the behavior.
placeholder: |
1. Run `hydradb login`
2. Run `hydradb recall full "test query"`
3. See error
validations:
required: true

- type: textarea
id: output
attributes:
label: CLI Output
description: Paste the full CLI output, including any error messages.
render: shell
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional Context
description: Any other information that might help (config, environment, workarounds tried).
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://docs.hydradb.com/
about: Check the HydraDB documentation for usage guides and API reference.
- name: Security Vulnerability
url: https://github.com/usecortex/hydradb-cli/blob/main/SECURITY.md
about: Report security vulnerabilities privately (do not open a public issue).
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Feature Request
description: Suggest a new feature or improvement for HydraDB CLI
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting a feature. Please describe what you'd like and why it would be useful.

- type: textarea
id: problem
attributes:
label: Problem or Use Case
description: What problem does this feature solve? What are you trying to do?
placeholder: "I often need to... but currently I have to..."
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: How would you like this to work? Include example commands if possible.
placeholder: |
hydradb recall full "my query" --top-k 5 --format json
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Any workarounds or alternative approaches you've considered.
validations:
required: false
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## What does this PR do?

<!-- A brief description of the change. Link to a related issue if applicable. -->

Fixes #

## Type of change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Chore (CI, tooling, dependencies)

## Checklist

- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guide
- [ ] My code follows the project's style guidelines (`make lint` passes)
- [ ] I have added tests for my changes (`make test` passes)
- [ ] All new and existing tests pass
- [ ] My commits are signed off (`git commit -s`)
- [ ] I have updated documentation if needed
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install ruff
run: pip install "ruff>=0.4"

- name: Run linting
run: ruff check .

- name: Run format check
run: ruff format --check .

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install package with test dependencies
run: pip install -e ".[dev]"

- name: Run tests
run: pytest -q

dco-check:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Fetch base branch for commit range
run: git fetch origin ${{ github.event.pull_request.base.ref }}

- name: Check DCO sign-off
run: |
base_sha="${{ github.event.pull_request.base.sha }}"
failed=0
for sha in $(git rev-list "$base_sha"..HEAD); do
if ! git log -1 --format='%B' "$sha" | grep -q "^Signed-off-by: "; then
echo "Commit $sha is missing a DCO sign-off:"
git log -1 --format=' %h %s' "$sha"
failed=1
fi
done
if [ "$failed" -eq 1 ]; then
echo ""
echo "All commits must include a Signed-off-by line."
echo ""
echo "To fix the most recent commit:"
echo " git commit --amend -s"
echo ""
echo "To fix all commits in this PR:"
echo " git rebase --signoff $base_sha"
exit 1
fi
echo "All commits have DCO sign-off."
32 changes: 25 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
# Environment
.env
.env.local
.env.*.local

# Python
.venv/
venv/
env/
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
*.egg
.eggs/
dist/
build/
.eggs/
*.egg
.venv/
venv/
env/
.env
*.so
.mypy_cache/

# Tools
.pytest_cache/
.ruff_cache/
.mypy_cache/
.coverage
htmlcov/

# OS
.DS_Store
Thumbs.db

# IDE
.idea/
.vscode/
*.swp
*.swo
37 changes: 37 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Code of Conduct

## Our Pledge

We are committed to making participation in the HydraDB CLI project a welcoming and harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

**Positive behavior includes:**

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community and the project
- Showing empathy toward other community members

**Unacceptable behavior includes:**

- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- The use of sexualized language or imagery and unwelcome sexual attention
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement

Instances of unacceptable behavior may be reported by contacting the project maintainers at **conduct@hydradb.com**. All reports will be reviewed and investigated promptly and fairly. The project team is obligated to maintain confidentiality with regard to the reporter.

Maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Scope

This Code of Conduct applies within all project spaces -- including the repository, issue tracker, pull requests, discussions, and any other communication channels -- as well as in public spaces when an individual is representing the project or its community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
Loading
Loading