An MCP service for building queries against SDSS catalogs.
Project description
SSEC-JHU <package_name>
Based on https://github.com/nicknochnack/BuildMCPServer
Base repo template to be used by all others.
Things to do when using this template:
- Run
python project_setup.py - Uncomment above DOI in README.md and correct
<insert_ID_number>. - Correct "description" field in .zenodo.json to reflect description of child repo.
- Correct the
CI Statusbadge with the correct token in the URL. - Import package into https://readthedocs.org/.
- Update zenodo.json. For more details see zenodo.json docs and zenodo docs on contributors vs creators.
- Update quickstart guide below.
What's included in this template:
- Licence file
- Code of Conduct
- Build & Setup, inc.
pipdependency requirements. - Dependabot GitHub action
- CI for GitHub actions: lint, pytest, build & publish docker image to GitHub Packages.
- Dockerfile.
- Pytest example(s).
- Githooks.
Quickstart Guide
Add here, streamlined instructions on how to get the code running as swiftly as possible, and provide usage example(s).
This shouldn't attempt to cover all OS's and/or build variations - just the canonical. Since users are most likely
viewing this README from GitHub.com, assuming a repo context might be best, where instructions look like those below.
Alternatively, if this package is distributed on PyPi, perhaps just pip install <package-name>, followed by quick
user instructions, will suffice.
git clone https://github.com/ssec-jhu/base-templateconda create -n package_name python pipconda activate package_namepip pinstall -e .- Add user instructions.
Installation, Build, & Run instructions
Conda:
For additional cmds see the Conda cheat-sheet.
- Download and install either miniconda or anaconda.
- Create new environment (env) and install
conda create -n <environment_name> - Activate/switch to new env
conda activate <environment_name> cdinto repo dir.- Install
pythonandpipconda install python=3.11 pip - Install all required dependencies (assuming local dev work), there are two ways to do this
- If working with tox (recommended)
pip install -r requirements/dev.txt. - If you would like to setup an environment with all requirements to run outside of tox
pip install -r requirements/all.txt.
- If working with tox (recommended)
Build:
with Docker:
- Download & install Docker - see Docker install docs.
cdinto repo dir.- Build image:
docker build -t <image_name> .
with Python ecosystem:
cdinto repo dir.conda activate <environment_name>- Build and install package in <environment_name> conda env:
pip install . - Do the same but in dev/editable mode (changes to repo will be reflected in env installation upon python kernel restart)
NOTE: This is the preferred installation method for dev work.
pip install -e .. NOTE: If you didn't install dependencies fromrequirements/dev.txt, you can install a looser constrained set of deps using:pip install -e .[dev].
Run
with Docker:
- Follow the above Build with Docker instructions.
- Run container from image:
docker run -d -p 8000:8000 <image_name>. NOTE:-p 8000:8000is specific to the example application using port 8000. - Alternatively, images can be pulled from
ghcr.io/ssec-jhu/e.g.,docker pull ghcr.io/ssec-jhu/base-template:pr-1.
with Python ecosystem:
- Follow the above Build with Python ecosystem instructions.
- Run
uvicorn package_name.app.main:app --host 0.0.0.0 --port", "8000. NOTE: This is just an example and is obviously application dependent.
Usage:
To be completed by child repo.
Testing
NOTE: The following steps require pip install -r requirements/dev.txt.
Using tox
- Run tox
tox. This will run all of linting, security, test, docs and package building within tox virtual environments. - To run an individual step, use
tox -e {step}for example,tox -e test,tox -e build-docs, etc.
Typically, the CI tests run in github actions will use tox to run as above. See also ci.yml.
Outside of tox:
The below assume you are running steps without tox, and that all requirements are installed into a conda environment, e.g. with pip install -r requirements/all.txt.
NOTE: Tox will run these for you, this is specifically if there is a requirement to setup environment and run these outside the purview of tox.
Linting:
Facilitates in testing typos, syntax, style, and other simple code analysis tests.
cdinto repo dir.- Switch/activate correct environment:
conda activate <environment_name> - Run
ruff . - This can be automatically run (recommended for devs) every time you
git pushby installing the providedpre-pushgit hook available in./githooks. Instructions are in that file - justcp ./githooks/pre-push .git/hooks/;chmod +x .git/hooks/pre-push.
Security Checks:
Facilitates in checking for security concerns using Bandit.
cdinto repo dir.bandit --severity-level=medium -r package_name
Unit Tests:
Facilitates in testing core package functionality at a modular level.
cdinto repo dir.- Run all available tests:
pytest . - Run specific test:
pytest tests/test_util.py::test_base_dummy.
Regression tests:
Facilitates in testing whether core data results differ during development.
- WIP
Smoke Tests:
Facilitates in testing at the application and infrastructure level.
- WIP
Build Docs:
Facilitates in building, testing & viewing the docs.
cdinto repo dir.pip install -r requirements/docs.txtcd docsmake cleanmake html- To view the docs in your default browser run
open docs/_build/html/index.html.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cas_sdss_mcp-0.2.0.tar.gz.
File metadata
- Download URL: cas_sdss_mcp-0.2.0.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
959ba15407e271a3cc23ed5d8091cf6ae4c1b98733adfff3cdb57e5537637dca
|
|
| MD5 |
486a18aa0c279eb15ffc0715995e98d0
|
|
| BLAKE2b-256 |
916f94fdace265647df0023fec7b862b96a060a551e837bf863b13e0d0b6dfd6
|
Provenance
The following attestation bundles were made for cas_sdss_mcp-0.2.0.tar.gz:
Publisher:
dist.yml on sciserver/cas-jobs-sdss-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cas_sdss_mcp-0.2.0.tar.gz -
Subject digest:
959ba15407e271a3cc23ed5d8091cf6ae4c1b98733adfff3cdb57e5537637dca - Sigstore transparency entry: 705372523
- Sigstore integration time:
-
Permalink:
sciserver/cas-jobs-sdss-mcp@0092b7ea33e5c71d63c3ba42f69cc5d87ceae410 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sciserver
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
dist.yml@0092b7ea33e5c71d63c3ba42f69cc5d87ceae410 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cas_sdss_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cas_sdss_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 494.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd011c0f732152d730456ce685b8357c9573f58e60c379cc2e9c21b5082c16f9
|
|
| MD5 |
6fe0204f553e07ce3f899315660635c3
|
|
| BLAKE2b-256 |
871928bffb3dc8997b2dafb693a6c0a7f72e33587e0a4a796b8e77a0c8bd21c2
|
Provenance
The following attestation bundles were made for cas_sdss_mcp-0.2.0-py3-none-any.whl:
Publisher:
dist.yml on sciserver/cas-jobs-sdss-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cas_sdss_mcp-0.2.0-py3-none-any.whl -
Subject digest:
bd011c0f732152d730456ce685b8357c9573f58e60c379cc2e9c21b5082c16f9 - Sigstore transparency entry: 705372525
- Sigstore integration time:
-
Permalink:
sciserver/cas-jobs-sdss-mcp@0092b7ea33e5c71d63c3ba42f69cc5d87ceae410 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sciserver
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
dist.yml@0092b7ea33e5c71d63c3ba42f69cc5d87ceae410 -
Trigger Event:
release
-
Statement type: