Skip to content

Commit

Permalink
ci: fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Oct 7, 2024
1 parent e002838 commit 918a221
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 20 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.9"
# cache: 'pip'

- run: echo WEEK=$(date +%V) >>$GITHUB_ENV
shell: bash

- uses: hynek/setup-cached-uv@v1
with:
cache-suffix: -docs-${{ matrix.python-version }}-${{ env.WEEK }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
uv venv
uv pip install '.[docs]'
- name: Set up Git
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Build documentation
run: |
git fetch origin gh-pages
source .venv/bin/activate
mike delete $BRANCH_NAME
mike deploy --push $BRANCH_NAME
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
uv venv
pip install poetry
source .venv/bin/activate
uv pip install -e '.[dev,setup]' pytest-xdist pip
uv pip install -e '.[dev,setup]' pytest-xdist pip --extra-index-url=https://download.pytorch.org/whl/cpu
- name: Test with Pytest on Python ${{ matrix.python-version }}
env:
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Install dependencies
run: |
uv venv
uv pip install '.[dev]'
uv pip install '.[docs]' --extra-index-url=https://download.pytorch.org/whl/cpu
- name: Build documentation
run: |
Expand Down Expand Up @@ -159,4 +159,4 @@ jobs:
- name: Install library
run: |
uv venv
uv pip install .
uv pip install . --extra-index-url=https://download.pytorch.org/whl/cpu
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install : .venv

documentation: .venv
. .venv/bin/activate
pip install -e '.[dev]'
pip install -e '.[docs]'
mkdocs serve

test: .venv
Expand Down
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ We use `MkDocs` for EDS-NLP's documentation. You can checkout the changes you ma

```console
# Install the requirements
$ pip install -e '.[dev]'
$ pip install -e '.[docs]'
---> 100%
color:green Installation successful

Expand Down
41 changes: 29 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,39 @@ dev = [
"pre-commit>=2.21.0; python_version>='3.8'",
"pytest>=7.1.0",
"pytest-cov>=3.0.0",
"polars",

# Distributed inference
# Data libs
"koalas>=1.8.1; python_version<'3.8'",
"pyspark",
"polars",

# Machine Learning
"rich-logger>=0.3.1",
"torch>=1.13.0",
"foldedtensor>=0.3.2",
"safetensors>=0.3.0",
"transformers>=4.0.0,<5.0.0",
"accelerate>=0.20.3,<1.0.0",
"mlconjug3<3.9.0",
"scikit-learn>=1.0.0",

# Docs
# Docs (same as docs group)
"mike~=1.1.2",
"mkdocs-charts-plugin==0.0.8",
"mkdocs-img2fig-plugin==0.9.3",
"mkdocs-material~=9.2.0",
"mkdocs-section-index==0.3.4",
"mkdocs~=1.5.2",
"mkdocstrings~=0.20",
"mkdocstrings-python~=1.1",
"mkdocs-minify-plugin",
"mkdocs-redirects>=1.2.1;python_version>='3.8'",
"pybtex~=0.24.0",
"pathspec>=0.11.1", # required by vendored mkdocs-autorefs PR
"astunparse",
"griffe<0.39",
]
docs = [
"mike~=1.1.2",
"mkdocs-charts-plugin==0.0.8",
"mkdocs-img2fig-plugin==0.9.3",
Expand All @@ -61,17 +87,8 @@ dev = [
"pybtex~=0.24.0",
"pathspec>=0.11.1", # required by vendored mkdocs-autorefs PR
"astunparse",
"mlconjug3<3.9.0",
"griffe<0.39",

# Machine Learning
"rich-logger>=0.3.1",
"torch>=1.13.0",
"foldedtensor>=0.3.2",
"safetensors>=0.3.0",
"transformers>=4.0.0,<5.0.0",
"accelerate>=0.20.3,<1.0.0",
"scikit-learn>=1.0.0",
]
setup = [
"typer"
Expand Down

0 comments on commit 918a221

Please sign in to comment.