Skip to content

Commit

Permalink
deptry and sphinx for uv
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Nov 29, 2024
1 parent 8b001a4 commit 69a318b
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
40 changes: 40 additions & 0 deletions actions/uv/deptry/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2023 Stanford University Convex Optimization Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Run Deptry analysis

description: "Perform Deptry"

on:
workflow_call:
inputs:
source-folder:
description: 'Source folder'
type: string
required: false
default: 'cvx'

runs:
using: "composite"
steps:
- uses: cvxgrp/.github/actions/setup-environment-uv@main

- name: Install deptry
shell: bash
run: |
uv pip install --no-cache-dir deptry
- name: Run deptry
shell: bash
run : |
uv run deptry ${{ inputs.source-folder || 'cvx' }}
51 changes: 51 additions & 0 deletions actions/uv/sphinx/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2023 Stanford University Convex Optimization Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build sphinx documentation

description: "Build sphinx documentation"

on:
workflow_call:
inputs:
sphinx-folder:
description: 'Sphinx folder'
type: string
required: false
default: 'book/sphinx'

runs:
using: "composite"

steps:
- uses: cvxgrp/.github/actions/setup-environment-uv@main

- name: Install sphinx
shell: bash
run: |
uv pip install --no-cache-dir \
sphinx==7.2.6 \
sphinx-autoapi \
sphinx-rtd-theme
- name: Build sphinx
shell: bash
run: |
uv run sphinx-build -b html ${{ inputs.sphinx-folder || 'book/sphinx' }} artifacts/sphinx
- name: Archive sphinx documentation
uses: actions/upload-artifact@v4
with:
name: sphinx
path: artifacts/sphinx
retention-days: 1

0 comments on commit 69a318b

Please sign in to comment.