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

Allow project export and import #1148

Merged
merged 100 commits into from
Jun 25, 2024

Conversation

marc-vdm
Copy link
Member

@marc-vdm marc-vdm commented Dec 4, 2023

TODO

  • add input sanitation for project name that can't be empty string
  • implement proper tests for import/export
  • allow user defined name of export file
  • Check macOS support
  • does AB properly close folder so other programs can use/delete them?

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.
  • Request a review from another developer.

@marc-vdm marc-vdm added the change PRs related to minor changes to AB label Dec 4, 2023
@marc-vdm marc-vdm added this to the 2.9.3 milestone Dec 4, 2023
@marc-vdm marc-vdm marked this pull request as ready for review December 4, 2023 17:49
@coveralls
Copy link

coveralls commented Dec 4, 2023

Coverage Status

coverage: 56.144% (+0.04%) from 56.101%
when pulling 7446a3a on marc-vdm:project_import_export
into ee24c15 on LCA-ActivityBrowser:main.

marc-vdm and others added 23 commits December 4, 2023 20:15
How to install using Mamba
…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.
* 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>
@marc-vdm marc-vdm modified the milestones: 2.9.3, 2.10 Dec 13, 2023
@marc-vdm marc-vdm added feature Issues/PRs related to a new feature and removed change PRs related to minor changes to AB labels Dec 13, 2023
@marc-vdm marc-vdm removed the request for review from mrvisscher December 13, 2023 09:33
@marc-vdm marc-vdm changed the base branch from master to v2.10.0 February 9, 2024 14:08
@marc-vdm marc-vdm changed the base branch from v2.10.0 to minor February 20, 2024 12:31
@mrvisscher mrvisscher changed the base branch from minor to main June 7, 2024 08:19
@mrvisscher mrvisscher marked this pull request as ready for review June 10, 2024 14:10
@mrvisscher mrvisscher self-requested a review June 10, 2024 14:10
Copy link
Member Author

@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.

Besides this and the lack of progress indication for writing of file that is currently hard to understand for users, seems good!

"""
return

# project_name = "default"
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove or fix?

@@ -0,0 +1,32 @@
name: notify reviewer
Copy link
Member Author

Choose a reason for hiding this comment

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

I think we removed this again at some point but due to a mess in merging this file is still here, remove?

@mrvisscher mrvisscher merged commit 0dca404 into LCA-ActivityBrowser:main Jun 25, 2024
12 checks passed
@marc-vdm marc-vdm deleted the project_import_export branch June 27, 2024 13:46
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
6 participants