Skip to content

Commit c1c43d2

Browse files
authored
Beta updated requirements (#1647)
* - Removed PySide 2 requirement (#1636) - updates: - pyside6 >=6.5.0, <6.10 - bw2data >=4.1 * Update pyside6 bw2data requirements pip (#1637) * Update requirements for pip as well: - updates: - pyside6 >=6.5.0, <6.10 - bw2data >=4.1 * downgrading conda requirement PySide6 --> PySide2 * Small update of "installation" documentation to make users aware that their venv Python version needs to compatible with the AB. * Update dependency versions and replace np.NaN with np.nan for consistency (#1644) * Beta reduce pins (#1645) * Update dependency versions and replace np.NaN with np.nan for consistency * Seems we need numpy<2 since otherwise there are no wheels for the pip install * Update pyside6 bw2data requirements pip (#1637) * Update requirements for pip as well: - updates: - pyside6 >=6.5.0, <6.10 - bw2data >=4.1 * Update dependency versions and replace np.NaN with np.nan for consistency (#1644) * Change np.NaN to np.nan
1 parent 6cb2034 commit c1c43d2

8 files changed

Lines changed: 35 additions & 34 deletions

File tree

activity_browser/bwutils/metadata/updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def on_signaleddataset_save(self, sender, old, new):
3636
return
3737

3838
node_data = {f: getattr(new, f) for f in primary}
39-
node_data = node_data | {f: new.data.get(f, np.NaN) for f in secondary}
39+
node_data = node_data | {f: new.data.get(f, np.nan) for f in secondary}
4040
node_data["key"] = new.key
4141
node_data = pd.Series(node_data, name=new.key)
4242

activity_browser/bwutils/montecarlo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def construct_lca(
118118
# else:
119119
# row = self.lca.biosphere_dict.get(x["input"], None)
120120
# col = self.lca.activity_dict.get(x["output"], None)
121-
# # if either the row or the column is None, return np.NaN.
121+
# # if either the row or the column is None, return np.nan.
122122
# if row is None or col is None:
123123
# return None
124124
# return row, col, x["type"], x["amount"]

activity_browser/bwutils/superstructure/activities.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ def construct_ad_data(row) -> tuple:
6363
"""
6464
key = (row.database, row.code)
6565
if row.type == "process":
66-
data = (row.name, row.product, row.location, np.NaN, row.database)
66+
data = (row.name, row.product, row.location, np.nan, row.database)
6767
elif "categories" in row.data:
68-
data = (row.name, np.NaN, np.NaN, row.data["categories"], row.database)
68+
data = (row.name, np.nan, np.nan, row.data["categories"], row.database)
6969
else:
70-
data = (row.name, np.NaN, np.NaN, np.NaN, row.database)
70+
data = (row.name, np.nan, np.nan, np.nan, row.database)
7171
return key, data
7272

7373

@@ -95,7 +95,7 @@ def data_from_index(index: tuple) -> dict:
9595
"to categories": to_data[3],
9696
"to database": to_data[4],
9797
"to key": to_key,
98-
"flow type": index[2] if len(index) > 2 else np.NaN,
98+
"flow type": index[2] if len(index) > 2 else np.nan,
9999
}
100100

101101

@@ -159,7 +159,7 @@ def build_match(row):
159159
match = (row.iat[0], row.iat[3])
160160
else:
161161
match = (row.iat[0], row.iat[1], row.iat[2])
162-
return matchbook.get(match, np.NaN)
162+
return matchbook.get(match, np.nan)
163163

164164
return df.apply(build_match, axis=1)
165165

activity_browser/bwutils/uncertainty.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
EMPTY_UNCERTAINTY = {
1111
"uncertainty type": UndefinedUncertainty.id,
12-
"loc": np.NaN,
13-
"scale": np.NaN,
14-
"shape": np.NaN,
15-
"minimum": np.NaN,
16-
"maximum": np.NaN,
12+
"loc": np.nan,
13+
"scale": np.nan,
14+
"shape": np.nan,
15+
"minimum": np.nan,
16+
"maximum": np.nan,
1717
"negative": False,
1818
}
1919

activity_browser/ui/dialogs/uncertainty_dialog.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
EMPTY_UNCERTAINTY = {
1818
"uncertainty type": sa.UndefinedUncertainty.id,
19-
"loc": np.NaN,
20-
"scale": np.NaN,
21-
"shape": np.NaN,
22-
"minimum": np.NaN,
23-
"maximum": np.NaN,
19+
"loc": np.nan,
20+
"scale": np.nan,
21+
"shape": np.nan,
22+
"minimum": np.nan,
23+
"maximum": np.nan,
2424
"negative": False,
2525
}
2626

docs/getting-started/installation.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ For more elaborate installing instructions check out the page below for both [in
3535
## Installing from PyPI
3636
Installing from the Python Package Index (PyPI) can be done using the standard `pip` command. We strongly recommended installing the Activity Browser into a separate [virtual environment](https://realpython.com/python-virtual-environments-a-primer/)
3737

38-
First make sure you have Python installed on your PC by entering the following command into your terminal or command prompt.
38+
First make sure you have Python installed on your PC by entering the following command into your terminal or command prompt.
39+
At this moment the AB is compatible with Python versions 3.10, 3.11, and 3.12.
3940

4041
```
4142
python --version
@@ -51,6 +52,7 @@ Afterwards, you need to activate the virtual environment, which differs between
5152
```
5253
C:\Users\me\virtualenvs\ab-beta\Scripts\activate.bat
5354
```
55+
Possibly double-check if the Python version of your virtual environment is compatible with the AB.
5456
For a full overview of activation commands, [check out the documentation here](https://docs.python.org/3/library/venv.html#how-venvs-work)
5557

5658
### Activity Browser installation

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,28 @@ classifiers = [
3333
requires-python = ">=3.10, <3.13"
3434
dependencies = [
3535
"arrow",
36+
"bw-functional>=0b97",
3637
"bw2analyzer>=0.11.5",
3738
"bw2calc>=2.0",
38-
"bw2data>=4.1, <4.5.2",
39-
"bw2parameters>=1.1",
39+
"bw2data>=4.1",
4040
"bw2io>=0.9.3",
41+
"bw2parameters>=1.1",
4142
"bw_graph_tools>=0.5",
4243
"bw_processing>=1.0",
4344
"bw_simapro_csv >=0.2.6",
4445
"ecoinvent_interface",
46+
"loguru>=0.7",
4547
"matrix_utils>=0.5",
46-
"bw-functional==0b97",
4748
"networkx",
4849
"numpy>=1.23.5,<2",
4950
"pandas>=2.2.1",
50-
"pint<=0.21",
51-
"py7zr==0.22.0",
51+
"py7zr>=0.22.0",
5252
"pyperclip",
53-
"pyside6",
54-
"pypardiso ; platform_system == 'Windows'",
5553
"pyprind",
54+
"pyside6>=6.5.0, <6.10",
5655
"qtpy",
5756
"salib>=1.4",
5857
"seaborn",
59-
"loguru>=0.7",
6058
]
6159

6260

recipe/meta.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,28 @@ requirements:
2020
run:
2121
- python >=3.10, <3.12
2222
- arrow
23+
- bw_functional>=0.b.97
2324
- bw2analyzer >=0.11.5
24-
- bw2data >=4.1, <4.5.2
25-
- bw2parameters >=1.1
25+
- bw2calc >=2.0
26+
- bw2data >=4.1
2627
- bw2io >=0.9.3
28+
- bw2parameters >=1.1
2729
- bw_graph_tools >=0.5
2830
- bw_processing >=1.0
2931
- bw_simapro_csv >=0.2.6
30-
- bw_functional=0.b.97
3132
- ecoinvent_interface
33+
- loguru>=0.7
3234
- matrix_utils >=0.5
35+
- networkx
3336
- numpy >=1.23.5, <2
34-
- pint <=0.21
35-
- py7zr <=0.22.0
37+
- pandas >=2.2.1
38+
- py7zr >=0.22.0
3639
- pyperclip
3740
- pyprind
38-
- networkx
39-
- pandas >=2.2.1
4041
- pyside2 >=5.15.5
4142
- qt-webengine
4243
- qtpy
43-
- salib >=1.4, <1.5.1
44+
- salib >=1.4
4445
- seaborn
4546

4647
about:

0 commit comments

Comments
 (0)