Skip to content

Add comprehensive API documentation with GitHub Pages deployment#14

Merged
rinziv merged 6 commits into
mainfrom
copilot/create-documentation-gh-pages
Nov 26, 2025
Merged

Add comprehensive API documentation with GitHub Pages deployment#14
rinziv merged 6 commits into
mainfrom
copilot/create-documentation-gh-pages

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 26, 2025

Adds Google-style docstrings to all modules in src/xailib and configures GitHub Actions to automatically build and deploy Sphinx documentation to GitHub Pages.

Changes

Documentation

  • Base classes (xailib_base.py, xailib_tabular.py, xailib_image.py, xailib_text.py, xailib_ts.py) - Full docstrings for all abstract base classes
  • Explainers (lime_explainer.py, abele_explainer.py, lasts_explainer.py) - Documented LIME, ABELE, LASTS implementations with usage examples
  • Model wrappers - sklearn, keras, pytorch wrappers with parameter documentation
  • Package __init__.py files - Module-level docstrings with cross-references

GitHub Actions Workflow

  • .github/workflows/docs.yml - Builds Sphinx docs and deploys to GitHub Pages on push to main/master
  • Uses actions/deploy-pages@v4 with proper OIDC permissions

Sphinx Config

  • Added sphinx-autodoc-typehints to docs/requirements.txt

README Updates

  • Updated Quick Start section with accurate API usage examples matching the documented classes
  • Added GitHub Pages documentation link (https://kdd-lab.github.io/XAI-Lib/)
  • Updated Documentation section with details about what's included (API Reference, Examples, Contributing Guide)
  • Updated Text Data section to include LIME for text classification
  • Updated Time Series section to include LASTS explainer

Example

from xailib.explainers.lime_explainer import LimeXAITabularExplainer
from xailib.models.sklearn_classifier_wrapper import sklearn_classifier_wrapper

# Wrap model and create explainer
bb = sklearn_classifier_wrapper(trained_model)
explainer = LimeXAITabularExplainer(bb)
explainer.fit(df, 'target', config={'discretize_continuous': True})

# Generate and visualize explanation
explanation = explainer.explain(instance)
explanation.plot_features_importance()

Post-Merge

Enable GitHub Pages in repo Settings → Pages → Source: "GitHub Actions"

Original prompt

create the documentation of the code in src/xailib.
Configure action to deploy the documentation as gh pages


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 26, 2025 09:19
… Pages workflow

Co-authored-by: rinziv <12544167+rinziv@users.noreply.github.com>
Co-authored-by: rinziv <12544167+rinziv@users.noreply.github.com>
Co-authored-by: rinziv <12544167+rinziv@users.noreply.github.com>
Copilot AI changed the title [WIP] Create documentation for src/xailib and configure deployment Add comprehensive API documentation with GitHub Pages deployment Nov 26, 2025
Copilot AI requested a review from rinziv November 26, 2025 09:30
@rinziv
Copy link
Copy Markdown
Collaborator

rinziv commented Nov 26, 2025

@copilot update also the README.md file accordingly to the documentation produced

…tation link

Co-authored-by: rinziv <12544167+rinziv@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 26, 2025

@copilot update also the README.md file accordingly to the documentation produced

Updated README.rst in commit 06b68e2:

  • Updated Quick Start section with accurate API usage matching the documented classes (LimeXAITabularExplainer, sklearn_classifier_wrapper)
  • Added GitHub Pages documentation link (https://kdd-lab.github.io/XAI-Lib/)
  • Updated Documentation section with details about what's included (API Reference, Examples, Contributing Guide)
  • Updated Text Data section to include LIME for text classification
  • Updated Time Series section to include LASTS explainer

Updated acknowledgments section to clarify the focus of the XAI Project.
@rinziv rinziv marked this pull request as ready for review November 26, 2025 10:05
@rinziv rinziv merged commit 5c1fee3 into main Nov 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants