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

Not getting access to agents functions as expected #927

Open
hbsmith opened this issue Sep 7, 2022 · 2 comments
Open

Not getting access to agents functions as expected #927

hbsmith opened this issue Sep 7, 2022 · 2 comments
Labels
help wanted Help from someone external is needed plotting

Comments

@hbsmith
Copy link
Contributor

hbsmith commented Sep 7, 2022

I'm not sure if this is an issue of me not understanding how Requires.jl works; it not being implemented correctly in this repo; or something else, but I have a MWE where I would expect to get access to the agents/ functions from InteractiveDynamics, but for some reason they don't get loaded.

If I generate a new package "TestMod", activate the environment, and add only "InteractiveDynamics" and "Agents", I get a Project.toml that looks like this:

name = "TestMod"
uuid = "43a1a35d-8048-4c0f-b05e-6c9f886ced7d"
authors = ["me <me@myemail.com>"]
version = "0.1.0"

[deps]
Agents = "46ada45e-f475-11e8-01d0-f70cc89e6671"
InteractiveDynamics = "ec714cd0-5f51-11eb-0b6e-452e7367ff84"

Then if my TestMod.jl file is simply:

module TestMod;

using Agents
using InteractiveDynamics

@show(names(InteractiveDynamics, all=true))

import InteractiveDynamics.agent2string

end

And I run:

(@v1.8) pkg> activate .
julia> using TestMod

[ Info: Precompiling TestMod [43a1a35d-8048-4c0f-b05e-6c9f886ced7d]
names(InteractiveDynamics, all = true) = [Symbol("##meta#58"), Symbol("##record_interaction#1"), Symbol("##record_interaction#4"), Symbol("#10#19"), Symbol("#11#20"), Symbol("#12#21"), Symbol("#13#22"), Symbol("#14#23"), Symbol("#15#24"), Symbol("#16#25"), Symbol("#17#26"), Symbol("#2#3"), Symbol("#5#6"), Symbol("#7#8"), Symbol("#9#18"), Symbol("#__init__"), Symbol("#colors_from_map"), Symbol("#darken_color"), Symbol("#eval"), Symbol("#get_value"), Symbol("#has_key"), Symbol("#include"), Symbol("#lighten_color"), Symbol("#pushupdate!"), Symbol("#randomcolor"), Symbol("#record_interaction"), Symbol("#record_interaction##kw"), Symbol("#record_interaction#1"), Symbol("#record_interaction#4"), Symbol("#rotate2D"), Symbol("#scale"), Symbol("#set_value!"), Symbol("#subscript"), Symbol("#superscript"), Symbol("#to_alpha"), Symbol("#translate"), :COLORSCHEME, :CYCLIC_COLORS, :CyclicContainer, :DEFAULT_BG, :InteractiveDynamics, :JULIADYNAMICS_BLACK, :JULIADYNAMICS_CMAP, :JULIADYNAMICS_CMAP_DIVERGING, :JULIADYNAMICS_COLORS, :MARKER, :Point2f, :Polygon, :__init__, :colors_from_map, :darken_color, :eval, :get_value, :has_key, :include, :lighten_color, :pushupdate!, :randomcolor, :record_interaction, :rotate2D, :scale, :set_value!, :subscript, :superscript, :to_alpha, :translate]
WARNING: could not import InteractiveDynamics.agent2string into TestMod

I would expect to get access to all the functions within the src/agents/ files, but we can see that I don't get access to any of them.

Is this expected behavior? How can I get access to these functions from inside my "TestMod.jl" module?

Thanks

@Datseris
Copy link
Member

Datseris commented Sep 7, 2022

Yeah this seems like a Requires.jl issue. It's best to get help from Requires.jl people (and please do post here if you find an answer!). I don't know how to help, sorry :(

@hbsmith
Copy link
Contributor Author

hbsmith commented Sep 8, 2022

@Datseris Thanks for the quick reply, I was afraid of that.

I opened an issue in the Requires repo, but it seems like there isn't much traffic there so we'll see if anyone responds.
JuliaPackaging/Requires.jl#111

@Tortar Tortar transferred this issue from JuliaDynamics/InteractiveDynamics.jl Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help from someone external is needed plotting
Projects
None yet
Development

No branches or pull requests

3 participants