Skip to content

Commit 95da59a

Browse files
authored
Merge pull request #20 from shrug-labs/rigebha/publish
Welcome to OCI to the repo : add OCI MCP servers
2 parents 678141d + f1a7fb8 commit 95da59a

File tree

147 files changed

+35721
-9
lines changed

Some content is hidden

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

147 files changed

+35721
-9
lines changed

.github/workflows/build.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Matrix Build
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
pull_request:
7+
branches:
8+
- "main"
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
needs: get-directories
13+
strategy:
14+
matrix:
15+
directory: ${{ fromJson(needs.get-directories.outputs.directories) }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.13'
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
27+
with:
28+
version: "0.8.19"
29+
30+
- name: Install tomlq
31+
run: pip install tomlq
32+
33+
- name: Update __init__.py
34+
working-directory: src/${{ matrix.directory }}
35+
run: |
36+
name=$(uv run tomlq -r '.project.name' pyproject.toml)
37+
version=$(uv run tomlq -r '.project.version' pyproject.toml)
38+
if [ -d oracle/*_mcp_server ]; then
39+
init_py_file=oracle/*_mcp_server/__init__.py
40+
echo "\"\"\"\nCopyright (c) 2025, Oracle and/or its affiliates.\nLicensed under the Universal Permissive License v1.0 as shown at\nhttps://oss.oracle.com/licenses/upl.\n\"\"\"\n" > $$init_py_file; \
41+
echo "__project__ = \"$name\"" >> $init_py_file
42+
echo "__version__ = \"$version\"" >> $init_py_file
43+
fi
44+
45+
- name: Sync
46+
working-directory: src/${{ matrix.directory }}
47+
run: uv sync --locked --all-extras --dev
48+
49+
- name: Test
50+
working-directory: src/${{ matrix.directory }}
51+
run: uv run pytest
52+
53+
- name: Build
54+
working-directory: src/${{ matrix.directory }}
55+
run: uv build
56+
57+
- name: Test install
58+
working-directory: src/${{ matrix.directory }}
59+
run: uv pip install .
60+
61+
62+
get-directories:
63+
runs-on: ubuntu-latest
64+
outputs:
65+
directories: ${{ steps.get-directories.outputs.directories }}
66+
steps:
67+
- name: Checkout code
68+
uses: actions/checkout@v4
69+
70+
- name: Get directories
71+
id: get-directories
72+
run: |
73+
directories=$(ls src | grep -v dbtools-mcp-server | grep -v mysql-mcp-server | grep -v oci-pricing-mcp-server | jq -R -s -c 'split("\n")[:-1]')
74+
echo "directories=$directories" >> $GITHUB_OUTPUT

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
pull_request:
7+
branches:
8+
- "main"
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
python -m pip install -r requirements-dev.txt
22+
- name: Test with tox
23+
run: |
24+
tox run -e lint

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__pycache__/
1+
**/__pycache__/**
22

33
# Virtual environment
44
venv/
@@ -9,3 +9,6 @@ env/
99
env.bak/
1010
venv.bak/
1111

12+
13+
# test environments
14+
.env

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <[email protected]>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
*Detailed instructions on how to contribute to the project, if applicable. Must include section about Oracle Contributor Agreement with link and instructions*
2+
13
# Contributing to this repository
24

35
We welcome your contributions! There are multiple ways to contribute.
@@ -35,14 +37,14 @@ can be accepted.
3537

3638
1. Ensure there is an issue created to track and discuss the fix or enhancement
3739
you intend to submit.
38-
1. Fork this repository
39-
1. Create a branch in your fork to implement the changes. We recommend using
40-
the issue number as part of your branch name, e.g. `1234-fixes`
41-
1. Ensure that any documentation is updated with the changes that are required
40+
2. Fork this repository.
41+
3. Create a branch in your fork to implement the changes. We recommend using
42+
the issue number as part of your branch name, e.g. `1234-fixes`.
43+
4. Ensure that any documentation is updated with the changes that are required
4244
by your change.
43-
1. Ensure that any samples are updated if the base image has been changed.
44-
1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
45-
what your changes are meant to do and provide simple steps on how to validate
45+
5. Ensure that any samples are updated if the base image has been changed.
46+
6. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
47+
what your changes are meant to do and provide simple steps on how to validate.
4648
your changes. Ensure that you reference the issue you created as well.
4749
1. We will assign the pull request to 2-3 people for review before it is merged.
4850

@@ -52,4 +54,4 @@ Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd
5254
like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC].
5355

5456
[OCA]: https://oca.opensource.oracle.com
55-
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
57+
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/

Makefile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
SUBDIRS := $(wildcard src/*)
2+
3+
.PHONY: test format
4+
5+
build:
6+
@for dir in $(SUBDIRS); do \
7+
if [ -f $$dir/pyproject.toml ]; then \
8+
echo "Building $$dir"; \
9+
name=$$(uv run tomlq -r '.project.name' $$dir/pyproject.toml); \
10+
version=$$(uv run tomlq -r '.project.version' $$dir/pyproject.toml); \
11+
if [ -d $$dir/oracle/*_mcp_server ]; then \
12+
init_py_file=$$(echo $$dir/oracle/*_mcp_server/__init__.py); \
13+
echo "\"\"\"\nCopyright (c) 2025, Oracle and/or its affiliates.\nLicensed under the Universal Permissive License v1.0 as shown at\nhttps://oss.oracle.com/licenses/upl.\n\"\"\"\n" > $$init_py_file; \
14+
echo "__project__ = \"$$name\"" >> $$init_py_file; \
15+
echo "__version__ = \"$$version\"" >> $$init_py_file; \
16+
fi; \
17+
cd $$dir && uv build && cd ../..; \
18+
fi \
19+
done
20+
21+
install:
22+
@for dir in $(SUBDIRS); do \
23+
if [ -f $$dir/pyproject.toml ]; then \
24+
echo "Installing $$dir"; \
25+
cd $$dir && uv pip install . && cd ../..; \
26+
fi \
27+
done
28+
29+
sync:
30+
@for dir in $(SUBDIRS); do \
31+
if [ -f $$dir/pyproject.toml ]; then \
32+
echo "Installing $$dir"; \
33+
cd $$dir && uv sync --locked --all-extras --dev && cd ../..; \
34+
fi \
35+
done
36+
37+
lock:
38+
@for dir in $(SUBDIRS); do \
39+
if [ -f $$dir/pyproject.toml ]; then \
40+
echo "Installing $$dir"; \
41+
cd $$dir && uv lock && cd ../..; \
42+
fi \
43+
done
44+
45+
test:
46+
uv tool run --from 'tox==4.30.2' tox -e lint
47+
@for dir in $(SUBDIRS); do \
48+
if [ -f $$dir/pyproject.toml ]; then \
49+
echo "Testing $$dir"; \
50+
cd $$dir && uv run pytest && cd ../..; \
51+
fi \
52+
done
53+
54+
format:
55+
uv tool run --from 'tox==4.30.2' tox -e format
56+
57+
e2e-tests: build install
58+
behave tests/e2e/features && cd ..

0 commit comments

Comments
 (0)