CliMA / ClimaAtmos.jl

ClimaAtmos.jl is a library for building atmospheric circulation models that is designed from the outset to leverage data assimilation and machine learning tools. We welcome contributions!
Apache License 2.0
84 stars 18 forks source link

problem running tests #1544

Closed francispoulin closed 1 year ago

francispoulin commented 1 year ago

I am new to ClimaAtmos.jl but am very keen to learn to use this library. My initial attempt to run the tests have failed, and very likely because I am doing something silly.

I have followed the instructions to get started and found the following:

  1. git clone worked fine and moved into the new folder.
  2. instantiated the dependencies, following the instructions, and that seemed to work fine. I copied my current status in julia --project in case someone things something looks out of place.
  3. When I try running the tests I get an error as I am told I need to instantiate to install all recorded dependencies. I did that before but clearly something didn't go well. I copied my output below.

Can someone help me to figure out what I am doing wrong?

$ julia --project=test test/runtests.jl
ERROR: LoadError: ArgumentError: Package SafeTestsets [1bc83da4-3b8d-516f-aca4-4fe02f6d838f] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
 [1] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1306
 [2] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1200
 [3] macro expansion
   @ ./loading.jl:1180 [inlined]
 [4] macro expansion
   @ ./lock.jl:223 [inlined]
 [5] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
in expression starting at /home/fpoulin/Software/ClimaAtmos.jl/test/runtests.jl:1
(ClimaAtmos) pkg> status
Project ClimaAtmos v0.9.0
Status `~/Software/ClimaAtmos.jl/Project.toml`
  [86bc3604] AtmosphericProfilesLibrary v0.1.2
⌅ [3a4d1b5c] ClimaComms v0.3.5
  [d414da3d] ClimaCore v0.10.30
  [cf7c7e5a] ClimaCorePlots v0.2.4
  [c8b6d40d] ClimaCoreVTK v0.7.1
  [595c0a79] ClimaTimeSteppers v0.7.4
  [6a9e3e04] CloudMicrophysics v0.10.2
  [5ae59095] Colors v0.12.10
  [39dd38d3] Dierckx v0.5.3
  [2b5f629d] DiffEqBase v6.122.2
  [459566f4] DiffEqCallbacks v2.26.1
  [31c24e10] Distributions v0.25.87
  [ffbed154] DocStringExtensions v0.9.3
  [442a2c76] FastGaussQuadrature v0.5.0
  [6a3955dd] ImageFiltering v0.7.3
  [e98cc03f] Insolation v0.3.1
  [a98d9a8b] Interpolations v0.14.7
  [8197267c] IntervalSets v0.7.4
  [033835bb] JLD2 v0.4.31
  [984bce1d] LambertW v0.4.6
  [85f8d34a] NCDatasets v0.12.13
  [5da4648a] NVTX v0.3.1
  [1dea7af3] OrdinaryDiffEq v6.49.4
  [a01a1ee8] RRTMGP v0.7.0
  [7181ea78] RootSolvers v0.3.5
  [90137ffa] StaticArrays v1.5.19
  [2913bbd2] StatsBase v0.33.21
  [49b00bb7] SurfaceFluxes v0.6.2
  [b60c26fb] Thermodynamics v0.10.2
  [ddb6d928] YAML v0.4.8
  [ade2ca70] Dates
  [37e2e46d] LinearAlgebra
  [44cfe95a] Pkg v1.8.0
  [de0858da] Printf
  [9a3f8284] Random
  [8dfed614] Test
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`
francispoulin commented 1 year ago

I looked around and saw that #1506 mentioned the same issue. I tried the instructions there, copied below, and I am happy to say that the tests ran, all three of them.

julia --project=test -e 'using Pkg; Pkg.develop(path = ".")'
julia --project=test -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --color=yes --project=test test/runtests.jl

I wonder whether the docs might need to be updated to reflect this difference?

charleskawczynski commented 1 year ago

Hi @francispoulin, agreed, we should update the docs to show users how to run the ClimaAtmos test suite (there are a few different ways that require different configuration/environment setups).