Skip to content

Commit

Permalink
Merge pull request #45 from CurricularAnalytics/development
Browse files Browse the repository at this point in the history
Version 0.5.0
  • Loading branch information
haydenfree authored Aug 1, 2019
2 parents 46eaeb3 + cb7449b commit 4ccdc01
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 37 deletions.
28 changes: 11 additions & 17 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ version = "0.5.6"

[[Blink]]
deps = ["Base64", "BinDeps", "Distributed", "JSExpr", "JSON", "Lazy", "Logging", "MacroTools", "Mustache", "Mux", "Reexport", "Sockets", "WebIO", "WebSockets"]
git-tree-sha1 = "aded85a8150347f91d8c67336eafd1551a8c8c19"
git-tree-sha1 = "cbce79ce8bfa1a576bb0a166ce75e7b92a575098"
uuid = "ad839575-38b3-5650-b840-f874b8c74a25"
version = "0.11.0"
version = "0.12.0"

[[Bukdu]]
deps = ["Dates", "Documenter", "HTTP", "InteractiveUtils", "JSON2", "Logging", "MbedTLS", "Sockets", "URIParser"]
Expand Down Expand Up @@ -99,10 +99,10 @@ uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.0.0"

[[DataFrames]]
deps = ["CategoricalArrays", "Compat", "InvertedIndices", "IteratorInterfaceExtensions", "Missings", "PooledArrays", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "StatsBase", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "def266a7e5eb6f633ef4c72633d2a328b9450052"
deps = ["CategoricalArrays", "Compat", "DataAPI", "InvertedIndices", "IteratorInterfaceExtensions", "Missings", "PooledArrays", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "12a96f70fc126f8a308eadd4eda843dfa630bbd4"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "0.19.0"
version = "0.19.1"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
Expand Down Expand Up @@ -239,10 +239,10 @@ uuid = "2535ab7d-5cd8-5a07-80ac-9b1792aadce3"
version = "0.3.1"

[[JuMP]]
deps = ["Calculus", "Compat", "ForwardDiff", "Libdl", "MathProgBase", "Pkg", "ReverseDiffSparse", "Serialization"]
git-tree-sha1 = "3bd8e52f7aeb2736a8e1b0d8ae8d01c2c85fea24"
deps = ["Calculus", "Compat", "ForwardDiff", "MathProgBase", "ReverseDiffSparse"]
git-tree-sha1 = "8e1aea93f99e1141a8053e1d542d4534f62fe43f"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.18.5"
version = "0.18.6"

[[LaTeXStrings]]
deps = ["Compat"]
Expand Down Expand Up @@ -465,12 +465,6 @@ version = "0.11.0"
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StatsBase]]
deps = ["DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics"]
git-tree-sha1 = "2b6ca97be7ddfad5d9f16a13fe277d29f3d11c23"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.31.0"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "b1ad568ba658d8cbb3b892ed5380a6f3e781a81e"
Expand Down Expand Up @@ -512,10 +506,10 @@ uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
version = "0.6.1"

[[WebIO]]
deps = ["AssetRegistry", "Base64", "Compat", "Distributed", "FunctionalCollections", "JSON", "Logging", "Observables", "Random", "Requires", "Sockets", "UUIDs", "WebSockets", "Widgets"]
git-tree-sha1 = "7e311e5b053e39aada25c481a3f6b226fb0c65df"
deps = ["AssetRegistry", "Base64", "Compat", "Distributed", "FunctionalCollections", "JSON", "Logging", "Observables", "Pkg", "Random", "Requires", "Sockets", "UUIDs", "WebSockets", "Widgets"]
git-tree-sha1 = "2b61c56f6c4c7b3880976332de6ce1028e015f90"
uuid = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"
version = "0.8.5"
version = "0.8.8"

[[WebSockets]]
deps = ["Base64", "Dates", "Distributed", "HTTP", "Logging", "Random", "Sockets", "Test"]
Expand Down
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CurricularAnalytics"
uuid = "593ffa3d-269e-5d81-88bc-c3b6809c35a6"
authors = ["Greg Heileman <[email protected]>", "Hayden Free <[email protected]>", "Orhan Abar <[email protected]>", "Will Thompson <[email protected]>"]
version = "0.4.0"
version = "0.5.0"

[deps]
Blink = "ad839575-38b3-5650-b840-f874b8c74a25"
Expand All @@ -23,4 +23,5 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"

[compat]
julia = "1.0, 1.1"
JuMP = "~0.18.5"
julia = "1.0, 1.1"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This will install the toolbox, along with the other Julia packages needed to run

## Supported Versions
* CurricularAnalytics master will be maintained/enhanced to work with the latest stable version of Julia.
* Julia 1.1.0: CurricularAnalytics v0.3.3 is the latest version guaranteed to work with Julia 1.2.0.
* Julia 1.0 & 1.1: CurricularAnalytics v0.5.0 is the latest version guaranteed to work with Julia 1.0 and 1.1.
* Later versions: Some functionality might not work with prerelease / unstable / nightly versions of Julia. If you run into a problem, please file an issue.

# Contributing and Reporting Bugs
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
julia 1.0
Blink 0.9.0
Blink 0.12.0
CSV 0.4.3
DataFrames 0.16.0
DataStructures 0.15.0
Expand Down
13 changes: 6 additions & 7 deletions src/CurricularAnalytics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ export Degree, AA, AS, AAS, BA, BS, System, semester, quarter, Requisite, pre, c
complexity, compare_curricula, isvalid_degree_plan, print_plan, visualize, basic_metrics,
read_csv, create_degree_plan, bin_packing, bin_packing2, find_min_terms, add_lo_requisite!,
update_plan, write_csv, find_min_terms, balance_terms, balance_terms_opt, find_min_terms_opt,
read_Opt_Config, optimize_plan, json_to_julia, julia_to_json, init_optimization
read_Opt_Config, optimize_plan, json_to_julia, julia_to_json, init_opt

function init_optimization()
println("In order to use the optimization functions you must first install the Gurobi Optimizer \n
Please see - https://www.gurobi.com/products/gurobi-optimizer/")
include("src/Optimization.jl")
function init_opt()
println("\n ************************************************************************\n In order to use the optimization functions in this toolbox you must first install the Gurobi Optimizer;\n please see: www.gurobi.com/downloads/gurobi-optimizer \n\n Note that free acacdemic licenses for the Gurobi Optimizer are available.\n ************************************************************************\n\n")
include(dirname(pathof(CurricularAnalytics)) * "/Optimization.jl")
end

# Check if a curriculum graph has requisite cycles or extraneous requsities.
Expand Down Expand Up @@ -69,7 +68,7 @@ function isvalid_curriculum(c::Curriculum, error_msg::IOBuffer=IOBuffer())
cycles = simplecycles(g)
if size(cycles,1) != 0
validity = false
write(error_msg, "\nCurriculum $(c.name) has requisite cycles:\n")
write(error_msg, "\nCurriculum \'$(c.name)\' has requisite cycles:\n")
for cyc in cycles
write(error_msg, "(")
for (i,v) in enumerate(cyc)
Expand All @@ -84,7 +83,7 @@ function isvalid_curriculum(c::Curriculum, error_msg::IOBuffer=IOBuffer())
extran_errors = IOBuffer()
if extraneous_requisites(c, extran_errors)
validity = false
write(error_msg, "\nCurriculum $(c.name) has extraneous requisites:\n")
write(error_msg, "\nCurriculum \'$(c.name)\' has extraneous requisites:\n")
write(error_msg, String(take!(extran_errors)))
end
end
Expand Down
16 changes: 8 additions & 8 deletions src/DataHandler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function read_csv(file_path::AbstractString)
course_count += 1
read_line = csv_line_reader(readline(csv_file), ',')
end
df_courses = CSV.File(file_path, header=courses_header, limit=course_count-1, delim=',') |> DataFrame
df_courses = CSV.File(file_path, header = courses_header, limit = course_count - 1, delim = ',', silencewarnings = true) |> DataFrame
if nrow(df_courses) != nrow(unique(df_courses, Symbol("Course ID")))
println("All courses must have a unique Course ID")
return false
Expand All @@ -120,7 +120,7 @@ function read_csv(file_path::AbstractString)
end
end
if additional_course_count > 1
df_additional_courses = CSV.File(file_path, header=additional_course_start, limit=additional_course_count-1, delim=',') |> DataFrame
df_additional_courses = CSV.File(file_path, header = additional_course_start, limit = additional_course_count - 1, delim = ',', silencewarnings = true) |> DataFrame
df_all_courses = vcat(df_courses,df_additional_courses)
else
df_all_courses = df_courses
Expand All @@ -135,7 +135,7 @@ function read_csv(file_path::AbstractString)
read_line = csv_line_reader(readline(csv_file), ',')
end
if learning_outcomes_count > 1
df_course_learning_outcomes = CSV.File(file_path, header=learning_outcomes_start, limit=learning_outcomes_count-1, delim=',') |> DataFrame
df_course_learning_outcomes = CSV.File(file_path, header = learning_outcomes_start, limit = learning_outcomes_count - 1, delim = ',', silencewarnings = true) |> DataFrame
end
end
course_learning_outcomes = Dict{Int, Array{LearningOutcome}}()
Expand All @@ -155,7 +155,7 @@ function read_csv(file_path::AbstractString)
read_line = csv_line_reader(readline(csv_file), ',')
end
if learning_outcomes_count > 1
df_curric_learning_outcomes = CSV.File(file_path, header=curric_learning_outcomes_start, limit=curric_learning_outcomes_count-1, delim=',') |> DataFrame
df_curric_learning_outcomes = CSV.File(file_path, header = curric_learning_outcomes_start, limit = curric_learning_outcomes_count - 1, delim = ',', silencewarnings = true) |> DataFrame
end
end

Expand Down Expand Up @@ -588,7 +588,7 @@ function read_Opt_Config(file_path)
course_count += 1
read_line = csv_line_reader(readline(csv_file), ',')
end
df_fixedCourses = CSV.File(file_path, header=header, limit=course_count, delim=',') |> DataFrame
df_fixedCourses = CSV.File(file_path, header=header, limit=course_count, delim=',', silencewarnings = true) |> DataFrame
header += course_count+1
for row in DataFrames.eachrow(df_fixedCourses)
fixedCourses[row[Symbol("Course ID")]] = row[Symbol("Term")]
Expand All @@ -611,7 +611,7 @@ function read_Opt_Config(file_path)
consecutivePairCount += 1
read_line = csv_line_reader(readline(csv_file), ',')
end
df_consecutivePair = CSV.File(file_path, header=header, limit=consecutivePairCount, delim=',') |> DataFrame
df_consecutivePair = CSV.File(file_path, header = header, limit = consecutivePairCount, delim = ',', silencewarnings = true) |> DataFrame
header += consecutivePairCount+1
for row in DataFrames.eachrow(df_consecutivePair)
consequtiveCourses[row[Symbol("Prior Course ID")]] = row[Symbol("Next Course ID")]
Expand All @@ -634,7 +634,7 @@ function read_Opt_Config(file_path)
termRangeCount += 1
read_line = csv_line_reader(readline(csv_file), ',')
end
df_termRange = CSV.File(file_path, header=header, limit=termRangeCount, delim=',') |> DataFrame
df_termRange = CSV.File(file_path, header = header, limit = termRangeCount, delim = ',', silencewarnings = true) |> DataFrame
header += termRangeCount+1
for row in DataFrames.eachrow(df_termRange)
termRange[row[Symbol("Course Id")]] = (row[Symbol("Min Term")], row[Symbol("Max Term")])
Expand All @@ -661,7 +661,7 @@ function read_Opt_Config(file_path)
diffMaxCount += 1
read_line = csv_line_reader(readline(csv_file), ',')
end
df_diffMax = CSV.File(file_path, header=header, limit=diffMaxCount, delim=',') |> DataFrame
df_diffMax = CSV.File(file_path, header = header, limit = diffMaxCount, delim = ',', silencewarnings = true) |> DataFrame
header += diffMaxCount+1
for row in DataFrames.eachrow(df_diffMax)
diffMax[row[Symbol("Term")]] = row[Symbol("Max Credit")]
Expand Down
9 changes: 8 additions & 1 deletion src/DataTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,14 @@ mutable struct Curriculum
create_graph!(this)
this.metrics = Dict{String, Any}()
this.learning_outcomes = learning_outcomes
return this
errors = IOBuffer()
if(isvalid_curriculum(this, errors))
return this
else
printstyled("WARNING: Curriculum was created, but is invalid:", color = :yellow)
println(String(take!(errors)))
return this
end
end
end

Expand Down

0 comments on commit 4ccdc01

Please sign in to comment.