|
| 1 | +========================= |
| 2 | +LLM-Assistant Integration |
| 3 | +========================= |
| 4 | + |
| 5 | +When using LLM coding assistants (e.g. `Claude Code <https://code.claude.com>`_) for development or usage of this package, please see some tips and tricks here. |
| 6 | + |
| 7 | +Docs on Context7 |
| 8 | +---------------- |
| 9 | + |
| 10 | +ML-PEG documentation is indexed on `Context7 <https://context7.com>`_, which supplies up-to-date parsed documentation for the package as an MCP server. |
| 11 | + |
| 12 | +**Library ID**: ``/ddmms/ml-peg`` |
| 13 | + |
| 14 | +Getting started |
| 15 | ++++++++++++++++ |
| 16 | + |
| 17 | +Install the MCP server, e.g. for Claude Code: |
| 18 | + |
| 19 | +.. code-block:: text |
| 20 | +
|
| 21 | + claude mcp add context7 -- npx -y @upstash/context7-mcp |
| 22 | +
|
| 23 | +See `installation instructions <https://github.com/upstash/context7#installation>`_ for other tools as well. |
| 24 | + |
| 25 | +Afterwards can ask the agent to load the library, or you can add this to your agent's standard instructions, e.g. `CLAUDE.md` file. |
| 26 | + |
| 27 | +.. code-block:: text |
| 28 | +
|
| 29 | + @context7 load library /ddmms/ml-peg |
| 30 | +
|
| 31 | +Claude Code will use the ``/ddmms/ml-peg`` library ID to fetch relevant documentation and code examples. |
| 32 | + |
| 33 | +Common Use Cases |
| 34 | +++++++++++++++++ |
| 35 | + |
| 36 | +Asking to query the documentation directly: |
| 37 | + |
| 38 | +.. code-block:: text |
| 39 | +
|
| 40 | + @context7 How do I add a new benchmark calculation script? |
| 41 | +
|
| 42 | +Asking about further specifics: |
| 43 | + |
| 44 | +.. code-block:: text |
| 45 | +
|
| 46 | + How do I structure a calculation script using pytest parametrization? use context7 |
| 47 | +
|
| 48 | +Related Documentation |
| 49 | +--------------------- |
| 50 | + |
| 51 | +For related libraries on Context7: |
| 52 | + |
| 53 | +- **mlipx** (``/basf/mlipx``): Base calculator abstraction library used by ML-PEG |
| 54 | +- **janus-core** (``/stfc/janus-core``: another back-end for ML-PEG |
| 55 | + |
| 56 | + |
| 57 | +API Keys and Rate Limits |
| 58 | +------------------------- |
| 59 | + |
| 60 | +Context7 provides free access with rate limits at the time of writing. |
| 61 | +For higher rate limits and being able to submit new documentation sources to index: |
| 62 | + |
| 63 | +1. Visit https://context7.com |
| 64 | +2. Create an account |
| 65 | +3. Generate an API key from the dashboard |
| 66 | +4. Configure your AI assistant with the API key |
| 67 | + |
| 68 | +.. note:: |
| 69 | + |
| 70 | + ML-PEG is a public repository and does not require an API key for basic usage through Context7. |
| 71 | + |
| 72 | +Keeping Documentation Updated |
| 73 | +----------------------------- |
| 74 | + |
| 75 | +The ML-PEG library on Context7 is automatically updated when changes are pushed to the main branch. Documentation typically updates within 24 hours of changes being merged. If you notice outdated information you can click to refresh on the site, `you need to log in to do this`. |
| 76 | + |
| 77 | +.. tip:: |
| 78 | + |
| 79 | + When contributing new benchmarks or features, ensure your docstrings and documentation updates are merged to main before using Context7 to help others understand your additions. |
0 commit comments