Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
86d9b09
fix: comprehensive repository audit and issue management
AlmostBald-TRADING Oct 24, 2025
5815d2b
fix: update import paths in moved test files
AlmostBald-TRADING Oct 24, 2025
878949b
fix: resolve import path issues in moved test files
AlmostBald-TRADING Oct 24, 2025
3435391
fix: resolve CI test failures with comprehensive import and environme…
AlmostBald-TRADING Oct 24, 2025
37d070e
fix: update mypy pre-commit hook version to resolve compatibility issues
AlmostBald-TRADING Oct 24, 2025
4f6d66e
fix: ensure parent module is imported in test configuration
AlmostBald-TRADING Oct 24, 2025
fb657e5
fix: Phase 1 immediate fixes for CI test failures
AlmostBald-TRADING Oct 24, 2025
caef435
fix: Phase 2 structural fixes for module import issues
AlmostBald-TRADING Oct 24, 2025
59756a2
Fix linting issues in test files
AlmostBald-TRADING Oct 24, 2025
6cf238a
Fix line length issues in test files
AlmostBald-TRADING Oct 24, 2025
e644bd1
fix: resolve tiktoken import error and update dependencies
AlmostBald-TRADING Oct 24, 2025
0ff85fb
fix: resolve CodeRabbit import style issues in main.py
AlmostBald-TRADING Oct 24, 2025
9b41bdd
fix: resolve all CI test failures
AlmostBald-TRADING Oct 24, 2025
5a2d3b2
fix: resolve module reloading class identity issues in tests
AlmostBald-TRADING Oct 24, 2025
4e23442
fix: add explicit boolean check in FallbackHashEmbeddings constructor
AlmostBald-TRADING Oct 24, 2025
ade1429
fix: change ValueError to TypeError for dimension type validation
AlmostBald-TRADING Oct 24, 2025
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
# Install optional dependencies for testing
pip install -e ".[openai]"
# Ensure coverage plugin is available for enforcing minimum coverage
pip install pytest-cov
- name: Run tests
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ coverage/

# Keep ADRs local (contain private references)
docs/adr/
# Temporary result files
audit-results.json
safety-results.json
vulnerability_summary.json
coverage.xml
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ repos:
#
# Current Status: Phase 0 (Foundation) - 86 strict mode errors identified
# Progress Tracking: https://github.com/your-org/ConextForge_memory/issues/TBD
# TODO: Update with actual issue URL when created
# Progress tracking: https://github.com/VirtualAgentics/ConextForge_memory/issues/7
# ADR Reference: docs/adr/ADR-0004-mypy-strict-mode-migration.md
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.18.1
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools, types-aiofiles]
Expand Down
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ make test # Full test suite
**⚠️ CRITICAL**: All Python operations must be performed in the activated
virtual environment.

### Temporary Dependency Constraints

- **setuptools < 81**: We temporarily pin setuptools to versions below 81 in our
CI workflow to avoid deprecation warnings related to the `pkg_resources`
module. The `pkg_resources` module is deprecated and scheduled for removal
as early as November 30, 2025. This constraint should be removed once
setuptools releases a fix or the deprecation is resolved. See:
[setuptools documentation](https://setuptools.pypa.io/en/latest/pkg_resources.html)

## Development Workflow

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ multi-repo reuse (Brainstorm, Cursor, and others).
**ALL Python operations MUST be performed in a virtual environment** to prevent system corruption.
Never install dependencies directly on the host system.

## Python Version Requirements

**Python 3.12+ Required**: This project requires Python 3.12 or higher. Python 3.11 and earlier are not supported.

## Features

- Versioned API: `/v0/` with `store`, `search`, `embed`.
Expand Down Expand Up @@ -94,6 +98,18 @@ make setup # Installs both production and development dependencies
make run # Start development server
```

### Optional Dependencies

For enhanced functionality, install optional dependency groups:

```bash
# OpenAI integration (embeddings and summarization)
pip install -e ".[openai]"

# Development tools (linting, testing, formatting)
pip install -e ".[dev]"
```

**Prerequisites for type checking:**

- Node.js and npm must be installed for `make type-check` (pyright is Node.js-based)
Expand Down Expand Up @@ -344,7 +360,7 @@ See [CI/CD Documentation](docs/ci-cd.md) for detailed workflow information.
Run the comprehensive example script to see all features in action:

```bash
python example_usage.py
python examples/example_usage.py
```

This script demonstrates:
Expand Down
Empty file removed demo_lazy_dimension.py
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ This document outlines recommended improvements for the ContextForge Memory repo
- **Description**: Created CHANGELOG.md following Keep a Changelog format
- **Implementation**: Documented all notable changes with proper versioning

### 3. Repository Structure Cleanup

- **Status**: βœ… Completed
- **Description**: Reorganized repository structure for better maintainability
- **Implementation**:
- Created `examples/` directory for example scripts
- Moved `example_usage.py` from root to `examples/`
- Moved 8 test files from root to `tests/` directory
- Moved 4 development documentation files to `docs/` directory
- Cleaned up temporary files and empty files
- Updated all documentation references to reflect new structure

## πŸ”„ Recommended Next Steps

### High Priority (Immediate Action Required)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ const results = await client.v1Search(

## Examples

See [example_usage.py](../example_usage.py) for comprehensive usage examples.
See [examples/example_usage.py](../examples/example_usage.py) for comprehensive usage examples.

## OpenAPI Specifications

Expand Down
45 changes: 36 additions & 9 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,31 +241,58 @@ Without OpenAI API key:

## Dependencies

### Python Version Requirements

**Python 3.12+ Required**: This project requires Python 3.12 or higher. Python 3.11 and earlier are not supported.

### Production Dependencies (requirements.txt)

Core dependencies for running ContextForge Memory:

```txt
aiofiles==24.1.0 # Async file operations
fastapi==0.119.1 # Web framework
aiofiles==25.1.0 # Async file operations
fastapi>=0.118.1 # Web framework
uvicorn[standard]==0.38.0 # ASGI server
pydantic==2.12.3 # Data validation
orjson==3.10.7 # Fast JSON serialization
numpy==2.1.1 # Numerical operations
httpx==0.27.2 # HTTP client
starlette==0.48.0 # ASGI framework
tenacity==9.0.0 # Retry logic
tenacity==9.1.2 # Retry logic
numpy>=1.26.0 # Numerical operations
```

Optional dependencies (automatically installed):
### Optional Dependencies

The project supports optional dependency groups for enhanced functionality:

#### OpenAI Integration (`openai` group)

```bash
pip install -e ".[openai]"
```

Includes:

- `openai>=1.0.0,<3.0.0` - OpenAI API client (supports 2.x versions)
- `tiktoken>=0.5.0,<1.0.0` - Token counting for OpenAI models

#### Development Dependencies (`dev` group)

```bash
pip install -e ".[dev]"
```

Includes testing, linting, and development tools.

### Automatic Optional Dependencies

These are installed automatically when needed:

- `sentence-transformers` - For sentence transformer embeddings
- `openai` - For OpenAI API integration

### Development Dependencies

The project uses `pip-tools` for reproducible development environments:

> **Note**: For information about dependency resolution and MCP compatibility, see [ADR-0005: MCP Dependency Resolution](adr/ADR-0005-mcp-dependency-resolution.md).

- **requirements-dev.in**: Unpinned development dependencies
- **requirements-dev.txt**: Pinned versions generated from requirements-dev.in

Expand Down
4 changes: 2 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,13 @@ logging.basicConfig(level=logging.DEBUG)
- **API Documentation**: Visit `http://localhost:8085/docs` when server is running
- **OpenAPI Specs**: Check `openapi/` directory
- **Rules**: See `.cursor/rules/` for coding standards
- **Examples**: Run `python example_usage.py` for usage examples
- **Examples**: Run `python examples/example_usage.py` for usage examples
- **Issues**: Check GitHub issues for known problems

## Next Steps

1. **Explore the codebase**: Start with `src/contextforge_memory/main.py`
2. **Run examples**: Execute `python example_usage.py`
2. **Run examples**: Execute `python examples/example_usage.py`
3. **Check API docs**: Visit `http://localhost:8085/docs`
4. **Read the rules**: Review `.cursor/rules/` for coding standards
5. **Write tests**: Add tests for any new features
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ select = ["E", "F", "I", "B", "UP", "C4", "PIE", "SIM", "T20", "ASYNC", "S", "RU
ignore = []
fixable = ["I"]
[tool.ruff.lint.per-file-ignores]
"example_usage.py" = ["T20"]
"examples/example_usage.py" = ["T20"]
".github/scripts/analyze_vulnerabilities.py" = ["T20"]
"tests/**/*.py" = ["S101", "T20"] # Allow assert statements and print in test files
"**/test_*.py" = ["S101", "T20"] # Allow assert statements and print in test files
Expand Down
Loading