Skip to content

Commit ee571f5

Browse files
committed
Initial commit - EnrichMCP codebase
0 parents  commit ee571f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6560
-0
lines changed

.coveragerc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[run]
2+
source = src/enrichmcp
3+
relative_files = True
4+
5+
[report]
6+
exclude_lines =
7+
pragma: no cover
8+
def __repr__
9+
raise NotImplementedError
10+
if __name__ == .__main__.:
11+
pass
12+
raise ImportError
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Create a data model with '...'
16+
2. Define a relationship '....'
17+
3. Call resource '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Code Example**
24+
```python
25+
# Minimal code example that reproduces the issue
26+
```
27+
28+
**Error Output**
29+
```
30+
# Full error message and stack trace
31+
```
32+
33+
**Environment (please complete the following information):**
34+
- OS: [e.g. Ubuntu 22.04]
35+
- Python version: [e.g. 3.11.5]
36+
- enrichmcp version: [e.g. 0.1.0]
37+
- Installation method: [pip/source]
38+
39+
**Additional context**
40+
Add any other context about the problem here.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for enrichmcp
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Example API/Usage**
20+
```python
21+
# Show how you'd like to use this feature
22+
@app.entity
23+
class MyModel(EnrichModel):
24+
# Example of proposed API
25+
```
26+
27+
**Additional context**
28+
Add any other context or screenshots about the feature request here.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
4+
5+
Fixes # (issue)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
## How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
19+
20+
## Checklist:
21+
22+
- [ ] My code follows the style guidelines of this project
23+
- [ ] I have performed a self-review of my own code
24+
- [ ] I have commented my code, particularly in hard-to-understand areas
25+
- [ ] I have made corresponding changes to the documentation
26+
- [ ] My changes generate no new warnings
27+
- [ ] I have added tests that prove my fix is effective or that my feature works
28+
- [ ] New and existing unit tests pass locally with my changes
29+
- [ ] Any dependent changes have been merged and published in downstream modules

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "dependencies"
10+
allow:
11+
- dependency-type: "direct"
12+
ignore:
13+
- dependency-name: "*"
14+
update-types: ["version-update:semver-patch"]
15+
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "monthly"
20+
labels:
21+
- "dependencies"
22+
- "github-actions"

.github/workflows/README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# GitHub Actions Workflows
2+
3+
This directory contains the automated workflows for enrichmcp.
4+
5+
## Workflows
6+
7+
### 1. `ci.yml` - Continuous Integration
8+
- **Triggers**: On every push and pull request
9+
- **Purpose**: Runs tests, linting, and type checking
10+
- **Jobs**:
11+
- Run pytest
12+
- Run ruff linting
13+
- Run pyright type checking
14+
15+
### 2. `docs.yml` - Documentation
16+
- **Triggers**: On push to main or manual trigger
17+
- **Purpose**: Builds and deploys documentation to GitHub Pages
18+
- **Note**: Currently configured but may need GitHub Pages setup
19+
20+
### 3. `release.yml` - PyPI Release
21+
- **Triggers**: When you push a version tag (e.g., `v0.1.0`)
22+
- **Purpose**: Builds and publishes the package to PyPI
23+
- **Jobs**:
24+
1. Build the distribution packages
25+
2. Publish to PyPI (supports both trusted publishing and username/password)
26+
3. Create a GitHub release with changelog
27+
28+
### 4. `test-publish.yml` - Test PyPI Publishing
29+
- **Triggers**: On pushes to main that modify source code
30+
- **Purpose**: Tests the build and optionally publishes to TestPyPI
31+
- **Jobs**:
32+
1. Build and test the package
33+
2. Publish to TestPyPI (only on main branch)
34+
35+
## Setup Instructions
36+
37+
### For PyPI Publishing (release.yml)
38+
39+
You have two options:
40+
41+
#### Option 1: Trusted Publishing (Recommended)
42+
1. Go to https://pypi.org and log in
43+
2. Go to your project page (after first manual upload)
44+
3. Click "Manage" → "Publishing"
45+
4. Add a new trusted publisher:
46+
- Owner: `featureform`
47+
- Repository: `enrichmcp`
48+
- Workflow: `release.yml`
49+
- Environment: `pypi`
50+
5. In GitHub, go to Settings → Environments
51+
6. Create an environment called `pypi`
52+
7. Add a variable `USE_TRUSTED_PUBLISHING` with value `true`
53+
54+
#### Option 2: API Token (Classic Method)
55+
1. Go to https://pypi.org and log in
56+
2. Go to Account Settings → API tokens
57+
3. Create a new token (scope to project after first upload)
58+
4. In GitHub, go to Settings → Secrets and variables → Actions
59+
5. Add secrets:
60+
- `PYPI_USERNAME`: `__token__`
61+
- `PYPI_PASSWORD`: Your PyPI API token
62+
63+
### For TestPyPI Publishing (test-publish.yml)
64+
65+
Similar to above but for test.pypi.org:
66+
1. Create account at https://test.pypi.org
67+
2. Set up trusted publishing for the `testpypi` environment
68+
3. Or use API tokens
69+
70+
## How to Make a Release
71+
72+
1. Make sure you're on the main branch with all changes committed
73+
2. Update `CHANGELOG.md` (change "Unreleased" to the version number)
74+
3. Commit the changelog update
75+
4. Tag the release:
76+
```bash
77+
git tag -a v0.1.0 -m "Release version 0.1.0"
78+
git push origin main
79+
git push origin v0.1.0
80+
```
81+
5. The `release.yml` workflow will automatically:
82+
- Build the package
83+
- Upload to PyPI
84+
- Create a GitHub release
85+
86+
## Manual Triggers
87+
88+
Some workflows support manual triggers via GitHub's UI:
89+
1. Go to Actions tab
90+
2. Select the workflow
91+
3. Click "Run workflow"
92+
4. Choose the branch and run
93+
94+
This is available for:
95+
- `docs.yml` - To manually deploy docs
96+
- `test-publish.yml` - To manually test publishing

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch: # Enables manual triggering
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.11", "3.12", "3.13"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
cache: 'pip'
27+
cache-dependency-path: |
28+
requirements.txt
29+
requirements-dev.txt
30+
31+
- name: Install dependencies
32+
run: make ci-setup
33+
34+
- name: Run linters (check mode)
35+
run: make ci-lint
36+
37+
- name: Test with pytest
38+
run: make ci-test
39+
40+
- name: Upload coverage to Codecov
41+
if: matrix.python-version == '3.11' # Only upload once
42+
uses: codecov/codecov-action@v4
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
files: ./coverage.xml
46+
fail_ci_if_error: false
47+
verbose: true

.github/workflows/docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
cache: 'pip'
30+
cache-dependency-path: |
31+
requirements.txt
32+
requirements-dev.txt
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -r requirements-dev.txt
38+
39+
- name: Build documentation
40+
run: mkdocs build
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v4
44+
with:
45+
enablement: true
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: './site'
51+
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)