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

Register 0.20.0 #370

Closed
joa-quim opened this issue Jun 1, 2020 · 22 comments
Closed

Register 0.20.0 #370

joa-quim opened this issue Jun 1, 2020 · 22 comments

Comments

@joa-quim
Copy link
Member

joa-quim commented Jun 1, 2020

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Registration pull request created: JuliaRegistries/General/15679

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.20.0 -m "<description of version>" ba041d444e2bcb14b8d1e54d81352587329d2785
git push origin v0.20.0

@htyeim
Copy link
Contributor

htyeim commented Jun 1, 2020

ERROR: LoadError: LoadError: failed process: Process(`which gmt`, ProcessExited(1)) [1]

So JuliaRegistries don't install GMT first .....

I think may be modify the following code:


	s = readlines(`which gmt`);
	if isempty(s)  throw(error("which gmt error!"))  end

to

try
    s = readlines(`which gmt`);
    if isempty(s)  throw(error("which gmt error!"))  end
catch
   # bypass the problem
    @warn "GMT may not be installed correctly. Please check https://github.com/GenericMappingTools/gmt/blob/master/INSTALL.md"
   return "libgmt"
end

just give a warn, then return "libgmt" which is the logic used before.

@joa-quim
Copy link
Member Author

joa-quim commented Jun 1, 2020

Actually I had thought in just doing

if isempty(s)  return "libgmt"	end 	# Return this so that the automatic registering of new versions does not fail

The reason for nor issue a warning here is because a more complete warning is printed in the GMT.jl file.

@joa-quim
Copy link
Member Author

joa-quim commented Jun 1, 2020

So JuliaRegistries don't install GMT first .....

No, a general solution to install does not exist and I don't want to go the BinaryBuild way because it would mean a crippled GDAL install and MinGW builds for Windows.

@htyeim
Copy link
Contributor

htyeim commented Jun 1, 2020

It's good. Because GMT provides other ways to interact with it.

So just add try catch to handle which gmt return error code (non 0)? I think the main problem is
readlines (`which gmt`)
It will return a error not "" if the program don't exist.

julia> s = readlines(`which gmtasdf`);
ERROR: failed process: Process(`which gmtasdf`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] (::Base.var"#557#558"{Base.Process})() at ./process.jl:319
 [3] iterate(::Base.EachLine{Base.PipeEndpoint}, ::Nothing) at ./io.jl:964 (repeats 2 times)
 [4] _collect(::UnitRange{Int64}, ::Base.EachLine{Base.PipeEndpoint}, ::Base.HasEltype, ::Base.SizeUnknown) at ./array.jl:614
 [5] collect at ./array.jl:603 [inlined]
 [6] #readlines#293 at ./io.jl:498 [inlined]
 [7] readlines(::Cmd) at ./io.jl:498
 [8] top-level scope at REPL[2]:1

@joa-quim
Copy link
Member Author

joa-quim commented Jun 1, 2020

Yes, you are right. Will look at it tomorrow. Now it's very late here (GMT (time) +1)

@htyeim
Copy link
Contributor

htyeim commented Jun 1, 2020

OK. Thank you~ It is 11:26 am at China.

@joa-quim
Copy link
Member Author

joa-quim commented Jun 1, 2020

Dumb me. I had the cleanest solution under my fingers all the time. Please try master. It passed the CI so no reason to not work in Mac.

@htyeim
Copy link
Contributor

htyeim commented Jun 2, 2020

 t@lmp~  cd GitHub
 t@lmp~/GitHub  git clone https://github.com/GenericMappingTools/GMT.jl.git
Cloning into 'GMT.jl'...
remote: Enumerating objects: 2894, done.
remote: Counting objects: 100% (2894/2894), done.
remote: Compressing objects: 100% (419/419), done.
remote: Total 23245 (delta 1418), reused 2599 (delta 1171), pack-reused 20351
Receiving objects: 100% (23245/23245), 34.86 MiB | 755.00 KiB/s, done.
Resolving deltas: 100% (13363/13363), done.
 t@lmp~/GitHub  cd GMT.jl
 t@lmp~/GitHub/GMT.jl   master  julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.4.2 (2020-05-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.4) pkg> activate .
 Activating environment at `~/GitHub/GMT.jl/Project.toml`

(GMT) pkg> test
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Updating `~/GitHub/GMT.jl/Project.toml`
  [de0858da] + Printf
   Updating `~/GitHub/GMT.jl/Manifest.toml`
  [de0858da] + Printf
  [4ec0a83e] + Unicode
    Testing GMT
Status `/private/var/folders/ss/65r_tg917hg47rkrfjxk9ftc0000gn/T/jl_a5Hpiy/Manifest.toml`
  [5752ebe1] GMT v0.20.0 [`~/GitHub/GMT.jl`]
  [2a0f44e3] Base64
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [56ddb016] Logging
  [d6f4376e] Markdown
  [de0858da] Printf
  [9a3f8284] Random
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [8dfed614] Test
  [4ec0a83e] Unicode
6.0.0
┌ Warning: Unknown units request (lolo) Ignoring it
└ @ GMT ~/GitHub/GMT.jl/src/common_options.jl:1764
┌ Warning: Color lines (or fill) from a color scale was selected but no color scale provided. Expect ...
└ @ GMT ~/GitHub/GMT.jl/src/psxy.jl:117
┌ Warning: Ignoring the axis 'equal' request because figsize with Width and Height already provided.
└ @ GMT ~/GitHub/GMT.jl/src/common_options.jl:256
┌ Warning: Very likely the projection name (blabla) is unknown to me. Expect troubles
└ @ GMT ~/GitHub/GMT.jl/src/common_options.jl:379
┌ Warning: Empty units. Ignoring this units request.
└ @ GMT ~/GitHub/GMT.jl/src/common_options.jl:1743
gmt gmtset [core] 6.0.0 [64-bit] - Change individual GMT default settings

usage: gmt gmtset [-C | -D[s|u] | -G<defaultsfile>] [-[BJRXYcp]<value>] PARAMETER1 [=] value1 PARAMETER2 [=] value2 PARAMETER3 [=] value3 ...

	For available PARAMETERS, see gmt.conf man page.

"FITCIRCLE" = "FITCIRCLE"
"GMT2KML & KML2GMT" = "GMT2KML & KML2GMT"
"GMTCONNECT" = "GMTCONNECT"
"GMTCONVERT" = "GMTCONVERT"
"GMTREGRESS" = "GMTREGRESS"
"GMTLOGO" = "GMTLOGO"
"GMTSPATIAL" = "GMTSPATIAL"
"GMTSELECT" = "GMTSELECT"
"GMTSET" = "GMTSET"
"GMTSIMPLIFY" = "GMTSIMPLIFY"
"GMTREADWRITE" = "GMTREADWRITE"
Pixel node registration used
x_min: 1.0	x_max :33.0	x_inc :1.0	n_columns :32
y_min: 0.0	y_max :32.0	y_inc :1.0	n_rows :32
z_min: NaN	z_max :NaN
"GMTVECTOR" = "GMTVECTOR"
"GRDINFO" = "GRDINFO"
"GRD2CPT" = "GRD2CPT"
"GRDBLEND" = "GRDBLEND"
"GRD2KML" = "GRD2KML"
"GRDCLIP" = "GRDCLIP"
"GRDCONTOUR" = "GRDCONTOUR"
"GRDCUT" = "GRDCUT"
"GRDFFT" = "GRDFFT"
"GRDFIL" = "GRDFIL"
"GRDFILTER" = "GRDFILTER"
"GRDGRADIENT" = "GRDGRADIENT"
"GRDHISTEQ" = "GRDHISTEQ"
"GRDLANDMASK" = "GRDLANDMASK"
"GRDPROJECT" = "GRDPROJECT"
"GRDTREND" = "GRDTREND"
┌ Warning: Usage error, both difference and trend were required. Ignoring the trend request.
└ @ GMT ~/GitHub/GMT.jl/src/grdtrend.jl:60
"GRDTRACK" = "GRDTRACK"
"GRDVECTOR" = "GRDVECTOR"
"GRDVOLUME" = "GRDVOLUME"
"GRDIMAGE" = "GRDIMAGE"
"GRDVIEW" = "GRDVIEW"
"GREENSPLINE" = "GREENSPLINE"
"IMSHOW" = "IMSHOW"
"MAKECPT" = "MAKECPT"
"MAPPROJECT" = "MAPPROJECT"
"PLOT" = "PLOT"
┌ Warning: option *ms* is ignored when either *S* or *symbol* options are used
└ @ GMT ~/GitHub/GMT.jl/src/psxy.jl:144
┌ Warning: markerline overrides markeredgecolor
└ @ GMT ~/GitHub/GMT.jl/src/psxy.jl:161
┌ Warning: option *ms* is ignored when either *S* or *symbol* options are used
└ @ GMT ~/GitHub/GMT.jl/src/psxy.jl:144
┌ Warning: option *marker* is ignored when either *S* or *symbol* options are used
└ @ GMT ~/GitHub/GMT.jl/src/psxy.jl:148
┌ Warning: You cannot use both markerline and W or pen keys.
└ @ GMT ~/GitHub/GMT.jl/src/psxy.jl:165
"PLOT3D" = "PLOT3D"
"ARROWS" = "ARROWS"
"LINES" = "LINES"
Warning: the following options were not consumed in psxy => [:vec]
"SCATTER" = "SCATTER"
┌ Warning: Justification code provided (bottomrigh) is not valid. Defaulting to TopRight
└ @ GMT ~/GitHub/GMT.jl/src/common_options.jl:2725
"BARPLOT" = "BARPLOT"
"BAR3" = "BAR3"
"PROJECT" = "PROJECT"
"PSBASEMAP" = "PSBASEMAP"
"PSCLIP" = "PSCLIP"
"PSCONVERT" = "PSCONVERT"
psbasemap [ERROR]: 1 external clip operations were not terminated!
"PSCOAST" = "PSCOAST"
┌ Warning: The 'clip' argument can only be a string with 'land', 'water' or 'end'. Ignoring it.
└ @ GMT ~/GitHub/GMT.jl/src/pscoast.jl:113
"PSCONTOUR" = "PSCONTOUR"
"PSIMAGE" = "PSIMAGE"
"PSSCALE" = "PSSCALE"
"PSHISTOGRAM" = "PSHISTOGRAM"
"PSLEGEND" = "PSLEGEND"
"PSROSE" = "PSROSE"
"PSMASK" = "PSMASK"
"PSSOLAR" = "PSSOLAR"
"PSTERNARY" = "PSTERNARY"
"PSTEXT" = "PSTEXT"
"PSWIGGLE" = "PSWIGGLE"
pswiggle [COMPATIBILITY]: -S option is deprecated; use -D instead.
"SPECTRUM1D" = "SPECTRUM1D"
"SPHTRIANGULATE" = "SPHTRIANGULATE"
"SPHINTERPOLATE" = "SPHINTERPOLATE"
"SPHDISTANCE" = "SPHDISTANCE"
"MODERN" = "MODERN"
Warning: the following options were not consumed in 1x1 => [:name]

Yes, I think it works! Thank you~

@joa-quim
Copy link
Member Author

joa-quim commented Jun 2, 2020

Yes it worked thanks.
I think you could have just done ] add GMT#master
The Warnings and ERRORS (most of them) are on purpose. I mean, to exercise the lines that print them.

Now I have to wait till someone resolve manually the situation of the stalled registration request.

@htyeim
Copy link
Contributor

htyeim commented Jun 2, 2020

Is it possible to register another release e.g. 0.20.1 and ignore this release?

I found that if I used push!(Libdl.DL_LOAD_PATH, gmtlibpath), the julia will break when I use VideoIO to combine the figures generated by GMT.jl into a movie...


1|debug> nc
failed to lookup source code, showing lowered code:
In #mux#13(silent, deletestream, , srcfilename, destfilename, framerate) at /Users/t/.julia/packages/VideoIO/TAILL/src/encoding.jl:217
 47  │    %47  = (%45)(%46)
 48  │    %48  = FFMPEG.exe
 49  │    %49  = (Core.kwfunc)(%48)
 50  │    %50  = FFMPEG.exe
>51  │           muxout = (%49)(%47, %50, %43)
 52  │           #14 = %new(VideoIO.var"#14#15")
 53  │    %53  = #14
 54  │           (filter!)(%53, muxout)
 55  │    %55  = (getindex)(muxout, 1)

About to run: <(FFMPEG.var"#exe##kw"())((collect = true,), FFMPEG.exe, `-y -framerate 39 -i /Users/t/.julia/dev/HTec...>
1|debug> nc

signal (11): Segmentation fault: 11
in expression starting at REPL[10]:18
[1]    86802 segmentation fault  julia

This might be related to libpostscriptlight in gmt's lib because if I opened a julia and only used VideoIO it works well. But I don't know what happened..

Anyway, the new version without add something into DL_LOAD_PATH would be great.

@joa-quim
Copy link
Member Author

joa-quim commented Jun 2, 2020

Is it possible to register another release e.g. 0.20.1 and ignore this release?

I think it will fail also because it would jumping from 0.19.0 to 0.20.1

The movie module in GMT.jl is very experimental. It is very difficult to adapt because the GMT movie module works a lot by generating and running bash scripts. You will probably be better served if you use the command line directly. But it's true that I didn't test it much.

@htyeim
Copy link
Contributor

htyeim commented Jun 2, 2020

Maybe you can just register again (@.... register())? ref JuliaRegistries/General#15475 (comment)

Generally speaking, if you want to fix an automerge issue, just fix it and retrigger again registration with the same version, so that the already open PR will be automatically updated.

Also I found it's possible to register again and again (difference versions) in a single issue...


I think GMT.jl is great because I don't like bash command (poor variables, scopes, DataType, and the most important thing is I can't easily process data). I personally think that GMT.jl (maybe also pygmt) will be the future for it can integrate both process and plot rather than "process (some programs) -> output nc or whatever files -> bash gmt". In bash and gmt, there are some processing programs but they are not uniform so it's hard to accomplish complex processing (or maybe I don't know how to do). In julia I can just import raw data, process it, then plot.

In my experience, there are some problems but in general, I can figure out how to solve them. For example, contour can't resolve pen = (colored=true) (I have to use pen="+c"); passing a long filename (length>255) to gmtfig will cause crash (I generate a random name string("tmp_", randstring(12),".png" in current folder, then mv()) etc. But it is still a great package! and it is almost written by you alone! Thank you!~

@joa-quim
Copy link
Member Author

joa-quim commented Jun 2, 2020

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Registration pull request updated: JuliaRegistries/General/15679

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.20.0 -m "<description of version>" 9a67423365b5b2cd04b6d1bca453e443e623f8bc
git push origin v0.20.0

@joa-quim
Copy link
Member Author

joa-quim commented Jun 2, 2020

OK, let's try again and again it's late and I have to go.
Quick answers pen = (colored=true) will not work because it has to be a tuple. Maybe pen = (colored=true,) will (note the comma.

Generally, please open issues for those troubles. Specially if there are crashes. That means a problem in GMT itself.

And for the movie, I fully agree with regarding bash but the difficulty is to translate those generated bash scripts by julia ones (when one has to). But see this forum post maybe it interest you.

@htyeim
Copy link
Contributor

htyeim commented Jun 2, 2020

@JuliaRegistrator register()

I think this merge has been blocked ... maybe your comment? I think it is [noblock]?

@JuliaRegistrator
Copy link

Error while trying to register: Register Failed
@htyeim, it looks like you are not a publicly listed member/owner in the parent organization (GenericMappingTools).
If you are a member/owner, you will need to change your membership to public. See GitHub Help

@joa-quim
Copy link
Member Author

joa-quim commented Jun 2, 2020

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Registration pull request updated: JuliaRegistries/General/15679

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.20.0 -m "<description of version>" 9a67423365b5b2cd04b6d1bca453e443e623f8bc
git push origin v0.20.0

@joa-quim
Copy link
Member Author

joa-quim commented Jun 2, 2020

Can't reproduce the gmtfig crash. Can you give a short example?

@htyeim
Copy link
Contributor

htyeim commented Jun 3, 2020

Can't reproduce the gmtfig crash. Can you give a short example?

Please check #375. Thank you!

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

No branches or pull requests

3 participants