Skip to content

Commit

Permalink
test for Python code
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Jun 9, 2024
1 parent 2fdd147 commit 2bd3afb
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 55 deletions.
10 changes: 1 addition & 9 deletions actions/deptry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ description: "Perform Deptry"
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
type: string
required: false
default: '3.11'
source-folder:
description: 'Source folder'
type: string
Expand All @@ -33,14 +28,11 @@ runs:
using: "composite"
steps:
- uses: cvxgrp/.github/actions/setup-environment@main
with:
python-version: ${{ inputs.python-version || '3.11' }}

- name: Install deptry
shell: bash
run: |
poetry run pip install --no-cache-dir \
deptry
poetry run pip install --no-cache-dir deptry
- name: Run deptry
shell: bash
Expand Down
7 changes: 0 additions & 7 deletions actions/docstr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ description: "Analyse docstrings"
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
type: string
required: false
default: '3.11'
source-folder:
description: 'Source folder'
type: string
Expand All @@ -33,8 +28,6 @@ runs:
using: "composite"
steps:
- uses: cvxgrp/.github/actions/setup-environment@main
with:
python-version: ${{ inputs.python-version || '3.11' }}

- name: Install pytest
shell: bash
Expand Down
7 changes: 0 additions & 7 deletions actions/jupyter/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ description: "Build jupyter book"
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
type: string
required: false
default: '3.11'
kernel:
description: 'Jupyter kernel'
type: string
Expand All @@ -37,8 +32,6 @@ runs:
# uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/setup-environment@main
with:
python-version: ${{ inputs.python-version || '3.11' }}

- name: Install jupyterbook
shell: bash
Expand Down
7 changes: 0 additions & 7 deletions actions/pdoc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ description: "Build pdoc documentation"
on:
workflow_call:
inputs:
#python-version:
# description: 'Python version'
# type: string
# required: false
# default: '3.11'
source-folder:
description: 'Source folder'
type: string
Expand All @@ -38,8 +33,6 @@ runs:

steps:
- uses: cvxgrp/.github/actions/setup-environment@main
#with:
# python-version: ${{ inputs.python-version || '3.10' }}

- name: Install pdoc
shell: bash
Expand Down
11 changes: 0 additions & 11 deletions actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,11 @@ name: Release

description: "Release with poetry"

on:
workflow_call:
inputs:
python-version:
description: 'Python version'
type: string
required: false
default: '3.11'

runs:
using: "composite"

steps:
- uses: cvxgrp/.github/actions/setup-environment@main
with:
python-version: "${{ inputs.python-version || '3.11' }}"

- name: Change version in pyproject.toml
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
uses: actions/setup-python@v5
with:
# Why is this not automatically happen?
python-version: ${{ inputs.python-version || '3.10' }}
python-version: ${{ inputs.python-version || '3.11' }}

- name: Install Poetry
uses: snok/install-poetry@v1
Expand Down
7 changes: 0 additions & 7 deletions actions/sphinx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ description: "Build sphinx documentation"
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
type: string
required: false
default: '3.10'
sphinx-folder:
description: 'Sphinx folder'
type: string
Expand All @@ -34,8 +29,6 @@ runs:

steps:
- uses: cvxgrp/.github/actions/setup-environment@main
with:
python-version: ${{ inputs.python-version || '3.10' }}

- name: Install sphinx
shell: bash
Expand Down
9 changes: 3 additions & 6 deletions tests/python/test_trivial.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from cvx.dog import Dog


def test_trivial():
assert True


def test_dog():
dog = Dog(name="Peter Maffay")
assert dog.name == "Peter Maffay"
# def test_dog():
# dog = Dog(name="Peter Maffay")
# assert dog.name == "Peter Maffay"

0 comments on commit 2bd3afb

Please sign in to comment.