Skip to content

Commit 39398fb

Browse files
authored
Merge pull request #34 from NREL-Distribution-Suites/mcp_server_implementation
cleanup
2 parents fbd9391 + 84a3271 commit 39398fb

30 files changed

Lines changed: 4090 additions & 30 deletions

.github/workflows/pull_request_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
python -m pip install ".[dev]"
21+
python -m pip install ".[dev,mcp]"
2222
- name: Run pytest
2323
run: |
2424
python -m pytest -v --disable-warnings tests

.github/workflows/tests.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ["3.12", "3.13"]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e ".[dev,mcp]"
30+
31+
- name: Run linter
32+
run: |
33+
ruff check .
34+
35+
- name: Run formatter check
36+
run: |
37+
ruff format --check .
38+
39+
- name: Run tests with coverage
40+
run: |
41+
pytest --cov=shift --cov-report=xml --cov-report=term
42+
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v3
45+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
46+
with:
47+
file: ./coverage.xml
48+
flags: unittests
49+
name: codecov-umbrella
50+
fail_ci_if_error: false
51+
52+
docs:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- uses: actions/checkout@v3
57+
58+
- name: Set up Python
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: "3.11"
62+
63+
- name: Install dependencies
64+
run: |
65+
python -m pip install --upgrade pip
66+
pip install -e ".[doc]"
67+
68+
- name: Build documentation
69+
run: |
70+
cd docs
71+
make html

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Comprehensive README with installation, usage, and examples
12+
- CONTRIBUTING.md with development guidelines
13+
- Complete example documentation in docs/usage/
14+
- pytest configuration with coverage reporting
15+
- GitHub Actions CI/CD workflow
16+
- Additional test files for data models and exceptions
17+
- Enhanced docstrings for utility functions
18+
- Support for multiple test markers (slow, integration, unit)
19+
- **MCP Server** - Model Context Protocol server for AI assistant integration
20+
- 7 MCP tools: fetch_parcels, cluster_parcels, create_graph, add_node, add_edge, query_graph, list_resources
21+
- State management with optional file persistence
22+
- Comprehensive MCP server documentation (docs/MCP_SERVER.md)
23+
- Example client script demonstrating all tools
24+
- Claude Desktop configuration example
25+
- CLI entry point: `shift-mcp-server`
26+
- 15+ unit tests for MCP functionality
27+
- API Quick Reference guide (docs/API_REFERENCE.md)
28+
- QUICKSTART.md for new developers
29+
30+
### Changed
31+
- Updated pyproject.toml with pytest and coverage configurations
32+
- Enhanced documentation structure in docs/usage/index.md
33+
- Improved test coverage for graph operations
34+
- Added MCP dependencies as optional install: `pip install -e ".[mcp]"`
35+
- Added loguru as core dependency for logging
36+
37+
### Fixed
38+
- Fixed exception test imports to match actual exception hierarchy
39+
- Fixed test filter functions to match correct signatures
40+
- Added missing Distance import in EdgeModel tests
41+
42+
### Known Issues
43+
- MCP server has pydantic version conflict with grid-data-models (MCP requires 2.12.x, GDM requires 2.10.x)
44+
45+
## [0.6.1] - 2026-01-29
46+
47+
### Changed
48+
- Updated dependencies to support Python 3.10+
49+
- Improved error handling in graph operations
50+
51+
## [0.6.0] - Previous Release
52+
53+
### Added
54+
- Initial public release
55+
- Core distribution graph functionality
56+
- OpenStreetMap integration
57+
- Phase and voltage mapping
58+
- Equipment mapping
59+
- Distribution system builder
60+
61+
[Unreleased]: https://github.com/NREL-Distribution-Suites/shift/compare/v0.6.1...HEAD
62+
[0.6.1]: https://github.com/NREL-Distribution-Suites/shift/compare/v0.6.0...v0.6.1
63+
[0.6.0]: https://github.com/NREL-Distribution-Suites/shift/releases/tag/v0.6.0

0 commit comments

Comments
 (0)