curricula 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f700e9d06de3b9b64c75d964b2fa9a85d04db982
4
- data.tar.gz: c612076d8d9be2b6f5c8b7e5a89640a4d446a69b
3
+ metadata.gz: 863a71fc9ec248e590f4547141a0b45d50b9add5
4
+ data.tar.gz: fa5d9dd1bf8e358283fdf1530eb4f3f4d3e9d62e
5
5
  SHA512:
6
- metadata.gz: 435028986507de7c05ea62a188c2c5b3f9283699b5e9109c8f99a0e592119efb058056ce3a6ebe0523109d57f20f44f50068049107a4062bcc2b30d3539ae1ff
7
- data.tar.gz: b173b0556770f7beffda62b398ffeee34476f0bc2696fb602a7fe74954d78f039f97915df297c8e4a29e70483037a76cd2b38534ff067351b8017b5200772c35
6
+ metadata.gz: 57a9f4a9e105232abcd1946b4da42af625bc51d58d1b9762b7ca2ce33efd5dc9073ca87655d3bf0d2c7f5e80f891ef49ded01f2fbaa90296af38ad7e6b2f554a
7
+ data.tar.gz: d3b5812b29a0c9fbd191439f6a0f88daeb591c1a14e580ef40c790d747de8b0e7482ae9ec5483a21827d95e4d861669d5ebdf1b4e81d38ed04eae89e84a815b6
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ *.gem
data/README.md CHANGED
@@ -20,7 +20,46 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ First, create your excel spreadsheet with the following format (NO HEADER). This
24
+ is two things in a single worksheet, this may be worked out later, but for now,
25
+ do this. Here's an example to get you going (leave out the header):
26
+
27
+ |Course|Prereq?|Hours|
28
+ |:----:|:-----:|:---:|
29
+ |MATH 162| |4|
30
+ |MATH 163| |4|
31
+ |MATH 264| |3|
32
+ |MATH 162|prereq|MATH 163|
33
+ |MATH 163|prereq|MATH 264|
34
+
35
+ Add an Excel spreadsheet to this:
36
+
37
+ ```ruby
38
+ my_plan = Curricula::DegreePlan.new "worksheet.xls"
39
+ ```
40
+
41
+ Then, compute the efficiency. Lower is better:
42
+
43
+ ```ruby
44
+ my_plan.efficiency
45
+ ```
46
+
47
+ If you need a list of courses (as a hash), use `course_list`:
48
+
49
+ ```ruby
50
+ my_plan.course_list
51
+ ```
52
+
53
+ To use this as part of a graph, use the following two methods:
54
+
55
+ ```ruby
56
+ my_plan.graph_nodes
57
+ my_plan.graph_edges
58
+ ```
59
+
60
+ `graph_nodes` returns a list of strings, `graph_edges` returns a hash of edges,
61
+ with `:source` and `:destination` to mark the directionality of the
62
+ prerequisites.
24
63
 
25
64
  ## Contributing
26
65
 
data/curricula.gemspec CHANGED
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_dependency "spreadsheet"
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module Curricula
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curricula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Piro-Rael
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: spreadsheet
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Determines curricular efficiency of a degree plan.
42
56
  email:
43
57
  - fdisk@fdisk.co