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

Database relink after creation #446

Merged
merged 6 commits into from
Sep 23, 2020
Merged

Database relink after creation #446

merged 6 commits into from
Sep 23, 2020

Conversation

dgdekoning
Copy link
Contributor

Allow users to relink database exchanges after importing or creating them.

This feature combines the bw2io importing tools with the bw2data database editing and processing tools.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 53.779% when pulling 8099f15 on dgdekoning:database-relink into a29b7f5 on LCA-ActivityBrowser:2.6.1.

@dgdekoning dgdekoning merged commit 34238f2 into LCA-ActivityBrowser:2.6.1 Sep 23, 2020
dgdekoning added a commit that referenced this pull request Sep 27, 2020
* Excel import and export (#440)

* Import from excel

* Add ABExcelImporter class to bwutils

* Add excel import page

* Wire the new page into the database import wizard

* Implement excel exporter for databases

* Restructure importer code (#442)

* Move ABPackage class to bwutils

* Add Remote and Local wizard page classes

* Streamline ecoinvent login code

* Unify the design for all pages

* Some function decorators and annotations

* Bugfixes (#444)

* Fix broken import wizard from menu link

* Filter exchange flows that do not exist in the LCA matrix

* Ensure import wizard cannot be clicked out of

* Add excel exceptions (#443)

* Add altered version of bw2ip write_lci_excel method

* Return name instead of index for link_db field

* Give the user at least 10 of the unlinked exchanges in the debug console.

* Allow database to be overwritten correctly

* Force reference product existence

* No opening the downstream table on update

* Database relink after creation (#446)

* Add signal for relinking

* Extend DatabaseRelinkDialog with another classmethod

* Add strategy for relinking an sqlite database

* Add relinking action to database table and add check for writable database

* Add relink method to controller

* [skip ci] Slightly change 7z option text

* Overhaul the flow for importing excel files (#447)

* New strategy for the ABExcelImporter

* Customize the automated import method further

* Feed the database name into the importer and signal that params have (possibly) changed

* Add classmethod for asking for any kind of db

* Add excel fixing method for unlinked exchanges

* Add wiring and alter method for linking

* Cleanup of unused code

* Extend database export wizard (#448)

* Add special export method to ABPackage

* Implement the special export for BW2Package export

* Edit excel exporter to handle given path

* Add browse button and wiring to db export wizard

* Tweak excel importer (#449)

* Add hashing strategy to avoid group clashes

* Implement the strategy

* Add special linking and relinking strategies

* Automatically suggest same database if in options

* Include set of database names in the StrategyError

* Rework excel fixing method and signal to handle multiple relinking databases

* Implement the strategies for (re)linking

* [skip ci] Move writing of project parameters

* Fix for excel export (#451)

* Ensure previous failed import doesn't impact future one

* Add errors.py to bwutils

* Add special exception to avoid infinite looping

* Catch and show information about the failed linking

* Drop unused method from ABExcelImporter class

* Subclass CSVFormatter, force inclusion of database from input

* Switch CSVFormatter class and drop bw import

* Make db export more intuitive and error resistant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants