Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ updates:
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- package-ecosystem: "pip"
directory: "/packages/auth0-ai-fastmcp"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
required: true
options:
- auth0-ai-mcp
- auth0-ai-fastmcp

permissions:
contents: read
Expand Down
81 changes: 80 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,54 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
changes:
name: changes
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.pick.outputs.packages }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Pick packages to test
id: pick
env:
EVENT: ${{ github.event_name }}
run: |
mcp=false
fast=false
if [ "$EVENT" != "pull_request" ]; then
mcp=true
fast=true
else
# Parent 1 of the PR merge commit is the live base, unlike the stale base sha in the event
files=$(git -c core.quotePath=false diff --no-renames --name-only HEAD^1 HEAD)
while read -r file; do
case "$file" in
.github/workflows/test.yml) mcp=true; fast=true ;;
packages/auth0-ai-mcp/*) mcp=true; fast=true ;;
packages/auth0-ai-fastmcp/*) fast=true ;;
esac
done <<< "$files"
fi
list=()
[ "$mcp" = true ] && list+=('"packages/auth0-ai-mcp"')
[ "$fast" = true ] && list+=('"packages/auth0-ai-fastmcp"')
echo "packages=[$(IFS=,; echo "${list[*]}")]" >> "$GITHUB_OUTPUT"

test:
name: test (${{ matrix.package }}, py${{ matrix.python-version }})
needs: changes
if: needs.changes.outputs.packages != '[]'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.package }}
strategy:
matrix:
package: [packages/auth0-ai-mcp]
package: ${{ fromJSON(needs.changes.outputs.packages) }}
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
Expand Down Expand Up @@ -67,3 +106,43 @@ jobs:
- name: Run ruff linting
run: |
poetry run ruff check .

test-latest-fastmcp:
name: test (auth0-ai-fastmcp, newest FastMCP)
needs: changes
if: contains(needs.changes.outputs.packages, 'auth0-ai-fastmcp')
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/auth0-ai-fastmcp

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.14"

- name: Install Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
with:
version: "2.4.1"
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install the newest FastMCP the version range allows
run: |
poetry install --no-interaction --no-root
poetry update fastmcp --no-interaction
poetry install --no-interaction

- name: Run tests with pytest
run: |
poetry run pytest -v

- name: Run ruff linting
run: |
poetry run ruff check .
30 changes: 30 additions & 0 deletions packages/auth0-ai-fastmcp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

#Environments
.env
.venv
.venv-*
env/

#Session Cache
.sessions_cache
.DS_Store

#Build files
dist

#Test and lint caches
.pytest_cache/
.ruff_cache/
.coverage
coverage.xml

# IDE
.idea/

# AI Tools
.claude/
21 changes: 21 additions & 0 deletions packages/auth0-ai-fastmcp/.ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
line-length = 100
target-version = "py310"

[lint]
preview = true
explicit-preview-rules = true # only the preview rules selected below, such as PLC0415
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"S", # bandit (security)
"PLC0415", # import outside top level
]
ignore = ["E501", "B904"] # Line too long, Exception handling without from

[lint.per-file-ignores]
"tests/*" = ["S101", "S105", "S106"] # Allow assert and ignore hardcoded password warnings in test files
7 changes: 7 additions & 0 deletions packages/auth0-ai-fastmcp/.shiprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files": {
".version": [],
"pyproject.toml": ["version = \"{MAJOR}.{MINOR}.{PATCH}{PRERELEASE_LABEL}{PRERELEASE_COUNTER}\""]
},
"prefixVersion": false
}
17 changes: 17 additions & 0 deletions packages/auth0-ai-fastmcp/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.12.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
"snyk:lic:pip:certifi:MPL-2.0":
- '*':
reason: "Accepting certifi's MPL-2.0 license for now"
expires: "2030-12-31T23:59:59Z"
"snyk:lic:pip:jwcrypto:LGPL-3.0":
- '*':
reason: "Accepting jwcrypto's LGPL-3.0 license for now"
expires: "2030-12-31T23:59:59Z"
"snyk:lic:pip:cffi:Unknown":
- '*':
reason: "Accepting the Unknown license for now"
expires: "2030-12-31T23:59:59Z"
patch: {}
1 change: 1 addition & 0 deletions packages/auth0-ai-fastmcp/.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0b0
1 change: 1 addition & 0 deletions packages/auth0-ai-fastmcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Change Log
31 changes: 31 additions & 0 deletions packages/auth0-ai-fastmcp/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Contribution

Please read [Auth0's contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md).

## Environment setup

- Python 3.10 or newer and Poetry
- Run `poetry install` to install dependencies
- Follow the local development steps below to get started

## Local development

- `poetry install`: install dependencies
- `poetry run pytest`: run unit tests
- `poetry run ruff check .`: check code style and lint errors
- `poetry build`: build the package

## Testing

### Adding tests

Every change should be accompanied by a test.

### Running tests

Run unit tests and the linter before opening a PR:

```bash
poetry run pytest
poetry run ruff check .
```
Loading
Loading