Skip to content

Commit

Permalink
feat: dynamically add docstring examples when building docs and reduc…
Browse files Browse the repository at this point in the history
…e package size by 40%
  • Loading branch information
MarcoGorelli committed Jan 11, 2025
1 parent f1b9fd9 commit 355088f
Show file tree
Hide file tree
Showing 46 changed files with 16,352 additions and 17,959 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ jobs:
# hopefully temporary until https://github.com/mkdocstrings/mkdocstrings/issues/716
run: pip install git+https://github.com/MarcoGorelli/griffe.git@no-overloads
- run: pip install -e .[docs]
- name: insert-docstrings
run: git ls-files narwhals | xargs python utils/add_docstring_examples.py

- run: mkdocs gh-deploy --force
5 changes: 5 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ jobs:
if: matrix.python-version == '3.11'
- name: show-deps
run: uv pip freeze
- name: insert-docstrings
run: |
du -c --apparent-size $(git ls-files) | grep total$
git ls-files narwhals | xargs python utils/add_docstring_examples.py
du -c --apparent-size $(git ls-files) | grep total$
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=100 --runslow --all-cpu-constructors
- name: Run doctests
Expand Down
Loading

0 comments on commit 355088f

Please sign in to comment.