Skip to content

Commit 9355d80

Browse files
committed
Support python 3.10
Raise minimum dimod version to 0.10.8 Add dwave-preprocessing as a dependency Raise minimum networkx version to 2.4
1 parent 7299ddf commit 9355d80

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
lines changed

.circleci/config.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
parameters:
99
dimod-version:
1010
type: string
11+
networkx-version:
12+
type: string
1113
python-version:
1214
type: string
1315

@@ -30,10 +32,11 @@ jobs:
3032
pip install -r requirements.txt -r tests/requirements.txt
3133
3234
- run:
33-
name: Install specified dimod version
35+
name: Install dependencies
3436
command: |
3537
. env/bin/activate
3638
pip install --upgrade 'dimod<< parameters.dimod-version >>'
39+
pip install --upgrade 'networkx<< parameters.networkx-version >>'
3740
3841
- save_cache: &save-cache-env
3942
key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
@@ -58,7 +61,7 @@ jobs:
5861
type: string
5962

6063
macos:
61-
xcode: "12.2.0"
64+
xcode: "13.2.0"
6265

6366
environment:
6467
HOMEBREW_NO_AUTO_UPDATE: 1
@@ -72,27 +75,28 @@ jobs:
7275
brew install pyenv
7376
7477
- restore_cache: &restore-cache-pyenv
75-
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-12.2.0
78+
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-13.2.0
7679

7780
- run:
7881
name: Install python
7982
command: |
8083
pyenv install << parameters.python-version>> -s
8184
82-
- run:
83-
name: Set system python
84-
command: |
85-
pyenv global << parameters.python-version >>
86-
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
87-
8885
- save_cache: &save-cache-pyenv
89-
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-12.2.0
86+
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-13.2.0
9087
paths:
9188
- ~/.pyenv
9289

9390
- restore_cache: *restore-cache-env
9491

95-
- run: *create-venv-install-deps
92+
- run:
93+
name: Create virtualenv and install dependencies
94+
command: |
95+
eval "$(pyenv init --path)"
96+
pyenv local << parameters.python-version >>
97+
python -m venv env
98+
. env/bin/activate
99+
pip install -r requirements.txt -r tests/requirements.txt
96100
97101
- save_cache: *save-cache-env
98102

@@ -207,8 +211,9 @@ workflows:
207211
- test-linux:
208212
matrix:
209213
parameters:
210-
python-version: &python-versions [3.6.8, 3.7.9, 3.8.9, 3.9.4]
211-
dimod-version: [==0.8.0, <0.9, <0.10, <0.11]
214+
python-version: &python-versions [3.6.8, 3.7.9, 3.8.9, 3.9.4, 3.10.0]
215+
dimod-version: [==0.10.8, ~=0.10.0]
216+
networkx-version: [==2.4, <3.0]
212217
- test-osx:
213218
matrix:
214219
parameters:

dwave_networkx/algorithms/markov.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
# limitations under the License.
1414

1515
import dimod
16-
try:
17-
from dwave.preprocessing import FixVariablesComposite
18-
except ImportError:
19-
# fall back on dimod (<0.10) if dwave.preprocessing not installed
20-
from dimod import FixedVariableComposite as FixVariablesComposite
16+
17+
from dwave.preprocessing import FixVariablesComposite
2118

2219
from dwave_networkx.utils import binary_quadratic_model_sampler
2320

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
networkx==2.4
2-
dimod==0.8.0
2+
dimod==0.10.8
3+
dwave-preprocessing==0.3.2

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
'dwave_networkx.generators',
3030
]
3131

32-
install_requires = ['networkx>=2.0,<3.0',
33-
'dimod>=0.8.0,!=0.10.0,!=0.10.1,!=0.10.2,!=0.10.3,!=0.10.4',
32+
install_requires = ['networkx>=2.4,<3.0',
33+
'dimod>=0.10.8,<0.11.0',
34+
'dwave-preprocessing>=0.3.2,<0.4.0'
3435
]
3536

3637
python_requires = ">=3.6"
@@ -43,6 +44,7 @@
4344
'Programming Language :: Python :: 3.7',
4445
'Programming Language :: Python :: 3.8',
4546
'Programming Language :: Python :: 3.9',
47+
'Programming Language :: Python :: 3.10',
4648
]
4749

4850
setup(

0 commit comments

Comments
 (0)