Skip to content

Commit 7ee48f2

Browse files
authored
Merge branch 'main' into tweak-vm-install-docs
2 parents 99c88bc + 154c4ff commit 7ee48f2

File tree

18 files changed

+486
-37
lines changed

18 files changed

+486
-37
lines changed

Gemfile.lock

+4-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ GEM
213213
gemoji (>= 3, < 5)
214214
html-pipeline (~> 2.2)
215215
jekyll (>= 3.0, < 5.0)
216-
json (2.7.1)
216+
json (2.7.2)
217217
kramdown (2.4.0)
218218
rexml
219219
kramdown-parser-gfm (1.1.0)
@@ -231,6 +231,8 @@ GEM
231231
mutex_m (0.2.0)
232232
net-http (0.4.1)
233233
uri
234+
nokogiri (1.16.3-arm64-darwin)
235+
racc (~> 1.4)
234236
nokogiri (1.16.3-x86_64-linux)
235237
racc (~> 1.4)
236238
octokit (4.25.1)
@@ -274,6 +276,7 @@ GEM
274276
yell (2.2.2)
275277

276278
PLATFORMS
279+
arm64-darwin-22
277280
x86_64-linux
278281

279282
DEPENDENCIES
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
title: How To Checkout and Commit to a PR from a Forked Repository
3+
category: Developer > Getting Started
4+
---
5+
6+
Contributors who are part of the Submitty organization on Github can
7+
make new branches on our Github repositories and should make PRs from
8+
a *branch directly within the Submitty repository*. External
9+
contributors cannot make new branches on the Submitty repositories.
10+
Instead, external contributors will clone/fork the Submitty repository
11+
and then make a PR from *a branch on their forked repository*.
12+
13+
It is simpler to review a PR made from a branch, and it is easy to
14+
make small revisions as needed and commit and push those changes to
15+
the branch. It is a little more work to do the same with a PR made
16+
from a fork, but it is still possible -- *assuming that the owner of
17+
the forked repository has granted the necessary permissions*. This
18+
allows multiple developers to collaborate and finalize a PR for
19+
merging to the main branch.
20+
21+
If you use Github Desktop or have the Github CLI installed, the simplest
22+
way to work on a fork is to click the **Code** dropdown on the PR's page
23+
on Github and checkout the PR from there.
24+
25+
![alt text](/images/fork-checkout.png)
26+
27+
The instructions below are for command line use of git.
28+
29+
1. **Before** you begin, confirm that your local main branch of Submitty is
30+
up-to-date. Additionally, if the PR's branch is not up-to-date with Submitty's main,
31+
there will be a button on its page on Github that you can press to update it.
32+
You may need to resolve merge conflicts in the process of updating it.
33+
34+
![alt text](/images/update-branch.png)
35+
36+
2. From the PR on the Github website, find the name of the
37+
user + branch name. It should be formatted something like this:
38+
```
39+
contributorusername:contributor_branch_name
40+
```
41+
42+
Additionally, find the name of the fork on the fork's page on Github.
43+
The `fork_name` may simply be `Submitty`, or the author may have chosen to another name.
44+
45+
46+
3. Next, make a local branch on your computer in your working repository
47+
with the proposed code changes. Here are the command lines
48+
(substitute the user, branch, and fork names we found above):
49+
50+
If you **are not** using ssh keys on git:
51+
```
52+
git checkout -b contributorusername-contributor_branch_name main
53+
git pull https://github.com/contributorusername/fork_name.git contributor_branch_name
54+
```
55+
56+
If you **are** using ssh keys on git:
57+
```
58+
git checkout -b contributorusername-contributor_branch_name main
59+
git pull [email protected]:contributorusername/fork_name.git contributor_branch_name
60+
```
61+
62+
63+
4. This has made a local branch named
64+
`contributorusername-contributor_branch_name`. Go ahead and test
65+
and review the PR and make code edits and new commits to your
66+
local branch as needed.
67+
68+
69+
70+
5. In order to push the changes to the contributor's fork (and the PR
71+
on Github from the fork), you will specify the upstream to be the
72+
contributor's fork:
73+
74+
If you **are not** using ssh keys on git:
75+
```
76+
git remote add upstream https://github.com/contributorusername/fork_name.git
77+
```
78+
79+
80+
If you **are** using ssh keys on git:
81+
```
82+
git remote add upstream [email protected]:contributorusername/fork_name.git
83+
```
84+
85+
86+
Confirm that the upstream was set:
87+
```
88+
git remote -v
89+
```
90+
91+
Which should print something like this if you **are not** using ssh keys on git:
92+
```
93+
origin https://github.com/Submitty/Submitty.git (fetch)
94+
origin https://github.com/Submitty/Submitty.git (push)
95+
upstream https://github.com/contributorusername/fork_name.git (fetch)
96+
upstream https://github.com/contributorusername/fork_name.git (push)
97+
```
98+
99+
Or this if you **are** using ssh keys on git:
100+
```
101+
origin [email protected]:Submitty/Submitty.git (fetch)
102+
origin [email protected]:Submitty/Submitty.git (push)
103+
upstream [email protected]:contributorusername/fork_name.git (fetch)
104+
upstream [email protected]:contributorusername/fork_name.git (push)
105+
```
106+
107+
108+
6. Now once you are finished with your code changes, first commit them to
109+
the local branch (named
110+
`contributorusername-contributor_branch_name`).
111+
112+
And then push them from your local branch to the external
113+
contributor's fork and update the PR on github:
114+
```
115+
git push upstream contributorusername-contributor_branch_name:contributor_branch_name
116+
```
117+
118+
*NOTE: If you encounter a permissions error, it is possible that the external
119+
contributor didn't grant access for collaboration on the branch.*
120+
121+
7. Confirm that you can see the changes on the Github website for the PR.
122+
123+
124+
---
125+
126+
See also [How to Make a Pull Request](make_a_pull_request) and
127+
[How to Review a Pull Request](review_a_pull_request).

_docs/developer/getting_started/make_a_pull_request.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Be sure to read the [Suggestions for New Developers](/developer/getting_started/
1818

1919

2020
2. Contributors from outside the Submitty GitHub organization should
21-
clone the repo on their own GitHub page, and create a branch with
21+
clone/fork the repo on their own GitHub page, and create a branch with
2222
the modifications to be included with this pull request (PR).
2323

2424
_**IMPORTANT NOTE**:_ Please grant write access to the Submitty
@@ -167,8 +167,11 @@ Be sure to read the [Suggestions for New Developers](/developer/getting_started/
167167
for specific reviewers.
168168
169169
170+
---
171+
170172
See also [How to Review a Pull Request](review_a_pull_request).
171173
174+
---
172175
173176
These guidelines drawn from:
174177

_docs/developer/getting_started/phpstorm.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Under the `Mappings` tab, set the following:
5151
This step will configure PhpStorm to use the PHP CLI that is configured inside your vagrant machine.
5252
It is important to use this PHP installation as opposed to some other one as it ensures environment consistency among developers and production servers.
5353

54-
Under PhpStorm settings, open `Languages & Frameworks` > `PHP`. Press the `...` button next to `CLI Interpreter` and, on the left list of the interpreters window, press the `+` and select `From Docker, Vagrant, VM, Remote...`.
54+
Under PhpStorm settings, open `PHP`. Press the `...` button next to `CLI Interpreter` and, on the left list of the interpreters window, press the `+` and select `From Docker, Vagrant, VM, Remote...`.
5555
Select `Vagrant` from the list of radio buttons.
5656
Then press `OK` to add the interpreter and `OK` to save the list of interpreters.
5757

@@ -61,7 +61,7 @@ Open `Tools` > `Deployment...` > `Options`. Set `Upload changed files automatica
6161

6262
## Enable PHP debugging using xdebug
6363

64-
Under PhpStorm settings, open `Languages & Frameworks` > `PHP` > `Debug`. In the pre-configuration steps, press `Validate` to open the configuration validator. Choose `Remote Web Server` and set the following:
64+
Under PhpStorm settings, open `PHP` > `Debug`. In the pre-configuration steps, press `Validate` to open the configuration validator. Choose `Remote Web Server` and set the following:
6565

6666
- `Path to create validation script`: `<submitty repository root>/site/public`
6767
- `Deployment Server`: Use the SFTP connection you set up in the first step
@@ -91,7 +91,7 @@ Now you can browse the tables in the database window by expanding the tabs next
9191

9292
## Running PHPUnit tests
9393

94-
Under PhpStorm settings, open `Languages & Frameworks` > `PHP` > `Test Frameworks`. Press the `+` button to add a testing configuration, using the `PHPUnit by Remote Interpreter` type. Choose the interpreter you configured in earlier steps. Then set:
94+
Under PhpStorm settings, open `PHP` > `Test Frameworks`. Press the `+` button to add a testing configuration, using the `PHPUnit by Remote Interpreter` type. Choose the interpreter you configured in earlier steps. Then set:
9595

9696
- `PHPUnit Library`: `Use Composer autoloader`
9797
- `Path to script`: `/usr/local/submitty/GIT_CHECKOUT/Submitty/site/vendor/autoloader.php`
@@ -132,7 +132,7 @@ Press `OK` to save the run configuration. If you then `Debug` the configuration,
132132

133133
During debugging, you may get decently upset at how often you step into magic methods and class loaders etc. There's an easy fix for this:
134134

135-
Under PhpStorm settings, open `Languages & Frameworks` > `PHP` > `Debug` > `Step Filters`. Check `Skip magic methods` and add the following to `Skipped Methods`:
135+
Under PhpStorm settings, open `PHP` > `Debug` > `Step Filters`. Check `Skip magic methods` and add the following to `Skipped Methods`:
136136

137137
- `app\views\AbstractView->__construct`
138138
- `app\models\AbstractModel->convertName`

_docs/developer/getting_started/review_a_pull_request.md

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ What do you need to do?
5353
Now you have a version of the code in a new branch on the main repo.
5454
Review the PR normally and delete the temporary branch when you are done
5555
56+
* If you need to make edits to a PR made from a branch in a forked
57+
repo, see:
58+
[How to Checkout and Commit to a Fork PR](commit_to_PR_from_fork)
59+
5660
5761
4. [Re-install the system](/developer/development_instructions/index)
5862
as necessary
@@ -108,5 +112,6 @@ What do you need to do?
108112
hopefully, in short order, approving that the code be merged into
109113
the main branch.
110114
115+
---
111116
112117
See also [How to Make a Pull Request](make_a_pull_request).

_docs/developer/getting_started/vm_install_using_vagrant.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ If you using an Intel-based Mac, you will follow the instructions below._
9393

9494
7. Enter your **BIOS** (generally by pressing Del, F12, or other keys while booting). If you are not able to find the key combo needed to enter your BIOS, refer to [this guide](https://www.tomshardware.com/reviews/bios-keys-to-access-your-firmware,5732.html).
9595

96-
8. Locate **Virtualization**, and enable it. (Note: If you cannot find the option to enable virtualization, [search Google](http://tinyurl.com/enable-virtualization) for a tutorial on enabling it with your motherboard.)
96+
8. Locate **Virtualization**, and enable it. (Note: Some motherboards may call it SVM, AMD-V, VT-x/Vanderpool. If you cannot find the option to enable virtualization, [search Google](http://tinyurl.com/enable-virtualization) for a tutorial on enabling it with your motherboard.)
9797

9898
9. Reboot your computer.
9999

@@ -117,7 +117,7 @@ If you using an Intel-based Mac, you will follow the instructions below._
117117

118118
2. Navigate the **BIOS Settings**.
119119

120-
3. Locate **Virtualization** and enable it.
120+
3. Locate **Virtualization** and enable it. (Some motherboards may call it SVM, AMD-V, VT-x/Vanderpool)
121121

122122
4. Be sure to choose **Hardware Virtualization** in the **System -> Acceleration** settings of the virtual machine you are using.
123123

@@ -190,12 +190,11 @@ Below are steps specific to an OS.
190190
sudo systemctl start virtnetworkd
191191
```
192192
2. If your vagrant ever freezes kill it with
193-
'''
193+
```
194194
VBoxManage controlvm VM_NAME poweroff
195-
'''
195+
```
196196
or if that doesn't work, reboot the computer and then run `vagrant destroy` before re-running `vagrant up --provider=virtualbox` again.
197197
198-
199198
#### 3. Clone the [Submitty repository](https://github.com/Submitty/Submitty)
200199
201200
Clone it to a location on your computer (the "host").
@@ -425,7 +424,12 @@ vagrant up
425424
| grader | grader | Limited access grader submitty user |
426425
| student | student | Student submitty user |
427426

428-
4. The VM has the following four courses by default and they are all part of the current semester:
427+
Note that there are many more student and grader users on the VM; you may
428+
log in as any of them using their **User ID** as the username and password.
429+
The easiest way to see the list of users is to log in as an instructor, access
430+
a course, and click **Manage Students** or **Manage Graders**.
431+
432+
5. The VM has the following four courses by default and they are all part of the current semester:
429433

430434
* tutorial
431435
* sample

_docs/index/people.md

+23
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,29 @@ redirect_from:
1010

1111
---
1212

13+
## 2024 Spring Developers
14+
15+
![](/images/people/2024_spring.png)
16+
17+
Michael Krar,
18+
Joshua Wei,
19+
Jeffrey Cordero,
20+
Raymond Reynoso Ramirez,
21+
Ryan Varughese,
22+
Tate Whiteberg,
23+
Kush Raval,
24+
Josiah Riggins,
25+
Chris Reed,
26+
Johnny Chen,
27+
James Fitzgerald,
28+
Viane Matsibekker,
29+
Jaeseok Kang,
30+
Hanson Gu,
31+
Zheyu Deng,
32+
Junyi Wu
33+
34+
---
35+
1336
## 2023 Fall Developers
1437

1538
![](/images/people/2023_fall.png)

_docs/instructor/assignment_preparation/index.md

+48
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,51 @@ you must re-run the BUILD_XXXX.sh script.
249249
logfiles for each test case. You will also find log files for the
250250
compilation, runner, and validation components of automated grading
251251
that are helpful in debugging assignment configurations.
252+
253+
254+
### Download Gradeable as JSON
255+
256+
You can download the JSON representation of your gradeable by clicking the 'Download Gradeable Json'
257+
button at the top right of the 'Edit Gradeable' screen. This JSON file can be re-uploaded into a new course
258+
to use the same parameters as the existing gradeable.
259+
260+
Below is the list of parameters downloaded. VCS and Team Gradeable are only downloaded if the gradeable is using them.
261+
```json
262+
{
263+
"title": "Example Json",
264+
"instructions_url": "",
265+
"id": "Example ID",
266+
"type": "Electronic File",
267+
"vcs": {
268+
"repository_type": "submitty-hosted",
269+
"vcs_path": "http://localhost:1511/path/to/repository",
270+
"vcs_subdirectory": "subdirectory"
271+
},
272+
"team_gradeable": {
273+
"team_size_max": 3,
274+
"inherit_from": "gradeable_id",
275+
},
276+
"bulk_upload": false,
277+
"grading_inquiry": false,
278+
"grade_inquiry_per_component_allowed": false,
279+
"ta_grading": false,
280+
"discussion_thread_id": "thread_id",
281+
"syllabus_bucket": "Homework",
282+
"autograding_config_path": "path/to/config",
283+
"dates": {
284+
"ta_view_start_date": "2024-1-10 23:59:59.00",
285+
"submission_open_date": "2024-1-10 23:59:59.00",
286+
"submission_due_date": "2024-2-10 23:59:59.00",
287+
"grade_start_date": "2024-2-10 23:59:59.00",
288+
"grade_due_date": "2024-3-10 23:59:59.00",
289+
"team_lock_date": "2024-1-10 23:59:59.00",
290+
"grade_released_date": "2024-3-10 23:59:59.00",
291+
"grade_inquiry_start_date": "2024-3-10 23:59:59.00",
292+
"grade_inquiry_due_date": "2024-3-10 23:59:59.00",
293+
"has_due_date": true,
294+
"has_release_date": true,
295+
"late_days_allowed": true,
296+
"late_days": 3
297+
}
298+
}
299+
```

0 commit comments

Comments
 (0)