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

Missing package imports in test cases #206

Open
Prajna1999 opened this issue Dec 4, 2024 · 1 comment
Open

Missing package imports in test cases #206

Prajna1999 opened this issue Dec 4, 2024 · 1 comment

Comments

@Prajna1999
Copy link

Prajna1999 commented Dec 4, 2024

Inside the test/* folder almost all scripts are missing top level package import. For instance, inside
test/dataobjects.jl following imports are missing and the interpreter throwing Variable not defined inside "Main" error.

test/dataobjects.jl
# constants
DATA_SIZE = 400;
COLUMN_NO = 100;

# global variables
random(x) = rand(MersenneTwister(123), x);
data_vector = randn(DATA_SIZE);
integer_data_vector = rand(-100:100, DATA_SIZE);
data_array = Array([data_vector data_vector]);
data_array_long = reduce(hcat, [randn(DATA_SIZE) for i in 1:COLUMN_NO])

column_vector = ["data$i" for i in 1:COLUMN_NO]

index_range = 1:DATA_SIZE;
index_integer = collect(index_range);
index_timetype = Date(2007, 1, 1) + Day.(0:(DATA_SIZE-1));

df_vector = DataFrame([data_vector], ["data"]);
df_integer_index = DataFrame(Index=index_integer, data=data_vector);
df_timetype_index = DataFrame(Index=index_timetype, data=data_vector);
df_timetype_index_long_columns = insertcols!(
    DataFrame(data_array_long, column_vector), 1, :Index => index_timetype)

should instead be

using Random
using DataFrames
using Dates

....other lines remain the same

@chiraganand can you label it as a bug?

@chiraganand
Copy link
Member

The testing framework automatically imports the packages defined in a dependencies file.

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

2 participants