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

Zoltan/defining default allocation #45

Merged

Conversation

zoltanszocs
Copy link
Collaborator

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

ughstudios and others added 6 commits June 8, 2024 14:20
Resolves cauldron#22

- The issue here is that bd.projects.get_base_directories() will return a Path object which cannot be serialized. We can address this by simply converting it to a string before saving it out.

===== TESTS ======
I tested by ensuring my local copy of AB would boot up without issues. Prior to this, I was getting errors about the json file not being readable or writable with json.load or json.dump
…tings-is-invalid

app will crash if settings is invalid
- sorting after changing a  def alloc field does not always work automatically (sorting column and order is reset by the update_proxy_model() call)
- checking the read-only checkboxes sometimes triggers a reorder of the table (probably because of the sync() call)
- application crashes when flushing the databases (even without changes),
  because flush() triggers a sync(), which does not call begin / end ModelReset()
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10628628341

Details

  • 33 of 54 (61.11%) changed or added relevant lines in 4 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.003%) to 54.305%

Changes Missing Coverage Covered Lines Changed/Added Lines %
activity_browser/ui/tables/inventory.py 8 9 88.89%
activity_browser/ui/tables/delegates/combobox.py 9 19 47.37%
activity_browser/ui/tables/models/inventory.py 15 25 60.0%
Files with Coverage Reduction New Missed Lines %
activity_browser/ui/tables/inventory.py 1 55.83%
activity_browser/bwutils/uncertainty.py 5 93.33%
Totals Coverage Status
Change from base Build 10594244959: 0.003%
Covered Lines: 8244
Relevant Lines: 15181

💛 - Coveralls

- on the read-only flag: here we expect clicks to toggle the flag
- on the default allocation column, when the database is not read-only: in this case we expect the item editor for the cell to open
createIndex(row, col) only works with QTableView and with no proxy model, in all these cases index is the correct method to call.
@cmutel
Copy link

cmutel commented Sep 5, 2024

@zoltanszocs This is good progress! The double-click to change database default allocation is definitely not intuitive, but I don't think we need to worry about that right now.

I updated #33 with more detail on the remaining tasks.

Database processes which have the type multifunctional cannot be dragged into calculation setups

This is blocked by brightway-lca/multifunctional#23

Uses should be able to see if the given allocation property key is present and non-zero for each functional exchange of each multifunctional process in a database.

I don't see the allocation values, not sure where the bug is. According to the tests this information is being stored correctly?

@zoltanszocs zoltanszocs marked this pull request as ready for review October 4, 2024 08:18
@cmutel cmutel merged commit c906c26 into cauldron:brightway25 Oct 4, 2024
2 of 11 checks passed
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.

4 participants