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

ecoinvent 3.10 compatibility #1308

Merged
merged 46 commits into from
Jun 25, 2024

Conversation

mrvisscher
Copy link
Collaborator

@mrvisscher mrvisscher commented Jun 6, 2024

Replaced the default install chain with a ProjectSetupWizard that will either install the biosphere3 packaged with bw2io, or use ecoinvent_interface to download and install a specific version of ecoinvent and matching biosphere.

  • See where tests break

Fixes

  • Fix default install tests
  • Check or remove Python 3.8 & 3.9 compatibility
  • Discuss Python 3.8 & 3.9 compatibility

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation, please follow the numpy style guide.
  • Update tests.
  • 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 by using closing keywords.
  • Add a milestone to the PR (and related issues, if any) for the intended release.
  • Request a review from another developer.

jsvgoncalves and others added 26 commits June 4, 2024 14:08
Will add a `ignore-revs` commit after this one.
* Last commit changed the whole project by applying formatting. This
  avoids showing this commit on git blame.

Ideally, this is achieved globally by running the following:

```sh
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
```

Signed-off-by: João Gonçalves <jsvgoncalves@gmail.com>
also cleanup the login signal and move them out of the downloader
@mrvisscher mrvisscher requested a review from marc-vdm June 6, 2024 14:09
@coveralls
Copy link

Coverage Status

coverage: 55.448% (-0.8%) from 56.242%
when pulling 6bcc974 on mrvisscher:project-setup-wizard
into cc7ea7b on LCA-ActivityBrowser:main.

@coveralls
Copy link

Coverage Status

coverage: 55.482% (-0.8%) from 56.242%
when pulling 5e99b6c on mrvisscher:project-setup-wizard
into cc7ea7b on LCA-ActivityBrowser:main.

@coveralls
Copy link

Coverage Status

coverage: 55.314% (-0.8%) from 56.101%
when pulling 760fc19 on mrvisscher:project-setup-wizard
into ee24c15 on LCA-ActivityBrowser:main.

Copy link
Member

@marc-vdm marc-vdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, just see per comment if you change or reject, then looks fine to merge to me!

self.setSubTitle("Choose how you want to set up you project")

# radio buttons for the setup mode
radio_1 = QtWidgets.QRadioButton("Biosphere3")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a tooltip/label/info that user can still install ei later if they don't do so now.

from bw2io import migrations
from .migrations import ab_create_core_migrations

# if not len(migrations):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

self.message.setText("Unknown connection error, try again later.")
raise e

# in case of success, set the settings for permanent use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for now, but we need to add option for user to remember or not and to remove stored credentials

tests/actions/test_various_actions.py Outdated Show resolved Hide resolved
)
filename = possible[1]
else:
ERROR = """"Can't find predicted filename {filename}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One " too many and needs to be f"""..."""

activity_browser/actions/default_install.py Outdated Show resolved Hide resolved
activity_browser/mod/ecoinvent_interface/__init__.py Outdated Show resolved Hide resolved
out_filepath.unlink()
except PermissionError:
# Error on Windows during testing
message = """"Can't automatically delete {out_filepath}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as earlier, " and f""

@marc-vdm marc-vdm linked an issue Jun 20, 2024 that may be closed by this pull request
4 tasks
@marc-vdm marc-vdm added this to the 2.10 milestone Jun 20, 2024
…setup-wizard

# Conflicts:
#	.github/workflows/main.yaml
…terface' into project-setup-wizard

# Conflicts:
#	.git-blame-ignore-revs
#	activity_browser/__init__.py
#	activity_browser/actions/__init__.py
#	activity_browser/actions/activity/activity_delete.py
#	activity_browser/actions/activity/activity_relink.py
#	activity_browser/actions/biosphere_update.py
#	activity_browser/actions/database/database_delete.py
#	activity_browser/actions/database/database_relink.py
#	activity_browser/actions/default_install.py
#	activity_browser/actions/parameter/parameter_clear_broken.py
#	activity_browser/actions/parameter/parameter_delete.py
#	activity_browser/actions/parameter/parameter_rename.py
#	activity_browser/bwutils/__init__.py
#	activity_browser/bwutils/calculations.py
#	activity_browser/bwutils/exporters.py
#	activity_browser/bwutils/importers.py
#	activity_browser/bwutils/metadata.py
#	activity_browser/bwutils/multilca.py
#	activity_browser/bwutils/sensitivity_analysis.py
#	activity_browser/bwutils/strategies.py
#	activity_browser/bwutils/superstructure/__init__.py
#	activity_browser/bwutils/superstructure/graph_traversal_with_scenario.py
#	activity_browser/bwutils/superstructure/manager.py
#	activity_browser/bwutils/superstructure/mlca.py
#	activity_browser/bwutils/utils.py
#	activity_browser/controllers/plugin.py
#	activity_browser/layouts/panels/__init__.py
#	activity_browser/layouts/panels/right.py
#	activity_browser/layouts/tabs/LCA_results_tab.py
#	activity_browser/layouts/tabs/LCA_results_tabs.py
#	activity_browser/layouts/tabs/LCA_setup.py
#	activity_browser/layouts/tabs/__init__.py
#	activity_browser/layouts/tabs/activity.py
#	activity_browser/layouts/tabs/parameters.py
#	activity_browser/layouts/tabs/project_manager.py
#	activity_browser/logger.py
#	activity_browser/mod/__init__.py
#	activity_browser/mod/bw2data/backends/base.py
#	activity_browser/mod/bw2data/backends/proxies.py
#	activity_browser/ui/menu_bar.py
#	activity_browser/ui/tables/LCA_setup.py
#	activity_browser/ui/tables/__init__.py
#	activity_browser/ui/tables/delegates/__init__.py
#	activity_browser/ui/tables/impact_categories.py
#	activity_browser/ui/tables/inventory.py
#	activity_browser/ui/tables/models/__init__.py
#	activity_browser/ui/tables/models/activity.py
#	activity_browser/ui/tables/models/base.py
#	activity_browser/ui/tables/models/inventory.py
#	activity_browser/ui/tables/models/parameters.py
#	activity_browser/ui/tables/parameters.py
#	activity_browser/ui/tables/projects.py
#	activity_browser/ui/tables/views.py
#	activity_browser/ui/threading.py
#	activity_browser/ui/web/base.py
#	activity_browser/ui/web/sankey_navigator.py
#	activity_browser/ui/widgets/__init__.py
#	activity_browser/ui/widgets/cutoff_menu.py
#	activity_browser/ui/widgets/dialog.py
#	activity_browser/ui/wizards/db_import_wizard.py
#	activity_browser/utils.py
#	recipe/meta.yaml
#	tests/actions/test_activity_actions.py
#	tests/actions/test_calculation_setup_actions.py
#	tests/actions/test_database_actions.py
#	tests/actions/test_exchange_actions.py
#	tests/actions/test_method_actions.py
#	tests/actions/test_parameter_actions.py
#	tests/actions/test_project_actions.py
#	tests/actions/test_various_actions.py
#	tests/conftest.py
#	tests/legacy/test_uncertainty.py
#	tests/legacy/test_widgets.py
#	tests/wizards/test_uncertainty_wizard.py
@coveralls
Copy link

Coverage Status

coverage: 54.444% (-0.8%) from 55.287%
when pulling 6a2dd94 on mrvisscher:project-setup-wizard
into 5c523ee on LCA-ActivityBrowser:main.

@coveralls
Copy link

Coverage Status

coverage: 54.444% (-0.8%) from 55.287%
when pulling ee31373 on mrvisscher:project-setup-wizard
into 5c523ee on LCA-ActivityBrowser:main.

@coveralls
Copy link

Coverage Status

coverage: 54.444% (-0.8%) from 55.287%
when pulling 2d188d6 on mrvisscher:project-setup-wizard
into 5c523ee on LCA-ActivityBrowser:main.

@mrvisscher mrvisscher merged commit ab9cdaa into LCA-ActivityBrowser:main Jun 25, 2024
9 checks passed
@marc-vdm marc-vdm added the feature Issues/PRs related to a new feature label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues/PRs related to a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ecoinvent 3.10 support
6 participants