-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes part of #629 (the results are not automatically associated yet). The Open button now supports toml instead of gpkg. The toml file checks for the "database" entry and loads that file as it used to do. The New button now also creates a toml file with the database entry pointing to the gpkg that is also created like before. And the start and end dates are 01-01-2020 until 01-01-2030. An option for another PR would be to add the start and end dates as fields in the main widget so that they can be adjusted. But that would mean that we need to keep the open toml file in memory and set the start and end date, and flush the file after those changes. Also, error handling is not fancy yet. If the "database" entry is missing from the toml file, you will get a python KeyError The folder `qgis` was renamed to `ribasim_qgis` for pylance to handle the imports better. --------- Co-authored-by: Martijn Visser <[email protected]>
- Loading branch information
1 parent
22beb03
commit 5c6a369
Showing
25 changed files
with
881 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copied from https://github.com/python/cpython/blob/v3.12.0/Lib/tomllib/__init__.py | ||
# QGIS does not guarantee a toml reader | ||
|
||
# SPDX-License-Identifier: MIT | ||
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen | ||
# Licensed to PSF under a Contributor Agreement. | ||
|
||
__all__ = ("loads", "load", "TOMLDecodeError") | ||
|
||
from ._parser import TOMLDecodeError, load, loads | ||
|
||
# Pretend this exception was created here. | ||
TOMLDecodeError.__module__ = __name__ |
Oops, something went wrong.