├── images ├── PR_branch.png ├── PR_name.png └── fork_button.png ├── .github └── PULL_REQUEST_TEMPLATE.md ├── 讀我.md ├── students.yaml ├── README.md ├── LICENSE └── tools └── update-branchs.py /images/PR_branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrassLab/osdi2020/HEAD/images/PR_branch.png -------------------------------------------------------------------------------- /images/PR_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrassLab/osdi2020/HEAD/images/PR_name.png -------------------------------------------------------------------------------- /images/fork_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrassLab/osdi2020/HEAD/images/fork_button.png -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ↓↓↓ **Notice** ↓↓↓ 2 | 3 | - [ ] Check your base repository and branch are belong to you. 4 | - [ ] The PR name need to include student ID and which lab assignment 5 | - template: `${student id} ${which lab}` 6 | - e.g. `0756110 lab0` 7 | 8 | ↑↑↑ **Notice** ↑↑↑ 9 | 10 | > If you ensure the notice items is done, you can remove them. 11 | 12 | --- 13 | 14 | > Following section is optional, depend on you. 15 | 16 | ## Description 17 | a few message for overall goals of this pull request 18 | 19 | ## Todos 20 | - [ ] what feature to do ? 21 | - [ ] what bug to fix ? 22 | - [ ] what enhancement to improve ? 23 | 24 | --- 25 | @GrassLab/ta -------------------------------------------------------------------------------- /讀我.md: -------------------------------------------------------------------------------- 1 | # 作業系統設計與實作 課程 2020 2 | 3 | [英文](README.md) 4 | 5 | 給學生繳交作業的儲存庫 6 | 7 | ## 如何繳交作業 8 | 9 | 1. 在 GitHub 複製 ( fork ) [該儲存庫](https://github.com/GrassLab/osdi2020) 10 | ![](images/fork_button.png) 11 | 2. 撰寫以下資訊在你的 `README.md` 12 | - GitHub 帳號名稱 13 | - 學號 14 | - 你的姓名 15 | 3. 設計並實作你的 kernel 在複製出的儲存庫 16 | 4. 建立一個 GitHub 拉取請求 ( pull request ) 17 | - 選擇 `GrassLab/osdi2020` 當作 基儲存庫 ( base repository ) 和 `{你的學號}` 當作 基分支 ( base branch ) 18 | - 選擇在你的儲存庫內的分支作為 比較分支 ( compare branch ) 19 | ![](images/PR_branch.png) 20 | - 用學號與哪一次 lab 命名它 範例: `0756110 lab0` 21 | ![](images/PR_name.png) 22 | 5. 我們將會在 lab 截止時接受拉取請求 23 | 24 | 重複 3-5 步去繳交之後的 lab. 25 | 26 | ## 範例 27 | 28 | - 複製的儲存庫: https://github.com/csielee/osdi2020 29 | - 拉取請求: https://github.com/GrassLab/osdi2020/pull/2 30 | 31 | ## Happy Coding ~ -------------------------------------------------------------------------------- /students.yaml: -------------------------------------------------------------------------------- 1 | - "0756611" 2 | - "0756708" 3 | - "0856716" 4 | - "A081568" 5 | - "A073708" 6 | - "A081518" 7 | - "A081536" 8 | - "A071725" 9 | - "A081839" 10 | - "A082614" 11 | - "A082533" 12 | - "A082647" 13 | - "0857216" 14 | - "0856539" 15 | - "0756554" 16 | - "0856563" 17 | - "0856566" 18 | - "0510507" 19 | - "0516024" 20 | - "0516076" 21 | - "0616074" 22 | - "0516001" 23 | - "0516047" 24 | - "0516088" 25 | - "0616330" 26 | - "0516326" 27 | - "0516302" 28 | - "0886015" 29 | - "0756066" 30 | - "0856162" 31 | - "0856130" 32 | - "0756107" 33 | - "0856126" 34 | - "0756083" 35 | - "0756140" 36 | - "0856123" 37 | - "0856009" 38 | - "0856043" 39 | - "0856168" 40 | - "0856068" 41 | - "0856172" 42 | - "0856058" 43 | - "0856113" 44 | - "0856148" 45 | - "0856064" 46 | - "0853401" 47 | - "0866002" 48 | - "0850734" 49 | - "0850739" 50 | - "0610004" 51 | - "B052042" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Operation System Design and Implementation Course 2020 2 | 3 | [中文](讀我.md) 4 | 5 | This repository is homework submission for students 6 | 7 | ## How to submit homework 8 | 9 | 1. Fork [this repository](https://github.com/GrassLab/osdi2020) on GitHub 10 | ![](images/fork_button.png) 11 | 2. Write down following info in your `README.md` 12 | - GitHub account name 13 | - Student ID 14 | - Your name 15 | 3. Design and implement your kernel in forked repository 16 | 4. Create a GitHub pull request 17 | - Choose `GrassLab/osdi2020` as base repository and `{your student ID}` as base branch 18 | - Choose branch in your forked repository as compare branch 19 | ![](images/PR_branch.png) 20 | - Name it with student ID and which lab e.g. `0756110 lab0` 21 | ![](images/PR_name.png) 22 | 5. We will accept pull request when lab due date 23 | 24 | repeat 3-5 to submit later homework/lab. 25 | 26 | ## Example 27 | 28 | - forked repository: https://github.com/csielee/osdi2020 29 | - pull request: https://github.com/GrassLab/osdi2020/pull/2 30 | 31 | ## Happy Coding ~ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 GRASS 綠色運算與嵌入式系統實驗室  4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/update-branchs.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import typing 3 | 4 | import yaml 5 | import git 6 | 7 | if __name__ == "__main__": 8 | parser = argparse.ArgumentParser() 9 | 10 | parser.add_argument('file') 11 | 12 | args = parser.parse_args() 13 | 14 | with open(args.file) as f: 15 | ids = yaml.safe_load(f) 16 | 17 | # find origin 18 | repo = git.Repo(".") 19 | 20 | origin = repo.remote(name='origin') 21 | fetch_infos: typing.List[git.remote.FetchInfo] = origin.fetch() 22 | source_branch: git.RemoteReference = origin.refs["0756110-example"] 23 | origin_head = repo.head.ref 24 | source_branch.checkout() 25 | 26 | def exist_branch(name: str) -> bool: 27 | for info in fetch_infos: 28 | if name in info.name: 29 | return True 30 | return False 31 | 32 | push_count = 0 33 | try: 34 | for idx in ids: 35 | if exist_branch(idx): 36 | print(f'{idx} already exists!') 37 | continue 38 | print(f'create {idx} & push ...') 39 | # create branch 40 | h = repo.create_head(idx) 41 | # push 42 | origin.push(idx) 43 | # remove local 44 | repo.delete_head(h) 45 | push_count += 1 46 | 47 | print(f'total: {len(ids)}, push {push_count} branch') 48 | finally: 49 | origin_head.checkout() 50 | --------------------------------------------------------------------------------