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

image upload #1

Closed
visr opened this issue Jul 15, 2022 · 20 comments
Closed

image upload #1

visr opened this issue Jul 15, 2022 · 20 comments

Comments

@visr
Copy link
Member

visr commented Jul 15, 2022

Uploading images here won't work anymore for displaying them in our docs, due to GitHub changes, see https://github.blog/changelog/2023-05-09-more-secure-private-attachments/

Using HTML img tags like this still works:

<img alt="Cascading polders" src="https://github.com/Deltares/Ribasim/assets/4471859/6dba5af2-14fb-47a5-bdfe-69c2c41f761d" class="img-fluid">

bar

timeseries

Hupselse Beek

@visr visr closed this as completed Jul 15, 2022
@AmyWilcox1 AmyWilcox1 reopened this Aug 26, 2022
@AmyWilcox1
Copy link
Contributor

Mozart_comparison_Hupsel

Mozart_comparison_Hupsel_2

Mozart_comparison_Tol

Mozart_comparison_Tol_2

@AmyWilcox1
Copy link
Contributor

[](url
multi_user_plot
)

@AmyWilcox1
Copy link
Contributor

Hupsel_series

@AmyWilcox1
Copy link
Contributor

tol_series2

@Huite
Copy link
Contributor

Huite commented Aug 31, 2022

Hupsel-primary-secondary

@Huite
Copy link
Contributor

Huite commented Aug 31, 2022

Hupsel-primary
Hupsel-secondary
Hupsel-tertiary

@Huite
Copy link
Contributor

Huite commented Aug 31, 2022

VolumeDepth

VolumeDischarge

@visr
Copy link
Member Author

visr commented Aug 31, 2022

Deltares_logo_D-blauw_RGB
NHI_outs

icon

@Huite
Copy link
Contributor

Huite commented Aug 31, 2022

Hupsel-level-grid
Hupsel-volume-grid

@Huite
Copy link
Contributor

Huite commented Aug 31, 2022

hupsel-steady-state
hupsel-steady-state-volume0

@Huite
Copy link
Contributor

Huite commented Aug 31, 2022

tol-steady-state
coupled-tol-steady-state

visr pushed a commit that referenced this issue Mar 6, 2023
basic example: fid starts at 1
@visr
Copy link
Member Author

visr commented Mar 14, 2023

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

cascade-polder
image

Hofer-Julian pushed a commit that referenced this issue Mar 14, 2023
I imagine later on there will be multiple QGIS pages, so I created a
separate folder just like for the Python package.

This is a translation of the how-to guide by @gijsber, with some small
edits.

Images are stored in #1.
Fixes #96 


![image](https://user-images.githubusercontent.com/4471859/224959221-0e5f8a94-acee-41d2-9505-442ddca8b6b7.png)
@visr visr pinned this issue Mar 28, 2023
@visr visr unpinned this issue Mar 28, 2023
visr added a commit that referenced this issue Feb 12, 2024
Needed for #1110.

Before node IDs were globally unique. If you had the ID, you could look
up the type in the Node table. When designing #1110 we came to the
conclusion that this was not the right choice. It requires you to be
aware of the IDs that are used throughout the model, whereas with this
you only need to make sure that `Pump #5` doesn't already exist.

Most of the updates in this PR were to correct the tests. Some of the
code and error messages became easier to read. If we talk about a node
then we always know what the type is, there is no need to look it up
first.

Most tables stay the same, e.g. if you have a `Terminal / static` table
with a `node_id` Int column, you know that this refers to a Terminal
NodeID. Only when connecting to other nodes do we need to specify the
type next to the ID. So the `Edge` table now gets `from_node_type` next
to `from_node_id`, the `PidControl / static` gets `listen_node_type`
next to `listen_node_id`, etc. These extra columns are currently
automatically filled in by Ribasim-Python on model save, hence they
don't require changing the test models.

In terms of implementation, this basically adds the `type` field to
`NodeID` and fixes the resulting errors.

```julia
struct NodeID
    type::NodeType.T
    value::Int
end
```

It does not yet test if models with the same node IDs (`Pump #1` and
`Basin #1`) work, but this is hard to do right now with Ribasim Python,
so best left for a later moment.

---------

Co-authored-by: Hofer-Julian <[email protected]>
@visr
Copy link
Member Author

visr commented Jun 10, 2024

hws

@github-project-automation github-project-automation bot moved this to To do in Ribasim Jun 10, 2024
visr added a commit that referenced this issue Jul 23, 2024
Fixes #1350

This is an example `ribasim.log`:

```
┌ Info: Starting a Ribasim simulation.
│   cli.ribasim_version = 2024.9.0
│   starttime = 2020-01-01T00:00:00
│   endtime = 2020-12-01T00:00:00
└ @ Ribasim D:\repo\ribasim\Ribasim\core\src\main.jl:42
┌ Error: Invalid edge type 'foo' for edge #0 from node #1 to node #2.
└ @ Ribasim D:\repo\ribasim\Ribasim\core\src\validation.jl:520
┌ Error: Invalid edge type 'bar' for edge #1 from node #2 to node #3.
└ @ Ribasim D:\repo\ribasim\Ribasim\core\src\validation.jl:520
ERROR: Invalid edge types found.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] Ribasim.Model(config::Ribasim.config.Config)
    @ Ribasim D:\repo\ribasim\Ribasim\core\src\model.jl:59
  [3] run(config::Ribasim.config.Config)
    @ Ribasim D:\repo\ribasim\Ribasim\core\src\main.jl:11
  [4] (::Ribasim.var"#215#217"{IOStream, Ribasim.config.Config})()
    @ Ribasim D:\repo\ribasim\Ribasim\core\src\main.jl:45
  [5] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:515
  [6] with_logger
    @ .\logging.jl:627 [inlined]
  [7] #214
    @ D:\repo\ribasim\Ribasim\core\src\main.jl:36 [inlined]
  [8] open(::Ribasim.var"#214#216"{Ribasim.config.Config}, ::String, ::Vararg{String}; kwargs::@kwargs{})
    @ Base .\io.jl:396
  [9] open
    @ .\io.jl:393 [inlined]
 [10] main(toml_path::String)
    @ Ribasim D:\repo\ribasim\Ribasim\core\src\main.jl:34
 [11] (::Main.var"##227".var"#1#2")()
    @ Main.var"##227" d:\repo\ribasim\Ribasim\core\test\main_test.jl:42
 [12] (::IOCapture.var"#5#9"{DataType, Main.var"##227".var"#1#2", IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, Base.PipeEndpoint, Base.PipeEndpoint})()
    @ IOCapture C:\Users\visser_mn\.julia\packages\IOCapture\Y5rEA\src\IOCapture.jl:170
 [13] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:515
 [14] with_logger
    @ .\logging.jl:627 [inlined]
 [15] capture(f::Main.var"##227".var"#1#2"; rethrow::Type, color::Bool, passthrough::Bool, capture_buffer::IOBuffer, io_context::Vector{Any})
    @ IOCapture C:\Users\visser_mn\.julia\packages\IOCapture\Y5rEA\src\IOCapture.jl:167
 [16] capture(f::Function)
    @ IOCapture C:\Users\visser_mn\.julia\packages\IOCapture\Y5rEA\src\IOCapture.jl:100
 [17] top-level scope
    @ d:\repo\ribasim\Ribasim\core\test\main_test.jl:41
 [18] eval
    @ .\boot.jl:385 [inlined]
 [19] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base .\loading.jl:2076
 [20] include_string(m::Module, txt::String, fname::String)
    @ Base .\loading.jl:2086
 [21] #invokelatest#2
    @ .\essentials.jl:892 [inlined]
 [22] invokelatest
    @ .\essentials.jl:889 [inlined]
 [23] #8
    @ c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:115 [inlined]
 [24] withpath(f::VSCodeTestServer.var"#8#10"{UInt64, String, String, Module}, path::String)
    @ VSCodeTestServer c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:20
 [25] run_testitem_handler(conn::VSCodeTestServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::VSCodeTestServer.TestserverRunTestitemRequestParams)
    @ VSCodeTestServer c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:114
 [26] dispatch_msg(x::VSCodeTestServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeTestServer.JSONRPC.MsgDispatcher, msg::Dict{String, Any})
    @ VSCodeTestServer.JSONRPC c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\JSONRPC\src\typed.jl:67
 [27] serve_in_env(conn::Base.PipeEndpoint)
    @ VSCodeTestServer c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:215
 [28] #14
    @ c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:234 [inlined]
 [29] (::VSCodeTestServer.TestEnv.var"#3#4"{VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}})()
    @ VSCodeTestServer.TestEnv c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\TestEnv\src\julia-1.9\activate_do.jl:19
 [30] withenv(::VSCodeTestServer.TestEnv.var"#3#4"{VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}}, ::Pair{String, String}, ::Vararg{Pair{String}})
    @ Base .\env.jl:257
 [31] (::Pkg.Operations.var"#117#122"{String, Bool, Bool, Bool, VSCodeTestServer.TestEnv.var"#3#4"{VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}}, Pkg.Types.PackageSpec})()
    @ Pkg.Operations C:\Users\visser_mn\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1825
 [32] with_temp_env(fn::Pkg.Operations.var"#117#122"{String, Bool, Bool, Bool, VSCodeTestServer.TestEnv.var"#3#4"{VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}}, Pkg.Types.PackageSpec}, temp_env::String)
    @ Pkg.Operations C:\Users\visser_mn\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1706
 [33] (::Pkg.Operations.var"#115#120"{Nothing, Bool, Bool, Bool, VSCodeTestServer.TestEnv.var"#3#4"{VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
    @ Pkg.Operations C:\Users\visser_mn\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1795
 [34] mktempdir(fn::Pkg.Operations.var"#115#120"{Nothing, Bool, Bool, Bool, VSCodeTestServer.TestEnv.var"#3#4"{VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String}, parent::String; prefix::String)
    @ Base.Filesystem .\file.jl:766
 [35] mktempdir(fn::Function, parent::String)
    @ Base.Filesystem .\file.jl:762
 [36] mktempdir
    @ .\file.jl:762 [inlined]
 [37] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project; preferences::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations C:\Users\visser_mn\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1753
 [38] sandbox
    @ C:\Users\visser_mn\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1744 [inlined]
 [39] activate(f::VSCodeTestServer.var"#14#16"{Base.PipeEndpoint}, pkg::String; allow_reresolve::Bool)
    @ VSCodeTestServer.TestEnv c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\TestEnv\src\julia-1.9\activate_do.jl:17
 [40] activate
    @ c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\TestEnv\src\julia-1.9\activate_do.jl:12 [inlined]
 [41] serve(conn::Base.PipeEndpoint, project_path::String, package_path::String, package_name::String; is_dev::Bool, crashreporting_pipename::Nothing)
    @ VSCodeTestServer c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:233
 [42] serve(conn::Base.PipeEndpoint, project_path::String, package_path::String, package_name::String)
    @ VSCodeTestServer c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\packages\VSCodeTestServer\src\VSCodeTestServer.jl:219
 [43] top-level scope
    @ c:\Users\visser_mn\.vscode\extensions\julialang.language-julia-1.83.2\scripts\testserver\testserver_main.jl:17
 [44] include(mod::Module, _path::String)
    @ Base .\Base.jl:495
 [45] exec_options(opts::Base.JLOptions)
    @ Base .\client.jl:318
 [46] _start()
    @ Base .\client.jl:552
```
@SouthEndMusic
Copy link
Collaborator

model_on_map

@evetion
Copy link
Member

evetion commented Aug 27, 2024

Screenshot 2024-08-27 at 14 18 03 Screenshot 2024-08-27 at 14 17 28 Screenshot 2024-08-27 at 14 10 21

@Jingru923
Copy link
Contributor

Jingru923 commented Aug 30, 2024

Pictures for quick start guide
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

@Jingru923 Jingru923 reopened this Aug 30, 2024
@Jingru923
Copy link
Contributor

How can I make sure the url of my image is user-image not private-user-image?

@Huite
Copy link
Contributor

Huite commented Aug 30, 2024

What do you mean? If you're worried that it's private, just open an incognito tab in your browser and put the URL there.
Edge even has a "Open link in InPrivate window" if you right-click the image.

By the way, it might be worthwhile to experiment with exporting matplotlib figures as SVG instead. They'll be nice and crisp then.

QGIS also has an export to SVG option: https://docs.qgis.org/3.34/en/docs/user_manual/print_composer/create_output.html#export-as-svg

@Jingru923
Copy link
Contributor

@Huite Thanks! But if the picture's url starts with private-user-image, then our document will not able to find it and display it. That's why I was asking

@evetion
Copy link
Member

evetion commented Aug 30, 2024

If you edit your post you should be able to see non-private image urls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

6 participants