Skip to content

Commit

Permalink
modify submission file
Browse files Browse the repository at this point in the history
  • Loading branch information
woojinnn authored and jeehoonkang committed Aug 28, 2023
1 parent 2b19548 commit ae4556d
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 22 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,10 @@ Make sure that you're capable of using the following development tools:
- Submit your solution to <https://gg.kaist.ac.kr/course/17>.
- **How to submit your assignment:**
- To submit your solution, you should run `submit.sh` in `scripts` directory. In other words, you should run the following command:
```bash
# Run this command at the root directory of this repository.
$ ./scripts/submit.sh <assignment_number>
# E.g. To submit `assignment09`, run the following command:
$ ./scripts/submit.sh 9
```
```bash
# Run this command at the root directory of this repository.
$ ./scripts/submit.sh
```
- After running the command above, in the `target` directory, you can find a `assignment<NUMBER>.zip` file (`assignment09.zip` for example). Submit this file to <https://gg.kaist.ac.kr/course/17>.
- Read the documentation at <https://cp.kaist.ac.kr/cs220/cs220/>.
- You can check your grade of each assignment by running the grading script.
Expand Down
26 changes: 11 additions & 15 deletions scripts/submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@

set -e

if [ $# != 1 ]
then
echo "==============================="
echo "Invalid argument."
echo "Usage: './submit.sh <assignment_number>'"
echo "Example: './submit.sh 1' to grade assignment01"
exit 1
fi

BASEDIR=$(dirname "$0")/..
mkdir -p $BASEDIR/target

ZIP_FILE=$(printf "$BASEDIR/target/assignment%02d.zip" $1)
SRC_PATH=$(printf "$BASEDIR/src/assignments/assignment%02d" $1)
mkdir -p $BASEDIR/target

echo $ZIP_FILE
echo $SRC_PATH
zip -rj $ZIP_FILE $SRC_PATH
for i in {01..13} ; do
if [ $i -eq 5 ]
then
continue
fi
if [ -f $BASEDIR/target/assignment$i.zip ]; then
rm $BASEDIR/target/assignment$i.zip
fi
zip -rj $BASEDIR/target/assignment$i.zip $BASEDIR/src/assignments/assignment$i
done
7 changes: 7 additions & 0 deletions src/assignments/assignment01/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 1` works fine.
//! See `assigment01/small_exercises_grade.rs` and `/scripts/grade.sh 1` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment01.zip` file in `target` directory.

pub mod small_exercises;
mod small_exercises_grade;
7 changes: 7 additions & 0 deletions src/assignments/assignment02/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 2` works fine.
//! See `assigment02/*_grade.rs` and `/scripts/grade.sh 2` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment02.zip` file in `target` directory.

pub mod small_exercises;
mod small_exercises_grade;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment03/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 3` works fine.
//! See `assignment03/*_grade.rs` and `/scripts/grade.sh 3` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment03.zip` file in `target` directory.

pub mod small_exercises;
mod small_exercises_grade;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment04/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 4` works fine.
//! See `assignment04/grade.rs` and `/scripts/grade.sh 4` for the test script.
//! Run `/scripts/prepare-submissions.sh` and submit `/target/assignment04.zip` to <https://gg.kaist.ac.kr>.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment04.zip` file in `target` directory.

pub mod context;
mod grade;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment06/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 6` works fine.
//! See `assignment06/*_grade.rs` and `/scripts/grade.sh 6` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment06.zip` file in `target` directory.

pub mod semiring;
pub mod symbolic_differentiation;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment07/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 7` works fine.
//! See `assignment07/*_grade.rs` and `/scripts/grade.sh 7` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment07.zip` file in `target` directory.

pub mod generator;
pub mod my_itertools;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment08/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 8` works fine.
//! See `assignment08/*_grade.rs` and `/scripts/grade.sh 8` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment08.zip` file in `target` directory.

pub mod church;
pub mod small_exercises;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment09/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 9` works fine.
//! See `assignment09/*_grade.rs` and `/scripts/grade.sh 9` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment09.zip` file in `target` directory.

pub mod bigint;
pub mod matmul;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment10/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 10` works fine.
//! See `assignment10/*_grade.rs` and `/scripts/grade.sh 10` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment10.zip` file in `target` directory.

pub mod labyrinth;
pub mod small_exercises;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment11/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
//! You should fill out `todo!()` placeholders in such a way that `/scripts/grade.sh 11` works fine.
//! See `assignment11/*_grade.rs` and `/scripts/grade.sh 11` for the test script.
//! Run `/scripts/prepare-submissions.sh` and submit `/target/assignment11.zip` to <https://gg.kaist.ac.kr>.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment11.zip` file in `target` directory.

pub mod graph;
pub mod linked_list;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 12` works fine.
//! See `assignment12/*_grade.rs` and `/scripts/grade.sh 12` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment12.zip` file in `target` directory.

pub mod card;
pub mod demux;
Expand Down
7 changes: 7 additions & 0 deletions src/assignments/assignment13/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
//! Refer to your solution for assignment 09. You will implement the parallelized version of assignment 09.
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 13` works fine.
//! See `assignment13/small_exercises_grade.rs` and `/scripts/grade.sh 13` for the test script.
//!
//! To submit, run
//! ```bash
//! # At the cs220 home directory,
//! ./scripts/submit.sh
//! ```
//! and submit the generated `assignment13.zip` file in `target` directory.

pub mod small_exercises;
mod small_exercises_grade;

0 comments on commit ae4556d

Please sign in to comment.