Skip to content

Commit

Permalink
Merge pull request #94 from CurricularAnalytics/development
Browse files Browse the repository at this point in the history
Version 1.0.1
  • Loading branch information
haydenfree authored Jun 4, 2020
2 parents 37e0253 + 1b795e6 commit 2d867af
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 64 deletions.
65 changes: 32 additions & 33 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[CSV]]
deps = ["CategoricalArrays", "DataFrames", "Dates", "FilePathsBase", "Mmap", "Parsers", "PooledArrays", "Tables", "Unicode", "WeakRefStrings"]
git-tree-sha1 = "027b8d04a1983153ecbcf8f905e926bf01c078e8"
git-tree-sha1 = "c5ef3e34d21aa4b0e88521f1dc8031515d389148"
uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
version = "0.5.22"
version = "0.5.26"

[[CategoricalArrays]]
deps = ["Compat", "DataAPI", "Future", "JSON", "Missings", "Printf", "Reexport", "Statistics", "Unicode"]
Expand All @@ -22,27 +22,27 @@ uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597"
version = "0.7.7"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb"
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "48c20c43e157c6eab6cf88326504ec042b05e456"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.2.0"
version = "3.10.0"

[[DataAPI]]
git-tree-sha1 = "674b67f344687a88310213ddfa8a2b3c76cc4252"
git-tree-sha1 = "176e23402d80e7743fc26c19c681bfb11246af32"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.1.0"
version = "1.3.0"

[[DataFrames]]
deps = ["CategoricalArrays", "Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "Missings", "PooledArrays", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "00136fcd39d503e66ab1b2eab800c47deaf7ca04"
git-tree-sha1 = "7d5bf815cc0b30253e3486e8ce2b93bf9d0faff6"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "0.20.0"
version = "0.20.2"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "b7720de347734f4716d1815b00ce5664ed6bbfd4"
git-tree-sha1 = "af6d9c86e191c917c2276fbede1137e8ea20157f"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.9"
version = "0.17.17"

[[DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
Expand All @@ -69,9 +69,9 @@ version = "0.8.1"

[[Documenter]]
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "51f0c7df46abb9c07d80e529718951e634670afb"
git-tree-sha1 = "395fa1554c69735802bba37d9e7d9586fd44326c"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.24.4"
version = "0.24.11"

[[FilePathsBase]]
deps = ["Dates", "LinearAlgebra", "Printf", "Test", "UUIDs"]
Expand All @@ -84,10 +84,9 @@ deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"

[[Inflate]]
deps = ["Pkg", "Printf", "Random", "Test"]
git-tree-sha1 = "b7ec91c153cf8bff9aff58b39497925d133ef7fd"
git-tree-sha1 = "f5fc07d4e706b84f72d54eedcc1c13d92fb0871c"
uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
version = "0.1.1"
version = "0.1.2"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand All @@ -111,16 +110,17 @@ uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.0"

[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LightGraphs]]
deps = ["ArnoldiMethod", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"]
git-tree-sha1 = "a0d4bcea4b9c056da143a5ded3c2b7f7740c2d41"
git-tree-sha1 = "6f85a35d2377cb2db1bc448ed0d6340d2bb1ea64"
uuid = "093fc24a-ae57-5d10-9952-331d41423f4d"
version = "1.3.0"
version = "1.3.3"

[[LinearAlgebra]]
deps = ["Libdl"]
Expand All @@ -130,10 +130,10 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MacroTools]]
deps = ["DataStructures", "Markdown", "Random"]
git-tree-sha1 = "e2fc7a55bb2224e203bbd8b59f72b91323233458"
deps = ["Markdown", "Random"]
git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.3"
version = "0.5.5"

[[Markdown]]
deps = ["Base64"]
Expand All @@ -149,19 +149,18 @@ version = "0.4.3"
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
git-tree-sha1 = "12ce190210d278e12644bcadf5b21cbdcf225cd3"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.1.0"
version = "1.2.0"

[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556"
git-tree-sha1 = "0c16b3179190d3046c073440d94172cfc3bb0553"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.10"
version = "0.3.12"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[PooledArrays]]
Expand Down Expand Up @@ -200,9 +199,9 @@ uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[SimpleTraits]]
deps = ["InteractiveUtils", "MacroTools"]
git-tree-sha1 = "2bdf3b6300a9d66fe29ee8bb51ba100c4df9ecbc"
git-tree-sha1 = "2ee666b24ab8be6a922f9d6c11a86e1a703a7dda"
uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
version = "0.9.1"
version = "0.9.2"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand All @@ -219,9 +218,9 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "5a3bcb6233adabde68ebc97be66e95dcb787424c"
git-tree-sha1 = "5c06c0aeb81bef54aed4b3f446847905eb6cbda0"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "0.12.1"
version = "0.12.3"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
Expand All @@ -235,9 +234,9 @@ version = "1.0.0"

[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
git-tree-sha1 = "aaed7b3b00248ff6a794375ad6adf30f30ca5591"
git-tree-sha1 = "c45dcc27331febabc20d86cb3974ef095257dcf3"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "0.2.11"
version = "1.0.4"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
Expand Down
2 changes: 1 addition & 1 deletion 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 = "1.0.0"
version = "1.0.1"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
26 changes: 2 additions & 24 deletions src/datatypes/DataTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Enumerated types
@enum Degree AA AS AAS BA BS
@enum System semester quarter
@enum Requisite pre co strict_co
@enum Requisite pre co strict_co custom
@enum EdgeClass tree_edge back_edge forward_edge cross_edge

# fundamental data types for curricular analytics
Expand All @@ -13,26 +13,4 @@ include("curriculum.jl")
include("degreeplan.jl")

# additional types
include("coursecatalog.jl")

# Returns a requisite as a string
function requisite_to_string(req::Requisite)
if req == pre
return "CurriculumPrerequisite"
elseif req == co
return "CurriculumCorequisite"
else
return "CurriculumStrictCorequisite"
end
end

# Returns a requisite (enumerated type) from a string
function string_to_requisite(req::String)
if (req == "prereq" || req == "CurriculumPrerequisite")
return pre
elseif (req == "coreq" || req == "CurriculumCorequisite")
return co
elseif (req == "strict-coreq" || req == "CurriculumStrictCorequisite")
return strict_co
end
end
include("coursecatalog.jl")
3 changes: 2 additions & 1 deletion src/datatypes/course.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ mutable struct Course
this.cross_listed = cross_listed
this.canonical_name = canonical_name
this.requisites = Dict{Int, Requisite}()
#this.requisite_formula
this.metrics = Dict{String, Any}()
this.metadata = Dict{String, Any}()
this.learning_outcomes = learning_outcomes
Expand All @@ -70,7 +71,7 @@ mutable struct Course
end

function course_id(prefix::AbstractString, num::AbstractString, name::AbstractString, institution::AbstractString)
mod(hash(name * prefix * num * institution), UInt32)
convert(Int, mod(hash(name * prefix * num * institution), UInt32))
end

"""
Expand Down
11 changes: 6 additions & 5 deletions src/datatypes/coursecatalog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ mutable struct CourseCatalog
name::AbstractString # Name of the course catalog
institution::AbstractString # Institution offering the courses in the catalog
date_range::Tuple # range of dates the catalog is applicable over
catalog::Dict{UInt32, Course} # dictionary of courses in (course_id, course) format
catalog::Dict{Int, Course} # dictionary of courses in (course_id, course) format

# Constructor
function CourseCatalog(name::AbstractString, institution::AbstractString; courses::Array{Course}=Array{Course,1}(),
catalog::Dict{UInt32,Course}=Dict{UInt32,Course}(), date_range::Tuple=(), id::Int=0)
catalog::Dict{Int,Course}=Dict{Int,Course}(), date_range::Tuple=(), id::Int=0)
this = new()
this.name = name
this.institution = institution
this.catalog = catalog
this.date_range = date_range
this.id = id
this.id = mod(hash(this.name * this.institution), UInt32)
length(courses) > 0 ? add_course!(this, courses) : nothing
return this
end
Expand All @@ -37,8 +37,9 @@ function is_duplicate(cc::CourseCatalog, course::Course)
course.id in keys(cc.catalog) ? true : false
end

function course(cc::CourseCatalog, prefix::AbstractString, num::AbstractString, name::AbstractString, institution::AbstractString)
hash_val = mod(hash(name * prefix * num * institution), UInt32)
# Return a course in a course catalog
function course(cc::CourseCatalog, prefix::AbstractString, num::AbstractString, name::AbstractString)
hash_val = mod(hash(name * prefix * num * cc.institution), UInt32)
if hash_val in keys(cc.catalog)
return cc.catalog[hash_val]
else
Expand Down

2 comments on commit 2d867af

@haydenfree
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/15855

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.1 -m "<description of version>" 2d867af5382d973ada76adf27ea1663b12226c01
git push origin v1.0.1

Please sign in to comment.