Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

146 smart rounding #178

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Build the docs

on:
pull_request:
branches:
- main
- docs

jobs:
build:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Upgrade pip
run: python3 -m pip install --upgrade pip

- name: Install dependencies
run: pip install .[optimization,cheminfo,docs]
- name: Build docs
run: mkdocs build
name: Build the docs
on:
pull_request:
branches:
- main
- docs
jobs:
build:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install dependencies
run: pip install .[optimization,cheminfo,docs]
- name: Build docs
run: mkdocs build
68 changes: 34 additions & 34 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Docs

on:
push:
branches:
- main
- docs

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Upgrade pip
run: python3 -m pip install --upgrade pip

- name: Install dependencies
run: |
pip install .[optimization,cheminfo,docs]
- run: mkdocs build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
name: Docs
on:
push:
branches:
- main
- docs
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install dependencies
run: |
pip install .[optimization,cheminfo,docs]
- run: mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
76 changes: 38 additions & 38 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
style:
name: Check style with flake8, black, and isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: style
run: |
pip3 install flake8==5.0.4 black==22.10.0 isort==5.12.0
flake8 --verbose bofire tests
black --check bofire tests
isort . --check-only --verbose

pyright:
name: Typechecking with pyright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: pyright
run: |
pip install ".[optimization,cheminfo,tests]"
pyright

name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
style:
name: Check style with flake8, black, and isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: style
run: |
pip3 install flake8==5.0.4 black==22.10.0 isort==5.12.0
flake8 --verbose bofire tests
black --check bofire tests
isort . --check-only --verbose
pyright:
name: Typechecking with pyright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: pyright
run: |
pip install ".[optimization,cheminfo,tests]"
pyright
82 changes: 41 additions & 41 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Publish to PyPI and TestPyPI

# only trigger on tagged commits starting with "v"
on:
push:
tags:
- "v*"

jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish to Test PyPI
# this step may fail if the version number was already manually published to test.pypi
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
name: Publish to PyPI and TestPyPI
# only trigger on tagged commits starting with "v"
on:
push:
tags:
- "v*"
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish to Test PyPI
# this step may fail if the version number was already manually published to test.pypi
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
98 changes: 49 additions & 49 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
testing_minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Minimal Bofire
run: pip install "." pytest
- name: Run domain-only test
run: |
pytest tests/bofire/data_models/test_domain.py \
tests/bofire/data_models/test_base.py \
tests/bofire/data_models/test_constraint_fulfillment.py \
tests/bofire/data_models/test_constraints.py \
tests/bofire/data_models/test_domain_validators.py \
tests/bofire/data_models/test_features.py \
tests/bofire/data_models/test_filters.py \
tests/bofire/data_models/test_nchoosek_combinatorics.py \
tests/bofire/data_models/test_numeric.py \
tests/bofire/data_models/test_unions.py \
tests/bofire/data_models/test_util.py

testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Bofire
run: pip install ".[optimization,tests,cheminfo]"
- name: Install ipopt
run: sudo apt install build-essential pkg-config coinor-libipopt1v5 coinor-libipopt-dev
- name: Install cyipopt
run: pip install cyipopt
- name: Run tests
run: pytest -ra --cov=bofire --cov-report term-missing tests

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
testing_minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Minimal Bofire
run: pip install "." pytest
- name: Run domain-only test
run: |
pytest tests/bofire/data_models/test_domain.py \
tests/bofire/data_models/test_base.py \
tests/bofire/data_models/test_constraint_fulfillment.py \
tests/bofire/data_models/test_constraints.py \
tests/bofire/data_models/test_domain_validators.py \
tests/bofire/data_models/test_features.py \
tests/bofire/data_models/test_filters.py \
tests/bofire/data_models/test_nchoosek_combinatorics.py \
tests/bofire/data_models/test_numeric.py \
tests/bofire/data_models/test_unions.py \
tests/bofire/data_models/test_util.py
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Bofire
run: pip install ".[optimization,tests,cheminfo]"
- name: Install ipopt
run: sudo apt install build-essential pkg-config coinor-libipopt1v5 coinor-libipopt-dev
- name: Install cyipopt
run: pip install cyipopt
- name: Run tests
run: pytest -ra --cov=bofire --cov-report term-missing tests
Loading