cauldron / activity-browser

GUI for Brightway
GNU Lesser General Public License v3.0
0 stars 3 forks source link

Project tarball import functionality #38

Closed cmutel closed 3 months ago

cmutel commented 3 months ago

Feature request

Brightway has the ability to import project backup files (tarballs), either from a remote server or locally. We would like to add this to the AB.

I have started this work in the import-project branch but don't know Qt well enough to do this well or efficiently.

Local import

Modal window with the following:

Upon selecting a file, the system should open it and look for a file called .project-name.json (see implementation code), and read the default project name.

Anytime editing is finished on the QLineEdit for the project name, either because it was populated from .project-name.json or manually by the user, we should check if the given project name is already in bw2data.projects. If it is, then the checkbox to overwrite existing project should be active (but not checked), and the button to execute the import action should be inactive until the checkbox is checked. Similarly, if the given project name does not exist locally, then the checkbox should be inactive, and the button can be clicked directly.

Remote import

Screenshot 2024-08-12 at 10 35 54

What we currently have - this needs to be better

Modal window or wizard with two steps. First, to get the remote resource:

Next (can be a separate wizard step or in the same window):

Logic flows the same as for the local import, overwrite only active if the project name overlaps.