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

Replace deprecated pandas.apply functionality #1069

Merged

Conversation

Zoophobus
Copy link
Contributor

@Zoophobus Zoophobus commented Oct 13, 2023

Use of the pandas apply method for extracting the dataframe columns as set objects failed with an Exception related to the use of unordered sets. This can be avoided by using the python standard map functionality to split the pandas dataframes.

resolve #1062

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, feature, ui, change, documentation, breaking, ci
    as they show up in the changelog
  • Link this PR to related issues.

…elevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.
@Zoophobus Zoophobus added the bug Issues/PRs related to bugs label Oct 13, 2023
@coveralls
Copy link

coveralls commented Oct 13, 2023

Coverage Status

coverage: 50.184%. remained the same when pulling 2f37370 on Zoophobus:updated_activities_module into 400cc35 on LCA-ActivityBrowser:master.

@marc-vdm
Copy link
Member

Suggested solution works but still has FutureWarning for me though:

C:\Users\meidemtvander\.conda\envs\ab_development_stable\python.exe C:/Users/meidemtvander/PycharmProjects/AB/run-activity-browser.py
-hiding tab:History

DevTools listening on ws://127.0.0.1:3999/devtools/browser/a290cd7e-4f48-4fde-8943-bd26b6cf103c
-hiding tab:Activity Details
-hiding tab:Characterization Factors
-hiding tab:Graph Explorer
-hiding tab:LCA results
The Activity-Browser log file can be found at C:\Users\meidemtvander\AppData\Local\ActivityBrowser\ActivityBrowser\Logs\ab_logs-2023-10-13_13-44-43.log
Loading user settings:
dirpath already loaded
Reset project settings directory to:C:\Users\meidemtvander\AppData\Local\pylca\Brightway3\default.c21f969b5f03d33d43e04f8f136e7682
Error: plugin ab_plugin_scenariolink not installed
Loaded project:default
Brightway2 data directory: C:\Users\meidemtvander\AppData\Local\pylca\Brightway3
Brightway2 active project: default
Qt Version:5.15.8
No data in scenario table 1, skipping
separator == ';'
Loading Scenario file. This may take a while for large files
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\excel.py:86: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  data.loc[:, columns] = data[columns].applymap(convert_tuple_str)
Current shape and databases in the MetaDataStore:(0, 0)set()
Adding:issue 1062
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:176: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df.loc[idx, changes] = exchange_replace_database(df.loc[idx, :], replacements, critical, idx)[changes]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:176: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df.loc[idx, changes] = exchange_replace_database(df.loc[idx, :], replacements, critical, idx)[changes]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
0.75C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:206: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '[nan ('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '4f95b2b195cd4c76896b3fbc77419bf9')]' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df_.loc[df.index] = df
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:206: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '[('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '4f95b2b195cd4c76896b3fbc77419bf9')
 ('issue 1062', '4f95b2b195cd4c76896b3fbc77419bf9')]' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df_.loc[df.index] = df
<function ScenarioImportWidget.scenario_db_check at 0x00000217A4CAEEE0> -- 10.83375096321106
<function SuperstructureManager.fill_empty_process_keys_in_exchanges at 0x00000217A0178700> -- 0.0505831241607666
<function SuperstructureManager.verify_scenario_process_keys at 0x00000217A0178820> -- 0.010336160659790039
<function SuperstructureManager.check_duplicates at 0x00000217A0178A60> -- 0.004021644592285156
<function SuperstructureManager.check_scenario_exchange_values at 0x00000217A0178940> -- 0.002223491668701172
<function SuperstructureManager.merge_flows_to_self at 0x00000217A0178430> -- 0.008220911026000977
<function ScenarioImportWidget.sync_superstructure at 0x00000217A4CAEDC0> -- 10.912789583206177
<function ScenarioImportWidget.load_action at 0x00000217A4CAECA0> -- 17.61841058731079

@marc-vdm
Copy link
Member

Also see #1066 for reference btw

@Zoophobus
Copy link
Contributor Author

Suggested solution works but still has FutureWarning for me though:

C:\Users\meidemtvander\.conda\envs\ab_development_stable\python.exe C:/Users/meidemtvander/PycharmProjects/AB/run-activity-browser.py
-hiding tab:History

DevTools listening on ws://127.0.0.1:3999/devtools/browser/a290cd7e-4f48-4fde-8943-bd26b6cf103c
-hiding tab:Activity Details
-hiding tab:Characterization Factors
-hiding tab:Graph Explorer
-hiding tab:LCA results
The Activity-Browser log file can be found at C:\Users\meidemtvander\AppData\Local\ActivityBrowser\ActivityBrowser\Logs\ab_logs-2023-10-13_13-44-43.log
Loading user settings:
dirpath already loaded
Reset project settings directory to:C:\Users\meidemtvander\AppData\Local\pylca\Brightway3\default.c21f969b5f03d33d43e04f8f136e7682
Error: plugin ab_plugin_scenariolink not installed
Loaded project:default
Brightway2 data directory: C:\Users\meidemtvander\AppData\Local\pylca\Brightway3
Brightway2 active project: default
Qt Version:5.15.8
No data in scenario table 1, skipping
separator == ';'
Loading Scenario file. This may take a while for large files
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\excel.py:86: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  data.loc[:, columns] = data[columns].applymap(convert_tuple_str)
Current shape and databases in the MetaDataStore:(0, 0)set()
Adding:issue 1062
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:176: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df.loc[idx, changes] = exchange_replace_database(df.loc[idx, :], replacements, critical, idx)[changes]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:176: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df.loc[idx, changes] = exchange_replace_database(df.loc[idx, :], replacements, critical, idx)[changes]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:142: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  ds_.loc[col] = (key['database'][0], key['code'][0]) if j == 0 else key['database'][0]
0.75C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:206: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '[nan ('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '4f95b2b195cd4c76896b3fbc77419bf9')]' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df_.loc[df.index] = df
C:\Users\meidemtvander\PycharmProjects\AB\activity_browser\bwutils\superstructure\dataframe.py:206: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '[('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '9edd44f2b3c94188a47eedb1e0bcf210')
 ('issue 1062', '4f95b2b195cd4c76896b3fbc77419bf9')
 ('issue 1062', '4f95b2b195cd4c76896b3fbc77419bf9')]' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df_.loc[df.index] = df
<function ScenarioImportWidget.scenario_db_check at 0x00000217A4CAEEE0> -- 10.83375096321106
<function SuperstructureManager.fill_empty_process_keys_in_exchanges at 0x00000217A0178700> -- 0.0505831241607666
<function SuperstructureManager.verify_scenario_process_keys at 0x00000217A0178820> -- 0.010336160659790039
<function SuperstructureManager.check_duplicates at 0x00000217A0178A60> -- 0.004021644592285156
<function SuperstructureManager.check_scenario_exchange_values at 0x00000217A0178940> -- 0.002223491668701172
<function SuperstructureManager.merge_flows_to_self at 0x00000217A0178430> -- 0.008220911026000977
<function ScenarioImportWidget.sync_superstructure at 0x00000217A4CAEDC0> -- 10.912789583206177
<function ScenarioImportWidget.load_action at 0x00000217A4CAECA0> -- 17.61841058731079

Hi Marc, so I changed the use of applymap to use the map method. These other warnings are from pandas using the numpy.nan type for the automatic field/column generation. This might be fixed in a future release of pandas so I think it should be safe to ignore (pandas-dev/pandas#55025)

@bsteubing
Copy link
Member

Thanks @Zoophobus !

@bsteubing bsteubing merged commit 0916c44 into LCA-ActivityBrowser:master Oct 14, 2023
10 checks passed
@marc-vdm marc-vdm added this to the 2.9.2 milestone Oct 15, 2023
@marc-vdm marc-vdm changed the title Updates to the functions get_relevant_flows and get_relevant_activities Replace deprecated pandas.apply functionality Oct 15, 2023
@marc-vdm marc-vdm added change PRs related to minor changes to AB and removed bug Issues/PRs related to bugs labels Oct 15, 2023
marc-vdm pushed a commit to marc-vdm/activity-browser that referenced this pull request Dec 4, 2023
…es (LCA-ActivityBrowser#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.
marc-vdm added a commit that referenced this pull request Dec 6, 2023
* Delete .github/workflows/install-canary.yaml

* update bw2io requirement

* Update readme install instructions

* Update meta.yaml

* Update README.md

* Change requirement to brightway2 instead of bw2io

* Update README.md

* Increases the flexibility of the excel importer so it can also handle the parameter scenario files.

* Update README.md

How to install using Mamba

* Set up signals infrascructure

* Implement dialog

* Implement finding of suitable alternatives and proper management of failing that.

* Implement actual relinking

* Minor documentation improvements + store exchanges to remove instead of to keep.

* Minor documentation + code improvements

* Resolve #782 + improve documentation of `Contributions` class

* Minor documentation + code improvements

* Fix type hinting error

* Update README.md

* Update README.md

* Update README.md

* Updates to the functions get_relevant_flows and get_relevant_activities (#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.

* Multiple sdf update (#1083)

* Updates to the logging system to avoid the print statement. Merging with
commits for corrections to the uncertainty distributions that were
included within the same branch. Improves thread safety in logging
increasing stability in the multi-threaded processes.

* Changes the creation of log files. Amends the uncertainty wizard test to correct for use of logging over the standard console. Adds the .logs to .gitignore.

* 1) Simplifies the use of the python logging facility with QtThreads (as published on the python docs for logging), improving the stability of logging.\n2) Changes the generation of the logging object that is more compatible with pytest, supporting the existing test procedures.

* Provides an update to the Model for the calculation_setup Methods table, corrects for deletion of impact assessment methods. Updates the routine to the lca_setup module for calling the logger.

* Updates to the logger module, what was the ABLogger class is renamed to ABHandler. The module now contains the formats and settings for the Stream handlers. Calling of the methods in the other AB modules requires passing a logging.Logger instance and the name of the calling module. These are then incorporated into the wrapping routines in the class. Additions:\n 1) An error wrapper is provided and also explicitly provides a trace of the error.\n 2) A timestamp routine is provided and used for providing the file names for log files.\n 3) A standard location based on appdirs is provided and used for log file locations.

* Corrections to the setup of the logger in the test_uncertainty_wizard module

* Includes a change to the type used for the scenario columns when using multiple files with the combined (combinatoric) approach for the scenarios. Includes respective changes to the boolean tests applied to such Indexes.

* Minor corrections to local repository branch, to keep changes aligned

* Alterations to keep minor changes aligned with master branch and fork

---------

Co-authored-by: zoo <zoo@PK-home.kpn>

* Use node16 actions for main pipeline

* Use node16 actions in release pipeline

* Use latest version of release-changelog-builder

* Use node16 action for install canary pipeline

* Remove the special build for arm architecture

This was added before brightway2 supported multi-arch builds on
conda-forge. It is not needed anymore, because the normal AB is now also
installable on arm arch.

* Install canary updates (#1093)

* Increase timeout to 30 min

Originally the idea was that installation should never take longer than
12 min, otherwise we should get a warning with the failed pipeline. But
unfortuantely conda currently takes longer than 12 minutes to solve
the environment.

* Add mamba install canary

* Download artifacts to start implementing env comparison

* Looks like on linux it can take more than 30 minutes :-(

* 60min not enough on linux, increasing to 120

* Completely remove timeout, default is 6 hours

* Use solver libmamba option

* Add diff step to compare installations

* Use node16 actions

* Re-add the 12 timeout

* Split diff into separate steps

* Yq action only runs on linux

* debug yq formatting step

* Simplify

* more fighting with yq action

* artifacts are apparently directories in this case

* Try again with while loop

* Run on all os, but only 3.9

* ignore diff exit code

* Run canary install for 3.8 and 3.9 again

---------

Co-authored-by: haasad <haasad@users.noreply.github.com>

* Adding error message if no scenario file is loaded in a scenario LCA (#1085)

* Updated and improved contributing file

* Improve text on dependencies

* Fix canary link

* Add good/bad examples to CONTRIBUTING.md for commit messages and PR titles

* Add more specific requirements on communicating work on issues in CONTRIBUTING.md

* Minor updates to CONTRIBUTING.md and README.md

* Minor improvements to CONTRIBUTING.md

* Fix formatting error in PULL_REQUEST_TEMPLATE.md

* Resolve #1105

* Update copyright and license information to only link to one place.

* Resolve 3 bugs for location linking (#1051): 1) database of own activity was not always added (in case none of the exchanges were in own database) 2) improve handling of multiple locations. 3) replaced exchanges were deleted from the old process instead of the new one.

* Improve choosing and handling of alternative locations for location choosing

* Resolve readonly database bug for activity duplication to new activity.

* Store AB version in logfile

* Remove deprecated channels from conda envs

* Remove experimental conda environment creation and upload

I started this mostly as an experimental alternative install method with
`conda env create`. However since the channel handling isn't such a pain
anymore now that everything is on conda-forge this is obsolete.

* Move conda-envs to .github directory

* Move changelog config to .github

* Move dev recipe to .github directory

* Move stable recipe to recipe/meta.yaml

* Update dev recipe

* Use micromamba instead of miniconda to speed up tests

* Update install instructions to use libmamba solver with conda

* Fix path for dev recipe

* Added tooltip for table content

* Added docstring for data method

* Cleaning-up documentation

* Update README.md

Resolve #1127

* Add - copy on impact category copy (#1136)

* Add - copy on impact category copy #1133

* Reorder impact category tree context menu

* Resolve bug with switching project on delete (#1138)

* Switch project on delete #1075

* Cleaning up ProjectController.change_project

* Resolving comments by marc-vdm

* review instructions bot

---------

Co-authored-by: bsteubing <33026150+bsteubing@users.noreply.github.com>
Co-authored-by: zoophobus <jonathan.kidner@gmail.com>
Co-authored-by: Jonathan Kidner <12627199+Zoophobus@users.noreply.github.com>
Co-authored-by: zoo <zoo@PK-home.kpn>
Co-authored-by: haasad <haasad@users.noreply.github.com>
Co-authored-by: Adrian Haas <11636405+haasad@users.noreply.github.com>
Co-authored-by: Marin Visscher <m.r.visscher@science.leidenuniv.nl>
Co-authored-by: Marin Visscher <103424764+mrvisscher@users.noreply.github.com>
marc-vdm added a commit that referenced this pull request Dec 13, 2023
* Delete .github/workflows/install-canary.yaml

* Remove unused code in montecarlo.py

* Resolve #1103

* GH action script for commenting on issues when related milestone is closed.

* update bw2io requirement

* Update readme install instructions

* Update meta.yaml

* Update README.md

* Change requirement to brightway2 instead of bw2io

* Update README.md

* Increases the flexibility of the excel importer so it can also handle the parameter scenario files.

* Update README.md

How to install using Mamba

* Set up signals infrascructure

* Implement dialog

* Implement finding of suitable alternatives and proper management of failing that.

* Implement actual relinking

* Minor documentation improvements + store exchanges to remove instead of to keep.

* Minor documentation + code improvements

* Resolve #782 + improve documentation of `Contributions` class

* Minor documentation + code improvements

* Fix type hinting error

* Update README.md

* Update README.md

* Update README.md

* Updates to the functions get_relevant_flows and get_relevant_activities (#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.

* Multiple sdf update (#1083)

* Updates to the logging system to avoid the print statement. Merging with
commits for corrections to the uncertainty distributions that were
included within the same branch. Improves thread safety in logging
increasing stability in the multi-threaded processes.

* Changes the creation of log files. Amends the uncertainty wizard test to correct for use of logging over the standard console. Adds the .logs to .gitignore.

* 1) Simplifies the use of the python logging facility with QtThreads (as published on the python docs for logging), improving the stability of logging.\n2) Changes the generation of the logging object that is more compatible with pytest, supporting the existing test procedures.

* Provides an update to the Model for the calculation_setup Methods table, corrects for deletion of impact assessment methods. Updates the routine to the lca_setup module for calling the logger.

* Updates to the logger module, what was the ABLogger class is renamed to ABHandler. The module now contains the formats and settings for the Stream handlers. Calling of the methods in the other AB modules requires passing a logging.Logger instance and the name of the calling module. These are then incorporated into the wrapping routines in the class. Additions:\n 1) An error wrapper is provided and also explicitly provides a trace of the error.\n 2) A timestamp routine is provided and used for providing the file names for log files.\n 3) A standard location based on appdirs is provided and used for log file locations.

* Corrections to the setup of the logger in the test_uncertainty_wizard module

* Includes a change to the type used for the scenario columns when using multiple files with the combined (combinatoric) approach for the scenarios. Includes respective changes to the boolean tests applied to such Indexes.

* Minor corrections to local repository branch, to keep changes aligned

* Alterations to keep minor changes aligned with master branch and fork

---------

Co-authored-by: zoo <zoo@PK-home.kpn>

* Use node16 actions for main pipeline

* Use node16 actions in release pipeline

* Use latest version of release-changelog-builder

* Use node16 action for install canary pipeline

* Remove the special build for arm architecture

This was added before brightway2 supported multi-arch builds on
conda-forge. It is not needed anymore, because the normal AB is now also
installable on arm arch.

* Install canary updates (#1093)

* Increase timeout to 30 min

Originally the idea was that installation should never take longer than
12 min, otherwise we should get a warning with the failed pipeline. But
unfortuantely conda currently takes longer than 12 minutes to solve
the environment.

* Add mamba install canary

* Download artifacts to start implementing env comparison

* Looks like on linux it can take more than 30 minutes :-(

* 60min not enough on linux, increasing to 120

* Completely remove timeout, default is 6 hours

* Use solver libmamba option

* Add diff step to compare installations

* Use node16 actions

* Re-add the 12 timeout

* Split diff into separate steps

* Yq action only runs on linux

* debug yq formatting step

* Simplify

* more fighting with yq action

* artifacts are apparently directories in this case

* Try again with while loop

* Run on all os, but only 3.9

* ignore diff exit code

* Run canary install for 3.8 and 3.9 again

---------

Co-authored-by: haasad <haasad@users.noreply.github.com>

* Adding error message if no scenario file is loaded in a scenario LCA (#1085)

* Updated and improved contributing file

* Improve text on dependencies

* Fix canary link

* Add good/bad examples to CONTRIBUTING.md for commit messages and PR titles

* Add more specific requirements on communicating work on issues in CONTRIBUTING.md

* Minor updates to CONTRIBUTING.md and README.md

* Minor improvements to CONTRIBUTING.md

* Fix formatting error in PULL_REQUEST_TEMPLATE.md

* Resolve #1105

* Update copyright and license information to only link to one place.

* Resolve 3 bugs for location linking (#1051): 1) database of own activity was not always added (in case none of the exchanges were in own database) 2) improve handling of multiple locations. 3) replaced exchanges were deleted from the old process instead of the new one.

* Improve choosing and handling of alternative locations for location choosing

* Resolve readonly database bug for activity duplication to new activity.

* Store AB version in logfile

* Remove deprecated channels from conda envs

* Remove experimental conda environment creation and upload

I started this mostly as an experimental alternative install method with
`conda env create`. However since the channel handling isn't such a pain
anymore now that everything is on conda-forge this is obsolete.

* Move conda-envs to .github directory

* Move changelog config to .github

* Move dev recipe to .github directory

* Move stable recipe to recipe/meta.yaml

* Update dev recipe

* Use micromamba instead of miniconda to speed up tests

* Update install instructions to use libmamba solver with conda

* Fix path for dev recipe

* Added tooltip for table content

* Added docstring for data method

* Cleaning-up documentation

* Update README.md

Resolve #1127

* Add - copy on impact category copy (#1136)

* Add - copy on impact category copy #1133

* Reorder impact category tree context menu

* Resolve bug with switching project on delete (#1138)

* Switch project on delete #1075

* Cleaning up ProjectController.change_project

* Resolving comments by marc-vdm

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* review instructions bot

* review instructions bot

---------

Co-authored-by: bsteubing <33026150+bsteubing@users.noreply.github.com>
Co-authored-by: zoophobus <jonathan.kidner@gmail.com>
Co-authored-by: Jonathan Kidner <12627199+Zoophobus@users.noreply.github.com>
Co-authored-by: zoo <zoo@PK-home.kpn>
Co-authored-by: haasad <haasad@users.noreply.github.com>
Co-authored-by: Adrian Haas <11636405+haasad@users.noreply.github.com>
Co-authored-by: Marin Visscher <m.r.visscher@science.leidenuniv.nl>
Co-authored-by: Marin Visscher <103424764+mrvisscher@users.noreply.github.com>
marc-vdm added a commit that referenced this pull request Dec 13, 2023
* Delete .github/workflows/install-canary.yaml

* Add testing file

* Get available AB versions per AB version from online file

* Limit ecoinvent importer to versions compatible with this AB version

* Implement choosing of version during biosphere update

* Implement choosing of version during defaults import

* Resolve offline bug + better updating

* move compatible versions file

* implement local file fallback

* implement legacy biosphere imports for any chosen version AB is compatible with

* update test

* update test

* update test

* update test

* update test

* update test

* resolve calculation setup bug where activites are checked when biosphere was updated.

* minor updates to test documentation

* GH action script for commenting on issues when related milestone is closed.

* update bw2io requirement

* Update readme install instructions

* Update meta.yaml

* Update README.md

* Change requirement to brightway2 instead of bw2io

* Update README.md

* Increases the flexibility of the excel importer so it can also handle the parameter scenario files.

* Update README.md

How to install using Mamba

* Set up signals infrascructure

* Implement dialog

* Implement finding of suitable alternatives and proper management of failing that.

* Implement actual relinking

* Minor documentation improvements + store exchanges to remove instead of to keep.

* Minor documentation + code improvements

* Resolve #782 + improve documentation of `Contributions` class

* Minor documentation + code improvements

* Fix type hinting error

* Update README.md

* Update README.md

* Update README.md

* Updates to the functions get_relevant_flows and get_relevant_activities (#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.

* Multiple sdf update (#1083)

* Updates to the logging system to avoid the print statement. Merging with
commits for corrections to the uncertainty distributions that were
included within the same branch. Improves thread safety in logging
increasing stability in the multi-threaded processes.

* Changes the creation of log files. Amends the uncertainty wizard test to correct for use of logging over the standard console. Adds the .logs to .gitignore.

* 1) Simplifies the use of the python logging facility with QtThreads (as published on the python docs for logging), improving the stability of logging.\n2) Changes the generation of the logging object that is more compatible with pytest, supporting the existing test procedures.

* Provides an update to the Model for the calculation_setup Methods table, corrects for deletion of impact assessment methods. Updates the routine to the lca_setup module for calling the logger.

* Updates to the logger module, what was the ABLogger class is renamed to ABHandler. The module now contains the formats and settings for the Stream handlers. Calling of the methods in the other AB modules requires passing a logging.Logger instance and the name of the calling module. These are then incorporated into the wrapping routines in the class. Additions:\n 1) An error wrapper is provided and also explicitly provides a trace of the error.\n 2) A timestamp routine is provided and used for providing the file names for log files.\n 3) A standard location based on appdirs is provided and used for log file locations.

* Corrections to the setup of the logger in the test_uncertainty_wizard module

* Includes a change to the type used for the scenario columns when using multiple files with the combined (combinatoric) approach for the scenarios. Includes respective changes to the boolean tests applied to such Indexes.

* Minor corrections to local repository branch, to keep changes aligned

* Alterations to keep minor changes aligned with master branch and fork

---------

Co-authored-by: zoo <zoo@PK-home.kpn>

* Use node16 actions for main pipeline

* Use node16 actions in release pipeline

* Use latest version of release-changelog-builder

* Use node16 action for install canary pipeline

* Remove the special build for arm architecture

This was added before brightway2 supported multi-arch builds on
conda-forge. It is not needed anymore, because the normal AB is now also
installable on arm arch.

* Install canary updates (#1093)

* Increase timeout to 30 min

Originally the idea was that installation should never take longer than
12 min, otherwise we should get a warning with the failed pipeline. But
unfortuantely conda currently takes longer than 12 minutes to solve
the environment.

* Add mamba install canary

* Download artifacts to start implementing env comparison

* Looks like on linux it can take more than 30 minutes :-(

* 60min not enough on linux, increasing to 120

* Completely remove timeout, default is 6 hours

* Use solver libmamba option

* Add diff step to compare installations

* Use node16 actions

* Re-add the 12 timeout

* Split diff into separate steps

* Yq action only runs on linux

* debug yq formatting step

* Simplify

* more fighting with yq action

* artifacts are apparently directories in this case

* Try again with while loop

* Run on all os, but only 3.9

* ignore diff exit code

* Run canary install for 3.8 and 3.9 again

---------

Co-authored-by: haasad <haasad@users.noreply.github.com>

* Adding error message if no scenario file is loaded in a scenario LCA (#1085)

* Updated and improved contributing file

* Improve text on dependencies

* Fix canary link

* Add good/bad examples to CONTRIBUTING.md for commit messages and PR titles

* Add more specific requirements on communicating work on issues in CONTRIBUTING.md

* Minor updates to CONTRIBUTING.md and README.md

* Minor improvements to CONTRIBUTING.md

* Fix formatting error in PULL_REQUEST_TEMPLATE.md

* Resolve #1105

* Update copyright and license information to only link to one place.

* Resolve 3 bugs for location linking (#1051): 1) database of own activity was not always added (in case none of the exchanges were in own database) 2) improve handling of multiple locations. 3) replaced exchanges were deleted from the old process instead of the new one.

* Improve choosing and handling of alternative locations for location choosing

* Resolve readonly database bug for activity duplication to new activity.

* Store AB version in logfile

* Remove deprecated channels from conda envs

* Remove experimental conda environment creation and upload

I started this mostly as an experimental alternative install method with
`conda env create`. However since the channel handling isn't such a pain
anymore now that everything is on conda-forge this is obsolete.

* Move conda-envs to .github directory

* Move changelog config to .github

* Move dev recipe to .github directory

* Move stable recipe to recipe/meta.yaml

* Update dev recipe

* Use micromamba instead of miniconda to speed up tests

* Update install instructions to use libmamba solver with conda

* Fix path for dev recipe

* Added tooltip for table content

* Added docstring for data method

* Cleaning-up documentation

* Update README.md

Resolve #1127

* Add - copy on impact category copy (#1136)

* Add - copy on impact category copy #1133

* Reorder impact category tree context menu

* Resolve bug with switching project on delete (#1138)

* Switch project on delete #1075

* Cleaning up ProjectController.change_project

* Resolving comments by marc-vdm

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* Add test for semantic version sort

* review instructions bot

* review instructions bot

* Update dialog text

* Passed main windows as parent to popup

* Update safe_link_fetch from utils

* Update safe_link_fetch from utils and update link to correct repo

* Update safe_link_fetch from utils and update link to correct repo

---------

Co-authored-by: bsteubing <33026150+bsteubing@users.noreply.github.com>
Co-authored-by: zoophobus <jonathan.kidner@gmail.com>
Co-authored-by: Jonathan Kidner <12627199+Zoophobus@users.noreply.github.com>
Co-authored-by: zoo <zoo@PK-home.kpn>
Co-authored-by: haasad <haasad@users.noreply.github.com>
Co-authored-by: Adrian Haas <11636405+haasad@users.noreply.github.com>
Co-authored-by: Marin Visscher <m.r.visscher@science.leidenuniv.nl>
Co-authored-by: Marin Visscher <103424764+mrvisscher@users.noreply.github.com>
mrvisscher added a commit that referenced this pull request Dec 20, 2023
* Delete .github/workflows/install-canary.yaml

* GH action script for commenting on issues when related milestone is closed.

* update bw2io requirement

* Update readme install instructions

* Update meta.yaml

* Update README.md

* Change requirement to brightway2 instead of bw2io

* Update README.md

* Increases the flexibility of the excel importer so it can also handle the parameter scenario files.

* Update README.md

How to install using Mamba

* Set up signals infrascructure

* Implement dialog

* Implement finding of suitable alternatives and proper management of failing that.

* Implement actual relinking

* Minor documentation improvements + store exchanges to remove instead of to keep.

* Minor documentation + code improvements

* Resolve #782 + improve documentation of `Contributions` class

* Minor documentation + code improvements

* Fix type hinting error

* Update README.md

* Update README.md

* Update README.md

* Updates to the functions get_relevant_flows and get_relevant_activities (#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.

* Multiple sdf update (#1083)

* Updates to the logging system to avoid the print statement. Merging with
commits for corrections to the uncertainty distributions that were
included within the same branch. Improves thread safety in logging
increasing stability in the multi-threaded processes.

* Changes the creation of log files. Amends the uncertainty wizard test to correct for use of logging over the standard console. Adds the .logs to .gitignore.

* 1) Simplifies the use of the python logging facility with QtThreads (as published on the python docs for logging), improving the stability of logging.\n2) Changes the generation of the logging object that is more compatible with pytest, supporting the existing test procedures.

* Provides an update to the Model for the calculation_setup Methods table, corrects for deletion of impact assessment methods. Updates the routine to the lca_setup module for calling the logger.

* Updates to the logger module, what was the ABLogger class is renamed to ABHandler. The module now contains the formats and settings for the Stream handlers. Calling of the methods in the other AB modules requires passing a logging.Logger instance and the name of the calling module. These are then incorporated into the wrapping routines in the class. Additions:\n 1) An error wrapper is provided and also explicitly provides a trace of the error.\n 2) A timestamp routine is provided and used for providing the file names for log files.\n 3) A standard location based on appdirs is provided and used for log file locations.

* Corrections to the setup of the logger in the test_uncertainty_wizard module

* Includes a change to the type used for the scenario columns when using multiple files with the combined (combinatoric) approach for the scenarios. Includes respective changes to the boolean tests applied to such Indexes.

* Minor corrections to local repository branch, to keep changes aligned

* Alterations to keep minor changes aligned with master branch and fork

---------

Co-authored-by: zoo <zoo@PK-home.kpn>

* Use node16 actions for main pipeline

* Use node16 actions in release pipeline

* Use latest version of release-changelog-builder

* Use node16 action for install canary pipeline

* Remove the special build for arm architecture

This was added before brightway2 supported multi-arch builds on
conda-forge. It is not needed anymore, because the normal AB is now also
installable on arm arch.

* Install canary updates (#1093)

* Increase timeout to 30 min

Originally the idea was that installation should never take longer than
12 min, otherwise we should get a warning with the failed pipeline. But
unfortuantely conda currently takes longer than 12 minutes to solve
the environment.

* Add mamba install canary

* Download artifacts to start implementing env comparison

* Looks like on linux it can take more than 30 minutes :-(

* 60min not enough on linux, increasing to 120

* Completely remove timeout, default is 6 hours

* Use solver libmamba option

* Add diff step to compare installations

* Use node16 actions

* Re-add the 12 timeout

* Split diff into separate steps

* Yq action only runs on linux

* debug yq formatting step

* Simplify

* more fighting with yq action

* artifacts are apparently directories in this case

* Try again with while loop

* Run on all os, but only 3.9

* ignore diff exit code

* Run canary install for 3.8 and 3.9 again

---------

Co-authored-by: haasad <haasad@users.noreply.github.com>

* Adding error message if no scenario file is loaded in a scenario LCA (#1085)

* Updated and improved contributing file

* Improve text on dependencies

* Fix canary link

* Add good/bad examples to CONTRIBUTING.md for commit messages and PR titles

* Add more specific requirements on communicating work on issues in CONTRIBUTING.md

* Minor updates to CONTRIBUTING.md and README.md

* Minor improvements to CONTRIBUTING.md

* Fix formatting error in PULL_REQUEST_TEMPLATE.md

* Resolve #1105

* Update copyright and license information to only link to one place.

* Resolve 3 bugs for location linking (#1051): 1) database of own activity was not always added (in case none of the exchanges were in own database) 2) improve handling of multiple locations. 3) replaced exchanges were deleted from the old process instead of the new one.

* Improve choosing and handling of alternative locations for location choosing

* Resolve readonly database bug for activity duplication to new activity.

* Store AB version in logfile

* Remove deprecated channels from conda envs

* Remove experimental conda environment creation and upload

I started this mostly as an experimental alternative install method with
`conda env create`. However since the channel handling isn't such a pain
anymore now that everything is on conda-forge this is obsolete.

* Move conda-envs to .github directory

* Move changelog config to .github

* Move dev recipe to .github directory

* Move stable recipe to recipe/meta.yaml

* Update dev recipe

* Use micromamba instead of miniconda to speed up tests

* Update install instructions to use libmamba solver with conda

* Fix path for dev recipe

* Added tooltip for table content

* Added docstring for data method

* Cleaning-up documentation

* Update README.md

Resolve #1127

* Add - copy on impact category copy (#1136)

* Add - copy on impact category copy #1133

* Reorder impact category tree context menu

* Resolve bug with switching project on delete (#1138)

* Switch project on delete #1075

* Cleaning up ProjectController.change_project

* Resolving comments by marc-vdm

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* Update notification message to include link to updates mailing list.

* Update notification message formatting

* review instructions bot

* review instructions bot

* review instructions bot

* review instructions bot

* review instructions bot

* Remove PR review bot

---------

Co-authored-by: bsteubing <33026150+bsteubing@users.noreply.github.com>
Co-authored-by: zoophobus <jonathan.kidner@gmail.com>
Co-authored-by: Jonathan Kidner <12627199+Zoophobus@users.noreply.github.com>
Co-authored-by: zoo <zoo@PK-home.kpn>
Co-authored-by: haasad <haasad@users.noreply.github.com>
Co-authored-by: Adrian Haas <11636405+haasad@users.noreply.github.com>
Co-authored-by: Marin Visscher <m.r.visscher@science.leidenuniv.nl>
Co-authored-by: Marin Visscher <103424764+mrvisscher@users.noreply.github.com>
marc-vdm added a commit that referenced this pull request Dec 20, 2023
* Delete .github/workflows/install-canary.yaml

* GH action script for commenting on issues when related milestone is closed.

* update bw2io requirement

* Update readme install instructions

* Update meta.yaml

* Update README.md

* Change requirement to brightway2 instead of bw2io

* Update README.md

* Increases the flexibility of the excel importer so it can also handle the parameter scenario files.

* Update README.md

How to install using Mamba

* Set up signals infrascructure

* Implement dialog

* Implement finding of suitable alternatives and proper management of failing that.

* Implement actual relinking

* Minor documentation improvements + store exchanges to remove instead of to keep.

* Minor documentation + code improvements

* Resolve #782 + improve documentation of `Contributions` class

* Minor documentation + code improvements

* Fix type hinting error

* Update README.md

* Update README.md

* Update README.md

* Updates to the functions get_relevant_flows and get_relevant_activities (#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.

* Multiple sdf update (#1083)

* Updates to the logging system to avoid the print statement. Merging with
commits for corrections to the uncertainty distributions that were
included within the same branch. Improves thread safety in logging
increasing stability in the multi-threaded processes.

* Changes the creation of log files. Amends the uncertainty wizard test to correct for use of logging over the standard console. Adds the .logs to .gitignore.

* 1) Simplifies the use of the python logging facility with QtThreads (as published on the python docs for logging), improving the stability of logging.\n2) Changes the generation of the logging object that is more compatible with pytest, supporting the existing test procedures.

* Provides an update to the Model for the calculation_setup Methods table, corrects for deletion of impact assessment methods. Updates the routine to the lca_setup module for calling the logger.

* Updates to the logger module, what was the ABLogger class is renamed to ABHandler. The module now contains the formats and settings for the Stream handlers. Calling of the methods in the other AB modules requires passing a logging.Logger instance and the name of the calling module. These are then incorporated into the wrapping routines in the class. Additions:\n 1) An error wrapper is provided and also explicitly provides a trace of the error.\n 2) A timestamp routine is provided and used for providing the file names for log files.\n 3) A standard location based on appdirs is provided and used for log file locations.

* Corrections to the setup of the logger in the test_uncertainty_wizard module

* Includes a change to the type used for the scenario columns when using multiple files with the combined (combinatoric) approach for the scenarios. Includes respective changes to the boolean tests applied to such Indexes.

* Minor corrections to local repository branch, to keep changes aligned

* Alterations to keep minor changes aligned with master branch and fork

---------

Co-authored-by: zoo <zoo@PK-home.kpn>

* Use node16 actions for main pipeline

* Use node16 actions in release pipeline

* Use latest version of release-changelog-builder

* Use node16 action for install canary pipeline

* Remove the special build for arm architecture

This was added before brightway2 supported multi-arch builds on
conda-forge. It is not needed anymore, because the normal AB is now also
installable on arm arch.

* Install canary updates (#1093)

* Increase timeout to 30 min

Originally the idea was that installation should never take longer than
12 min, otherwise we should get a warning with the failed pipeline. But
unfortuantely conda currently takes longer than 12 minutes to solve
the environment.

* Add mamba install canary

* Download artifacts to start implementing env comparison

* Looks like on linux it can take more than 30 minutes :-(

* 60min not enough on linux, increasing to 120

* Completely remove timeout, default is 6 hours

* Use solver libmamba option

* Add diff step to compare installations

* Use node16 actions

* Re-add the 12 timeout

* Split diff into separate steps

* Yq action only runs on linux

* debug yq formatting step

* Simplify

* more fighting with yq action

* artifacts are apparently directories in this case

* Try again with while loop

* Run on all os, but only 3.9

* ignore diff exit code

* Run canary install for 3.8 and 3.9 again

---------

Co-authored-by: haasad <haasad@users.noreply.github.com>

* Adding error message if no scenario file is loaded in a scenario LCA (#1085)

* Updated and improved contributing file

* Improve text on dependencies

* Fix canary link

* Add good/bad examples to CONTRIBUTING.md for commit messages and PR titles

* Add more specific requirements on communicating work on issues in CONTRIBUTING.md

* Minor updates to CONTRIBUTING.md and README.md

* Minor improvements to CONTRIBUTING.md

* Fix formatting error in PULL_REQUEST_TEMPLATE.md

* Resolve #1105

* Update copyright and license information to only link to one place.

* Resolve 3 bugs for location linking (#1051): 1) database of own activity was not always added (in case none of the exchanges were in own database) 2) improve handling of multiple locations. 3) replaced exchanges were deleted from the old process instead of the new one.

* Improve choosing and handling of alternative locations for location choosing

* Resolve readonly database bug for activity duplication to new activity.

* Store AB version in logfile

* Remove deprecated channels from conda envs

* Remove experimental conda environment creation and upload

I started this mostly as an experimental alternative install method with
`conda env create`. However since the channel handling isn't such a pain
anymore now that everything is on conda-forge this is obsolete.

* Move conda-envs to .github directory

* Move changelog config to .github

* Move dev recipe to .github directory

* Move stable recipe to recipe/meta.yaml

* Update dev recipe

* Use micromamba instead of miniconda to speed up tests

* Update install instructions to use libmamba solver with conda

* Fix path for dev recipe

* Added tooltip for table content

* Added docstring for data method

* Cleaning-up documentation

* Update README.md

Resolve #1127

* Add - copy on impact category copy (#1136)

* Add - copy on impact category copy #1133

* Reorder impact category tree context menu

* Resolve bug with switching project on delete (#1138)

* Switch project on delete #1075

* Cleaning up ProjectController.change_project

* Resolving comments by marc-vdm

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* Strip whitespace from search fields + implement auto-search for search boxes in databases and impact categories + remove some unused code...

* review instructions bot

* review instructions bot

* Assertion for biosphere install in test

* Added test for project deletion

* Disasbled biosphere search test

* Updated search biosphere test

* Changed a logger to reduce console spam during search

---------

Co-authored-by: bsteubing <33026150+bsteubing@users.noreply.github.com>
Co-authored-by: zoophobus <jonathan.kidner@gmail.com>
Co-authored-by: Jonathan Kidner <12627199+Zoophobus@users.noreply.github.com>
Co-authored-by: zoo <zoo@PK-home.kpn>
Co-authored-by: haasad <haasad@users.noreply.github.com>
Co-authored-by: Adrian Haas <11636405+haasad@users.noreply.github.com>
Co-authored-by: Marin Visscher <m.r.visscher@science.leidenuniv.nl>
Co-authored-by: Marin Visscher <103424764+mrvisscher@users.noreply.github.com>
marc-vdm added a commit that referenced this pull request Dec 20, 2023
* Delete .github/workflows/install-canary.yaml

* GH action script for commenting on issues when related milestone is closed.

* update bw2io requirement

* Update readme install instructions

* Update meta.yaml

* Update README.md

* Change requirement to brightway2 instead of bw2io

* Update README.md

* Increases the flexibility of the excel importer so it can also handle the parameter scenario files.

* Update README.md

How to install using Mamba

* Set up signals infrascructure

* Implement dialog

* Implement finding of suitable alternatives and proper management of failing that.

* Implement actual relinking

* Minor documentation improvements + store exchanges to remove instead of to keep.

* Minor documentation + code improvements

* Resolve #782 + improve documentation of `Contributions` class

* Minor documentation + code improvements

* Fix type hinting error

* Update README.md

* Update README.md

* Update README.md

* Updates to the functions get_relevant_flows and get_relevant_activities (#1069)

* Updates to the functions from de Koning (get_relevant_flows and get_relevant_activities), avoiding use of pandas apply and using python map functionality for splitting pandas dataframes.

* Update the use of DataFrame.applymap to DataFrame.map in the excel file importer module.

* Multiple sdf update (#1083)

* Updates to the logging system to avoid the print statement. Merging with
commits for corrections to the uncertainty distributions that were
included within the same branch. Improves thread safety in logging
increasing stability in the multi-threaded processes.

* Changes the creation of log files. Amends the uncertainty wizard test to correct for use of logging over the standard console. Adds the .logs to .gitignore.

* 1) Simplifies the use of the python logging facility with QtThreads (as published on the python docs for logging), improving the stability of logging.\n2) Changes the generation of the logging object that is more compatible with pytest, supporting the existing test procedures.

* Provides an update to the Model for the calculation_setup Methods table, corrects for deletion of impact assessment methods. Updates the routine to the lca_setup module for calling the logger.

* Updates to the logger module, what was the ABLogger class is renamed to ABHandler. The module now contains the formats and settings for the Stream handlers. Calling of the methods in the other AB modules requires passing a logging.Logger instance and the name of the calling module. These are then incorporated into the wrapping routines in the class. Additions:\n 1) An error wrapper is provided and also explicitly provides a trace of the error.\n 2) A timestamp routine is provided and used for providing the file names for log files.\n 3) A standard location based on appdirs is provided and used for log file locations.

* Corrections to the setup of the logger in the test_uncertainty_wizard module

* Includes a change to the type used for the scenario columns when using multiple files with the combined (combinatoric) approach for the scenarios. Includes respective changes to the boolean tests applied to such Indexes.

* Minor corrections to local repository branch, to keep changes aligned

* Alterations to keep minor changes aligned with master branch and fork

---------

Co-authored-by: zoo <zoo@PK-home.kpn>

* Use node16 actions for main pipeline

* Use node16 actions in release pipeline

* Use latest version of release-changelog-builder

* Use node16 action for install canary pipeline

* Remove the special build for arm architecture

This was added before brightway2 supported multi-arch builds on
conda-forge. It is not needed anymore, because the normal AB is now also
installable on arm arch.

* Install canary updates (#1093)

* Increase timeout to 30 min

Originally the idea was that installation should never take longer than
12 min, otherwise we should get a warning with the failed pipeline. But
unfortuantely conda currently takes longer than 12 minutes to solve
the environment.

* Add mamba install canary

* Download artifacts to start implementing env comparison

* Looks like on linux it can take more than 30 minutes :-(

* 60min not enough on linux, increasing to 120

* Completely remove timeout, default is 6 hours

* Use solver libmamba option

* Add diff step to compare installations

* Use node16 actions

* Re-add the 12 timeout

* Split diff into separate steps

* Yq action only runs on linux

* debug yq formatting step

* Simplify

* more fighting with yq action

* artifacts are apparently directories in this case

* Try again with while loop

* Run on all os, but only 3.9

* ignore diff exit code

* Run canary install for 3.8 and 3.9 again

---------

Co-authored-by: haasad <haasad@users.noreply.github.com>

* Adding error message if no scenario file is loaded in a scenario LCA (#1085)

* Updated and improved contributing file

* Improve text on dependencies

* Fix canary link

* Add good/bad examples to CONTRIBUTING.md for commit messages and PR titles

* Add more specific requirements on communicating work on issues in CONTRIBUTING.md

* Minor updates to CONTRIBUTING.md and README.md

* Minor improvements to CONTRIBUTING.md

* Fix formatting error in PULL_REQUEST_TEMPLATE.md

* Resolve #1105

* Update copyright and license information to only link to one place.

* Resolve 3 bugs for location linking (#1051): 1) database of own activity was not always added (in case none of the exchanges were in own database) 2) improve handling of multiple locations. 3) replaced exchanges were deleted from the old process instead of the new one.

* Improve choosing and handling of alternative locations for location choosing

* Resolve readonly database bug for activity duplication to new activity.

* Store AB version in logfile

* Remove deprecated channels from conda envs

* Remove experimental conda environment creation and upload

I started this mostly as an experimental alternative install method with
`conda env create`. However since the channel handling isn't such a pain
anymore now that everything is on conda-forge this is obsolete.

* Move conda-envs to .github directory

* Move changelog config to .github

* Move dev recipe to .github directory

* Move stable recipe to recipe/meta.yaml

* Update dev recipe

* Use micromamba instead of miniconda to speed up tests

* Update install instructions to use libmamba solver with conda

* Fix path for dev recipe

* Added tooltip for table content

* Added docstring for data method

* Cleaning-up documentation

* Update README.md

Resolve #1127

* Add - copy on impact category copy (#1136)

* Add - copy on impact category copy #1133

* Reorder impact category tree context menu

* Resolve bug with switching project on delete (#1138)

* Switch project on delete #1075

* Cleaning up ProjectController.change_project

* Resolving comments by marc-vdm

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* GH action script for commenting on issues when related milestone is closed.

* review instructions bot

* review instructions bot

* Fix non-zero reference flow message

* Fix msg formatting

* Resolve comments

---------

Co-authored-by: bsteubing <33026150+bsteubing@users.noreply.github.com>
Co-authored-by: zoophobus <jonathan.kidner@gmail.com>
Co-authored-by: Jonathan Kidner <12627199+Zoophobus@users.noreply.github.com>
Co-authored-by: zoo <zoo@PK-home.kpn>
Co-authored-by: haasad <haasad@users.noreply.github.com>
Co-authored-by: Adrian Haas <11636405+haasad@users.noreply.github.com>
Co-authored-by: Marin Visscher <m.r.visscher@science.leidenuniv.nl>
Co-authored-by: Marin Visscher <103424764+mrvisscher@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change PRs related to minor changes to AB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AB fails to identify exchange from SDF when missing key variables.
4 participants