claw 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: a01d7797a095f7f3e01bc18ea036b5cabf7ba5740faa8d2314829c1eebf93554
4
- data.tar.gz: 7f69f0503747146d07cdf3de5b4e0db7e9504374bb21d7cb51936ee4cd8ea77e
3
+ metadata.gz: 30c99665c792f16d0d418be56c9dd79255f7ec3affe9fd83802c8dace5d860d1
4
+ data.tar.gz: 2aef99b8da01416366f286cbee1f551adda5a8876ea39a8c91bfcb8eacb37129
5
5
  SHA512:
6
- metadata.gz: cf936c9d8dc51000a74ffe42ac530363a44f9d77e1422e46ef101611a4d796c681c6d04b64f6beb415344c433eec70a35c73ebd8a5b6af45bc8bd690ba71f17d
7
- data.tar.gz: 3d4230a9e246a26357fc746a322cb898aea194996fd47ed9d18c9e4785fbae4eaf2a951353c569d1f961bf2fbb8fc90a27bfb048e88249ecca2ba366d5afeb45
6
+ metadata.gz: 6d7244e00185e05b04fb4cba6ebcdc0e0a3a58e6124eb772b05caad522e95a390268db5feaaac05bf58034ebafe26737c2d86271b7770b62a83628e5555cf9f0
7
+ data.tar.gz: 767bd3513139293f0b5b060daf44ab3470e95d0d12a689ade15c8d506190fda15c77ed9e8e74c67807f5db77239686f4c335b953ebbd469fb754674f01235656
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- claw (0.1.0)
4
+ claw (0.1.1)
5
5
  highlight
6
6
  httparty
7
7
 
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 run all AG tests locally along with the option to sync to CAEN.
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
- This will download a json file containing all groups of students who have submitted to the Autograder (including those working alone) and then download the given student's latest solution into a directory `./<uniqname>/`.
48
- Subsequent runs will reuse the previously downloaded json file; you should delete this file periodically to keep your list of students up to date.
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`
@@ -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 = JSON.parse(File.read(File.join(Dir.pwd, "project_#{projectid}_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)
@@ -1,3 +1,3 @@
1
1
  module Claw
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-10-22 00:00:00.000000000 Z
11
+ date: 2020-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highlight