Skip to content

Commit 251b373

Browse files
committed
Lint pull requests and add just recipe
1 parent 44d7438 commit 251b373

File tree

6 files changed

+93
-5
lines changed

6 files changed

+93
-5
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Validate Code Quality
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- 'master'
11+
12+
jobs:
13+
lint:
14+
name: Code Quality & Testing
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install UV
20+
uses: astral-sh/setup-uv@v4
21+
with:
22+
enable-cache: true
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version-file: "pyproject.toml"
28+
29+
- name: Install dependencies
30+
run: uv sync
31+
32+
- name: Run Ruff check
33+
run: uv ruff check
34+
35+
- name: Run Ruff format
36+
run: uv ruff format --check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build/
55
dist/
66
wheels/
77
*.egg-info
8+
.ruff-cache/
89

910
# Virtual environments
1011
.venv

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</a>
1010
<br>
1111

12-
> [!IMPORTANT]
12+
> [!IMPORTANT]
1313
> :test_tube: This project is experimental and could be subject to breaking changes.
1414
1515
# Polygon.io MCP Server
@@ -65,7 +65,7 @@ You can also run `claude mcp add-from-claude-desktop` if the MCP server is insta
6565
### Claude Desktop
6666

6767
1. Follow the [Claude Desktop MCP installation instructions](https://modelcontextprotocol.io/quickstart/user) to complete the initial installation and find your configuration file.
68-
1. Use the following example as reference to add Polygon's MCP server.
68+
1. Use the following example as reference to add Polygon's MCP server.
6969
Make sure you complete the various fields.
7070
1. Path find your path to `uvx`, run `which uvx` in your terminal.
7171
2. Replace `<your_api_key_here>` with your actual Polygon.io API key.
@@ -181,15 +181,25 @@ npx @modelcontextprotocol/inspector uv --directory /path/to/mcp_polygon run mcp_
181181

182182
This will launch a browser interface where you can interact with your MCP server directly and see input/output for each tool.
183183

184+
### Code Linting
185+
186+
This project uses [just](https://github.com/casey/just) for common development tasks. To lint your code before submitting a PR:
187+
188+
```bash
189+
just lint
190+
```
191+
192+
This will run `ruff format` and `ruff check --fix` to automatically format your code and fix linting issues.
193+
184194
## Links
185195
- [Polygon.io Documentation](https://polygon.io/docs?utm_campaign=mcp&utm_medium=referral&utm_source=github)
186196
- [Model Context Protocol](https://modelcontextprotocol.io)
187197
- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)
188198

189199
## Contributing
190-
If you found a bug or have an idea for a new feature, please first discuss it with us by submitting a new issue.
191-
We will respond to issues within at most 3 weeks.
192-
We're also open to volunteers if you want to submit a PR for any open issues but please discuss it with us beforehand.
200+
If you found a bug or have an idea for a new feature, please first discuss it with us by submitting a new issue.
201+
We will respond to issues within at most 3 weeks.
202+
We're also open to volunteers if you want to submit a PR for any open issues but please discuss it with us beforehand.
193203
PRs that aren't linked to an existing issue or discussed with us ahead of time will generally be declined.
194204

195205
<!----------------------------------------------------------------------------->

justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lint:
2+
uv run ruff format
3+
uv run ruff check --fix

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@ email = "[email protected]"
1616
requires = [ "hatchling",]
1717
build-backend = "hatchling.build"
1818

19+
[dependency-groups]
20+
dev = [
21+
"ruff>=0.12.4",
22+
]
23+
1924
[project.scripts]
2025
mcp_polygon = "mcp_polygon:run"

uv.lock

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)