-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create action.yml * coverage action * coverage test * coverage test * coverage test * coverage test * coverage test * book * book * book * Update book.yml * constructing the book * constructing the book * constructing the book * constructing the book * constructing the book * constructing the book * constructing the book * constructing the book * notebook demo * constructing the book * constructing the book * constructing the book
- Loading branch information
Showing
15 changed files
with
272 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Build book" | ||
|
||
on: | ||
push | ||
#: | ||
#branches: | ||
# - main | ||
|
||
|
||
jobs: | ||
#runs-on: ubuntu-latest | ||
|
||
# steps: | ||
#sphinx: | ||
# runs-on: "ubuntu-latest" | ||
# steps: | ||
# - uses: cvxgrp/.github/actions/sphinx@main | ||
pdoc: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./actions/pdoc | ||
|
||
test: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./actions/coverage | ||
|
||
jupyter: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./actions/jupyter | ||
|
||
book: | ||
runs-on: "ubuntu-latest" | ||
needs: [test, pdoc, jupyter] | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./actions/book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: coverage | ||
|
||
on: | ||
[push] | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./actions/coverage | ||
with: | ||
source-folder: "cvx" | ||
|
||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
files: artifacts/tests/coverage/coverage.info | ||
format: lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
[push] | ||
|
||
jobs: | ||
run-deptry: | ||
run-coverage-analysis: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.idea | ||
.venv | ||
|
||
.ipynb_checkpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 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: Measure test coverage | ||
|
||
description: "Test for coverage" | ||
|
||
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@main | ||
|
||
- name: Test on Linux | ||
shell: bash | ||
run: | | ||
poetry run pip install --no-cache-dir \ | ||
pytest-cov \ | ||
pytest-html \ | ||
pytest-random-order | ||
poetry run pytest --cov=${{ inputs.source-folder || 'cvx' }} --random-order --verbose \ | ||
--html=artifacts/tests/html-report/report.html \ | ||
--cov-report term \ | ||
--cov-report xml:artifacts/tests/coverage/coverage.xml \ | ||
--cov-report json:artifacts/tests/coverage/coverage.json \ | ||
--cov-report lcov:artifacts/tests/coverage/coverage.info \ | ||
--cov-report html:artifacts/tests/html-coverage \ | ||
tests/ | ||
# I want to upload the result to gh-pages, hence this file disturbs | ||
rm -f artifacts/tests/html-coverage/.gitignore | ||
- name: Archive tests results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tests_coverage | ||
path: artifacts/tests | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Book settings | ||
# Learn more at https://jupyterbook.org/customize/config.html | ||
|
||
title: .github | ||
author: Thomas Schmelzer | ||
only_build_toc_files: true | ||
|
||
execute: | ||
execute_notebooks: force | ||
timeout: 240 | ||
|
||
parse: | ||
myst_enable_extensions: | ||
- linkify | ||
- dollarmath | ||
|
||
# needed for plotly | ||
sphinx: | ||
config: | ||
html_js_files: | ||
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js | ||
|
||
# Information about where the book exists on the web | ||
repository: | ||
url: https://github.com/cvxgrp/.github | ||
path_to_book: book | ||
branch: main | ||
|
||
# Add GitHub buttons to your book | ||
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository | ||
html: | ||
use_issues_button: true | ||
use_repository_button: true | ||
extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a> # Will be displayed underneath the left navbar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Table of contents | ||
# Learn more at https://jupyterbook.org/customize/toc.html | ||
format: jb-book | ||
root: docs/index | ||
chapters: | ||
- file: docs/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Index |
43 changes: 43 additions & 0 deletions
43
book/docs/notebooks/.ipynb_checkpoints/demo-checkpoint.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8a634d3c-32ff-47c0-a8fd-68b6a29b5fe7", | ||
"metadata": {}, | ||
"source": [ | ||
"# Demo" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "aa5c8a21-6f51-4d36-a437-91702b65111c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"1 + 1" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8a634d3c-32ff-47c0-a8fd-68b6a29b5fe7", | ||
"metadata": {}, | ||
"source": [ | ||
"# Demo" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "aa5c8a21-6f51-4d36-a437-91702b65111c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"1 + 1" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |