Skip to content

Commit

Permalink
Loosen dependency version constraints wherever possible (#19)
Browse files Browse the repository at this point in the history
* Loosen version constraint for typing-extensions

* remove dependency version upper bounds and loosen numpy for previous python

* Add test for building lock file

* Fix numpy version spec for 3.8

* Update mypy, Put test-lock on schedule

* Lower typing-extensions even further to 3.10.0.2

* Update openpulse to >=0.4.1

* Lower version constraint for mypy-extensions, update mypy

Co-authored-by: Philip Reinhold <[email protected]>
  • Loading branch information
karalekas and PhilReinhold authored Nov 7, 2022
1 parent e3d65b3 commit 32cb438
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 41 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test-lock

on:
schedule:
- cron: '0 19 * * *' # Every 19:00 UTC = 12:00 PST

jobs:
check-rebuild-lock:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
make install-poetry
poetry --version
poetry config virtualenvs.in-project true
- name: Build lock file
run: poetry lock

- name: Install dependencies
run: poetry install --no-root

- name: Install OQpy using pip
run: poetry run pip install .

- name: Run pytest
run: poetry run make check-tests
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
Expand Down
103 changes: 70 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 15 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,26 @@ classifiers = [
]

[tool.poetry.dependencies]
python = ">=3.7,<3.11"
openpulse = "^0.4.0"
numpy = "^1.21.6"
mypy-extensions = "^0.4.3"
typing-extensions = {version = "^4.3.0", python = "<3.8"}
python = ">=3.7,<4.0"
# 0.4 loosens the antlr4-python3-runtime constraints
openpulse = ">=0.4.1,<0.5.0"
numpy = [
{version = ">=1.14.5", python = ">=3.7,<3.8"},
{version = ">=1.17.3", python = ">=3.8,<3.9"},
{version = ">=1.19.3", python = ">=3.9,<3.10"},
{version = ">=1.21.6", python = ">=3.10,<3.11"},
{version = ">=1.22.0", python = ">=3.11"}
]
# 0.2 contains VarArg
mypy-extensions = ">=0.2.0"
# 3.10 contains Protocol and runtime_checkable
typing-extensions = {version = ">=3.10.0.2", python = "<3.8"}

[tool.poetry.group.dev.dependencies]
pytest = "^6.2"
black = "^22.3.0"
pylint = "^2.12"
mypy = "^0.961"
mypy = "^0.982"
twine = "^4.0.1"
pytest-benchmark = "^3.4.1"
pytest-cov = "^3.0.0"
Expand Down

0 comments on commit 32cb438

Please sign in to comment.