-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Gurobi/gurobi-modelanalyzer
- Loading branch information
Showing
11 changed files
with
274 additions
and
8 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,40 @@ | ||
# Build a universal wheel and store it as an artifact | ||
|
||
name: Build wheel | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-wheel: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install build tools | ||
run: | | ||
python -m pip install --upgrade pip build | ||
- name: Build wheel and sdist | ||
run: | | ||
python -m build | ||
- name: File listing | ||
run: | | ||
ls -R | ||
- name: Archive wheel as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheel-artifact | ||
path: dist/*.whl | ||
- name: Archive sdist as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: sdist-artifact | ||
path: dist/*.tar.gz |
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,35 @@ | ||
# The docs should build without warnings from sphinx | ||
|
||
name: Docs build | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
doc-build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.8"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install tooling | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install docs build dependencies | ||
run: | | ||
python -m pip install -rdocs/requirements.txt | ||
python -m pip install . | ||
- name: Build docs (fail on warnings) | ||
run: | | ||
cd docs | ||
make clean html SPHINXOPTS="-W --keep-going -n" |
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,37 @@ | ||
# Build and upload a wheel. No tests run, this should be | ||
# handled via a larger workflow | ||
|
||
name: Upload wheel to PyPI | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install twine uploader | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install twine | ||
- name: Fetch wheel artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheel-artifact | ||
path: dist | ||
- name: Fetch sdist artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: sdist-artifact | ||
path: dist | ||
- name: File listing | ||
run: ls -R | ||
- name: Publish with twine | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: twine upload -u __token__ -p $PYPI_TOKEN dist/* |
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,21 @@ | ||
# Release workflow. Run basic QA, build the universal wheel and test it on many | ||
# platforms, then publish to pypi | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
unit-tests: | ||
uses: ./.github/workflows/unit-tests.yml | ||
test-wheels: | ||
# test-wheels triggers building of artifacts | ||
uses: ./.github/workflows/test-wheels.yml | ||
needs: [unit-tests] | ||
publish-pypi: | ||
uses: ./.github/workflows/publish-pypi.yml | ||
needs: [test-wheels] | ||
secrets: inherit |
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,55 @@ | ||
# Run the unit tests against several pythons and platforms | ||
# using a pre-built wheel artifact to install the package. | ||
|
||
name: Test wheel | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
build-wheel: | ||
|
||
uses: ./.github/workflows/build-wheel.yml | ||
|
||
test-wheels: | ||
|
||
needs: [build-wheel] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: Checkout unit tests | ||
uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: | | ||
tests | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: File listing | ||
run: ls -R | ||
- name: Fetch built wheel | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheel-artifact | ||
path: dist | ||
- name: File listing | ||
run: ls -R | ||
- name: Install wheel | ||
run: | | ||
# Workaround for globbing the wheel on windows | ||
python -c "import glob, subprocess, sys; subprocess.check_call((sys.executable, '-m', 'pip', 'install', glob.glob('dist/*.whl')[0]))" | ||
- name: Run unittests | ||
run: | | ||
python -m unittest discover -v |
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,17 @@ | ||
# Regular QA workflow (pull requests, main branch) | ||
|
||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
unit-tests: | ||
uses: ./.github/workflows/unit-tests.yml | ||
doc-build: | ||
uses: ./.github/workflows/doc-build.yml |
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,35 @@ | ||
# Run the unit tests against python3.9 on ubuntu, from | ||
# a direct install | ||
|
||
name: Unit tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
unit-tests: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python: ["3.8"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install tooling | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install . | ||
- name: Run unittest | ||
run: python -m unittest discover -v |
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 |
---|---|---|
|
@@ -127,3 +127,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# vim swap files | ||
*.swp |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
__version__ = "0.1.0" | ||
__version__ = "0.1.0b1" | ||
|
||
from .results_analyzer import kappa_explain, angle_explain, matrix_bitmap, \ | ||
converttofractions | ||
from .results_analyzer import ( | ||
kappa_explain, | ||
angle_explain, | ||
matrix_bitmap, | ||
converttofractions, | ||
) |
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