claw 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -5
- data/exe/claw +0 -21
- data/lib/claw/autograder.rb +1 -9
- data/lib/claw/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30c99665c792f16d0d418be56c9dd79255f7ec3affe9fd83802c8dace5d860d1
|
4
|
+
data.tar.gz: 2aef99b8da01416366f286cbee1f551adda5a8876ea39a8c91bfcb8eacb37129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d7244e00185e05b04fb4cba6ebcdc0e0a3a58e6124eb772b05caad522e95a390268db5feaaac05bf58034ebafe26737c2d86271b7770b62a83628e5555cf9f0
|
7
|
+
data.tar.gz: 767bd3513139293f0b5b060daf44ab3470e95d0d12a689ade15c8d506190fda15c77ed9e8e74c67807f5db77239686f4c335b953ebbd469fb754674f01235656
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Welcome to Claw, a CLI for UofM teaching staff to help students more effectively.
|
4
4
|
|
5
|
-
Claw downloads a student's latest [Autograder](https://autograder.io) submission locally and then prompts the instructor to
|
5
|
+
Claw downloads a student's latest [Autograder](https://autograder.io) submission locally and then prompts the instructor to sync the students files to CAEN.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -44,10 +44,8 @@ In a solution repo, run `claw <project id> <student uniqname>`.
|
|
44
44
|
You can determine the project id by navigating to the project on `autograder.io` and looking at the URL.
|
45
45
|
For instance, in Fall 2020, EECS280's Euchre project was available at [https://autograder.io/web/project/721](https://autograder.io/web/project/721) which means the project id was `721`.
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
Claw will then prompt to run all private autograder tests from the repo. It assumes the Makefile has an `autograde` target, and will dump the output to a file called `autograder.io`.
|
47
|
+
The students code will be downloaded to a folder corresponding to their
|
48
|
+
uniqname.
|
51
49
|
|
52
50
|
Finally, Claw will prompt the user whether to upload to CAEN. It assumes the Makefile has a `sync` target.
|
53
51
|
|
data/exe/claw
CHANGED
@@ -39,33 +39,12 @@ groupid = ag.get_group_id_from_uniqname(ARGV[0], "#{ARGV[1]}@umich.edu")
|
|
39
39
|
unless groupid
|
40
40
|
warn %{
|
41
41
|
Group for student not found! Double check their uniqname.
|
42
|
-
|
43
|
-
It is also possible this person registered their group after Claw cached the groups in the json file.
|
44
|
-
Try deleting the json file and rerunning the command.
|
45
42
|
}
|
46
43
|
exit
|
47
44
|
end
|
48
45
|
|
49
46
|
ag.download_files(ARGV[1], last_submission(ag.submissions(groupid)))
|
50
47
|
|
51
|
-
# Run tests
|
52
|
-
if HighLine.agree('Run tests? [Y/N]')
|
53
|
-
# Update SOL=? in the Makefile
|
54
|
-
mkfile_path = File.join(Dir.pwd, 'Makefile')
|
55
|
-
|
56
|
-
unless File.exist? mkfile_path
|
57
|
-
warn 'Could not find Makefile. You should run this from within a project repo (such as eecs280staff/p3-euchre for example)'
|
58
|
-
exit
|
59
|
-
end
|
60
|
-
|
61
|
-
mklines = File.readlines(mkfile_path)
|
62
|
-
mklines[1] = "SOL ?= #{ARGV[1]}" << $INPUT_RECORD_SEPARATOR
|
63
|
-
File.open(mkfile_path, 'w') { |f| f.write(mklines.join) }
|
64
|
-
|
65
|
-
`make autograde > autograder.txt`
|
66
|
-
puts 'The student autograder output has been dumped to autograder.txt'
|
67
|
-
end
|
68
|
-
|
69
48
|
# Sync to CAEN
|
70
49
|
if HighLine.agree('Upload to CAEN? [Y/N]')
|
71
50
|
`make sync`
|
data/lib/claw/autograder.rb
CHANGED
@@ -19,18 +19,10 @@ module Claw
|
|
19
19
|
}
|
20
20
|
end
|
21
21
|
|
22
|
-
def download_groups(projectid)
|
23
|
-
puts 'Downloading groups json file (this could take a while)...'
|
24
|
-
File.open(File.join(Dir.pwd, "project_#{projectid}_groups.json"), 'w') do |f|
|
25
|
-
f.write(self.class.get("/api/projects/#{projectid}/groups/", @options))
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
22
|
def get_group_id_from_uniqname(projectid, name)
|
30
23
|
puts 'Searching for user group id...'
|
31
|
-
download_groups(projectid) unless File.exist? "project_#{projectid}_groups.json"
|
32
24
|
|
33
|
-
groups_json =
|
25
|
+
groups_json = self.class.get("/api/projects/#{projectid}/groups/", @options)
|
34
26
|
|
35
27
|
groups_json.each do |group|
|
36
28
|
return group['pk'] if group['member_names'].include?(name)
|
data/lib/claw/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: claw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Johari
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highlight
|