EcoJulia / Microbiome.jl

For analysis of microbiome and microbial community data
Other
47 stars 10 forks source link

Can't run sample types docs s2 example #111

Closed aguang closed 2 years ago

aguang commented 2 years ago

I am getting the following error:

julia> s2 = MicrobiomeSample("sample2"; age=37)
ERROR: MethodError: no method matching MicrobiomeSample(::String; age=37)
Closest candidates are:
  MicrobiomeSample(::String, ::Dictionaries.Dictionary{Symbol,T} where T) at /Users/aguang/.julia/packages/Microbiome/M1Xkf/src/samples_features.jl:149 got unsupported keyword argument "age"
  MicrobiomeSample(::AbstractString) at /Users/aguang/.julia/packages/Microbiome/M1Xkf/src/samples_features.jl:153 got unsupported keyword argument "age"
  MicrobiomeSample(::Any, ::Any) at /Users/aguang/.julia/packages/Microbiome/M1Xkf/src/samples_features.jl:149 got unsupported keyword argument "age"
Stacktrace:
 [1] top-level scope at REPL[31]:1

I thought this would be related to #110, as I also had to load Dictionaries manually in order to run s3, however it does not appear to be the issue here for me.

kescobo commented 2 years ago

Hmm - what happens if you do ] add Microbiome#main ?

kescobo commented 2 years ago

Actually - that shouldn't be necessary, I just checked on v0.8:

❯ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.1 (2021-04-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.6) pkg> activate --temp
  Activating new environment at `/tmp/jl_1y4Dwp/Project.toml`

(jl_1y4Dwp) pkg> add Microbiome
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
    Updating `/tmp/jl_1y4Dwp/Project.toml`
  [3bd8f0ae] + Microbiome v0.8.0
    Updating `/tmp/jl_1y4Dwp/Manifest.toml`
 #.... lots of output truncated

julia> using Microbiome

julia> s2 = MicrobiomeSample("sample2"; age=37)
MicrobiomeSample("sample2", {:age = 37})

Can you check that you have the latest version with ] st ?

aguang commented 2 years ago

I have 0.7.2. I do see that the latest version of Microbiome.jl is 0.8, but nothing happens when I update. I'm also running Julia 1.5.3, I can update to the latest version of Julia and see if that fixes the issue.

(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
  [85a47980] Dictionaries v0.3.14
  [3bd8f0ae] Microbiome v0.7.2
aguang commented 2 years ago

I needed to be on the most recent version of Julia. I think it'd be helpful if the README also specified what the minimum version of Julia you should have is, but the docs themselves are all good.

kescobo commented 2 years ago

Ahh - yeah, that's because of this I expect.

think it'd be helpful if the README also specified what the minimum version of Julia you should have is

Yeah, this makes sense