Skip to content

Commit

Permalink
fix emu-base dependency (#15)
Browse files Browse the repository at this point in the history
fix the emu-mps emu-base dependency and add a check in the ci
  • Loading branch information
a-quelle authored Jan 18, 2025
1 parent c6fb846 commit 70b4c65
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ jobs:
- run: pip install pre-commit pyproject-flake8
- run: pre-commit install
- run: pre-commit run --all-files
test:
check_dependency_versions:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./test_dependency_versions.sh
test:
needs: check_dependency_versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion ci/emu_mps/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers=[
]
dynamic = ["version"]
dependencies = [
"emu-base==1.2.0"]
"emu-base==1.2.2"]

[tool.hatch.version]
path = "../../emu_mps/__init__.py"
Expand Down
2 changes: 1 addition & 1 deletion emu_base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
"DEFAULT_MAX_KRYLOV_DIM",
]

__version__ = "1.2.1"
__version__ = "1.2.2"
2 changes: 1 addition & 1 deletion emu_mps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"SecondMomentOfEnergy",
]

__version__ = "1.2.1"
__version__ = "1.2.2"
18 changes: 18 additions & 0 deletions test_dependency_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

mps_string=`grep emu-base ci/emu_mps/pyproject.toml`
[[ "$mps_string" =~ .*([0-9]\.[0-9]\.[0-9]).* ]]
mps_dep=${BASH_REMATCH[1]}
echo emu-mps depends on emu-base version $mps_dep

base_string=`grep version emu_base/__init__.py`
[[ "$base_string" =~ .*([0-9]\.[0-9]\.[0-9]).* ]]
base_version=${BASH_REMATCH[1]}
echo emu-base is version $base_version

if [[ $mps_dep == $base_version ]]
then
exit 0
else
exit 1
fi

0 comments on commit 70b4c65

Please sign in to comment.