Skip to content

Commit 90f1f96

Browse files
committed
add workflow
1 parent 076975e commit 90f1f96

File tree

4 files changed

+332
-1
lines changed

4 files changed

+332
-1
lines changed

.github/workflows/publish.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch: # Allow manual triggering
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ['3.10', '3.11', '3.12']
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -e ".[dev]"
27+
28+
- name: Run tests
29+
run: |
30+
python -m pytest tests/ -v
31+
32+
- name: Run code quality checks
33+
run: |
34+
python -m ruff check .
35+
python -m ruff format . --check
36+
37+
build:
38+
needs: test
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Set up Python
45+
uses: actions/setup-python@v4
46+
with:
47+
python-version: '3.10'
48+
49+
- name: Install build dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install build twine
53+
54+
- name: Build package
55+
run: python -m build
56+
57+
- name: Check package
58+
run: twine check dist/*
59+
60+
- name: Upload build artifacts
61+
uses: actions/upload-artifact@v3
62+
with:
63+
name: dist
64+
path: dist/
65+
66+
publish:
67+
needs: build
68+
runs-on: ubuntu-latest
69+
if: github.event_name == 'release' && github.event.action == 'published'
70+
71+
steps:
72+
- name: Download build artifacts
73+
uses: actions/download-artifact@v3
74+
with:
75+
name: dist
76+
path: dist/
77+
78+
- name: Publish to PyPI
79+
uses: pypa/gh-action-pypi-publish@release/v1
80+
with:
81+
password: ${{ secrets.PYPI_API_TOKEN }}
82+
83+
publish-test:
84+
needs: build
85+
runs-on: ubuntu-latest
86+
if: github.event_name == 'workflow_dispatch'
87+
88+
steps:
89+
- name: Download build artifacts
90+
uses: actions/download-artifact@v3
91+
with:
92+
name: dist
93+
path: dist/
94+
95+
- name: Publish to TestPyPI
96+
uses: pypa/gh-action-pypi-publish@release/v1
97+
with:
98+
repository-url: https://test.pypi.org/legacy/
99+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

.gitignore

Lines changed: 181 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,184 @@ wheels/
1010
.venv
1111

1212
# macOS
13-
.DS_Store
13+
.DS_Store
14+
15+
# Byte-compiled / optimized / DLL files
16+
__pycache__/
17+
*.py[cod]
18+
*$py.class
19+
20+
# Distribution / packaging
21+
.Python
22+
build/
23+
develop-eggs/
24+
dist/
25+
downloads/
26+
eggs/
27+
.eggs/
28+
lib/
29+
lib64/
30+
parts/
31+
sdist/
32+
var/
33+
wheels/
34+
share/python-wheels/
35+
*.egg-info/
36+
.installed.cfg
37+
*.egg
38+
MANIFEST
39+
40+
# PyInstaller
41+
# Usually these files are written by a python script from a template
42+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
43+
*.manifest
44+
*.spec
45+
46+
# Installer logs
47+
pip-log.txt
48+
pip-delete-this-directory.txt
49+
50+
# Unit test / coverage reports
51+
htmlcov/
52+
.tox/
53+
.nox/
54+
.coverage
55+
.coverage.*
56+
.cache
57+
nosetests.xml
58+
coverage.xml
59+
*.cover
60+
*.py,cover
61+
.hypothesis/
62+
.pytest_cache/
63+
cover/
64+
65+
# Translations
66+
*.mo
67+
*.pot
68+
69+
# Django stuff:
70+
*.log
71+
local_settings.py
72+
db.sqlite3
73+
db.sqlite3-journal
74+
75+
# Flask stuff:
76+
instance/
77+
.webassets-cache
78+
79+
# Scrapy stuff:
80+
.scrapy
81+
82+
# Sphinx documentation
83+
docs/_build/
84+
85+
# PyBuilder
86+
.pybuilder/
87+
target/
88+
89+
# Jupyter Notebook
90+
.ipynb_checkpoints
91+
92+
# IPython
93+
profile_default/
94+
ipython_config.py
95+
96+
# pyenv
97+
# For a library or package, you might want to ignore these files since the code is
98+
# intended to run in multiple environments; otherwise, check them in:
99+
# .python-version
100+
101+
# pipenv
102+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
103+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
104+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
105+
# install all needed dependencies.
106+
#Pipfile.lock
107+
108+
# poetry
109+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
110+
# This is especially recommended for binary packages to ensure reproducibility, and is more
111+
# commonly ignored for libraries.
112+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
113+
#poetry.lock
114+
115+
# pdm
116+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
117+
#pdm.lock
118+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
119+
# in version control.
120+
# https://pdm.fming.dev/#use-with-ide
121+
.pdm.toml
122+
123+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
124+
__pypackages__/
125+
126+
# Celery stuff
127+
celerybeat-schedule
128+
celerybeat.pid
129+
130+
# SageMath parsed files
131+
*.sage.py
132+
133+
# Environments
134+
.env
135+
.venv
136+
env/
137+
venv/
138+
ENV/
139+
env.bak/
140+
venv.bak/
141+
142+
# Spyder project settings
143+
.spyderproject
144+
.spyproject
145+
146+
# Rope project settings
147+
.ropeproject
148+
149+
# mkdocs documentation
150+
/site
151+
152+
# mypy
153+
.mypy_cache/
154+
.dmypy.json
155+
dmypy.json
156+
157+
# Pyre type checker
158+
.pyre/
159+
160+
# pytype static type analyzer
161+
.pytype/
162+
163+
# Cython debug symbols
164+
cython_debug/
165+
166+
# PyCharm
167+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
168+
# be added to the global gitignore or merged into this project gitignore. For a PyCharm
169+
# project, it is recommended to include the following files in version control:
170+
# *.iml
171+
# modules.xml
172+
# .idea/misc.xml
173+
# .idea/modules.xml
174+
# .idea/shelf
175+
# .idea/workspace.xml
176+
# .idea/tasks.xml
177+
# .idea/gradle.xml
178+
# .idea/jarRepositories.xml
179+
# .idea/compiler.xml
180+
# .idea/libraries/
181+
# *.iml
182+
# modules.xml
183+
# .idea/
184+
185+
# VS Code
186+
.vscode/
187+
188+
# Ruff cache
189+
.ruff_cache/
190+
191+
# Test configuration files
192+
test-*.json
193+
*-test.json

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 MCPify Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,41 @@ version = "0.1.0"
44
description = "Turn existing projects into MCP servers"
55
readme = "README.md"
66
requires-python = ">=3.10"
7+
license = {text = "MIT"}
8+
authors = [
9+
{name = "Xiaotian Jin", email = "[email protected]"},
10+
]
11+
maintainers = [
12+
{name = "Xiaotian Jin", email = "[email protected]"},
13+
]
14+
keywords = ["mcp", "model-context-protocol", "api", "server", "automation", "ai"]
15+
classifiers = [
16+
"Development Status :: 4 - Beta",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: MIT License",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Topic :: Software Development :: Libraries :: Python Modules",
25+
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
26+
"Topic :: System :: Systems Administration",
27+
"Topic :: Utilities",
28+
]
729
dependencies = [
830
"aiohttp>=3.12.2",
931
"mcp[cli]>=1.9.1",
1032
"openai>=1.0.0",
1133
]
1234

35+
[project.urls]
36+
Homepage = "https://github.com/mugglejinx/mcpify"
37+
Documentation = "https://github.com/muggleji/mcpify#readme"
38+
Repository = "https://github.com/muggleji/mcpify.git"
39+
"Bug Tracker" = "https://github.com/muggleji/mcpify/issues"
40+
Changelog = "https://github.com/muggleji/mcpify/blob/main/CHANGELOG.md"
41+
1342
[project.optional-dependencies]
1443
examples = [
1544
"fastapi>=0.104.1",
@@ -26,6 +55,8 @@ dev = [
2655
"ruff>=0.1.0",
2756
"mypy>=1.5.0",
2857
"pre-commit>=3.0.0",
58+
"bandit[toml]>=1.7.0",
59+
"safety>=2.3.0",
2960
]
3061
all = [
3162
"mcpify[examples,dev]",

0 commit comments

Comments
 (0)