Skip to content

Issue with Running Tests: Need to Add PiCLES Manually #31

@Sumanshekhar17

Description

@Sumanshekhar17

Hi @mochell, While following the quick start guide, I encountered an issue when trying to run the T04_2D_reg_test.jl file. Specifically, I had to manually add the PiCLES package in the test repository in order to run the test file, which can be confusing with current documentation.

Steps to Reproduce:

  1. Clone the PiCLES repository as described in the quick start guide.
  2. Navigate to the PiCLES directory.
  3. Activate the environment and install dependencies using:
using Pkg
Pkg.activate(".")
Pkg.instantiate()

Navigate to the tests directory.

Attempt to run the T04_2D_reg_test.jl file using:

include("T04_2D_reg_test.jl")

  Activating project at `~/Desktop/PiCLES/PiCLES/tests/PiCLES`
ERROR: LoadError: ArgumentError: Package PiCLES not found in current path.
- Run `import Pkg; Pkg.add("PiCLES")` to install the PiCLES package.
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1772 [inlined]
 [2] macro expansion
   @ ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1753
 [4] #invoke_in_world#3
   @ ./essentials.jl:926 [inlined]
 [5] invoke_in_world
   @ ./essentials.jl:923 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1746
 [7] include(fname::String)
   @ Base.MainInclude ./client.jl:489
 [8] top-level scope
   @ REPL[2]:1
in expression starting at /Users/ss4338/Desktop/PiCLES/PiCLES/tests/T04_2D_reg_test.jl:9

Workaround
I resolved this by manually adding the PiCLES package while I was in the test repository using:

julia> Pkg.activate(".")
  Activating new project at `~/Desktop/PiCLES/PiCLES/tests`

and then run

include("T04_2D_reg_test.jl")

Additionally, the test case (T04_2D_reg_test.jl) requires the Oceananigans package. This package seems to be missing from the environment, possibly because it's not listed in the Project.toml or Manifest.toml files. Adding Oceananigans manually using Pkg.add("Oceananigans") should resolve the issue.

Can we add a paragraph on why it needs Oceananigans.jl ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions