From c519a8eb5af0db20a5dc50a8d3360369cb00a8b8 Mon Sep 17 00:00:00 2001 From: Emily Graber Date: Tue, 26 Mar 2024 21:29:24 -0400 Subject: [PATCH] Initial commit --- .github/workflows/build.yml | 47 +++++ .gitignore | 353 ++++++++++++++++++++++++++++++++++++ .mdlrc | 1 + README.md | 73 ++++++++ config/gatorgrade.yml | 50 +++++ questions/checklist.md | 11 ++ questions/coding.md | 25 +++ questions/objectives.md | 27 +++ questions/terminology.md | 105 +++++++++++ 9 files changed, 692 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 .mdlrc create mode 100644 README.md create mode 100644 config/gatorgrade.yml create mode 100644 questions/checklist.md create mode 100644 questions/coding.md create mode 100644 questions/objectives.md create mode 100644 questions/terminology.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..87bc0aa --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +# Basic workflow +name: build + +# Controls when the action will run +# Workflow begins with push or PR events +# Focuses on the master branch only +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +# Create one single job +# This job performs all necessary checks +jobs: + build: + # Use the latest version of Ubuntu + runs-on: ${{ matrix.os }} + strategy: + matrix: + # Performs all actions on different versions of Python + python-version: ["3.11"] + os: [ubuntu-latest] + # Define the workflow steps + steps: + # Checkout the code of the repository + - name: Check out Repository Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + # Setup Python for the current language version + - name: Setup Python ${{ matrix.python-version }} + if: always() + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + # Install pip + - name: Install Pip + if: always() + run: | + pip install -U pip + python -m pip install --user pipx + # Run GatorGrader: see config/gatorgrade.yml + - name: Run GatorGrader with GatorGrade + run: | + pipx install gatorgrade + gatorgrade --config config/gatorgrade.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00ba625 --- /dev/null +++ b/.gitignore @@ -0,0 +1,353 @@ +# Compiled source # +################### +*.class +*.o +*.so + +# Android # +########### +*.apk +*.ap_ +*.dex +local.properties + +# Packages # +############ +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# LaTeX # +######### +*.aux +*.dvi +*.fdb_latexmk +*.fls +*.lof +*.log +*.lot +*.out +*.pdf +*.ps +*.tex~ +*.toc +*_minted* + +# Bibliography aux files (bibtex/biblatex/biber) # +################################################## +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files # +############################### +*.fdb_latexmk +*.synctex.gz +*.pdfsync +*.synctex.gz(busy) + +# Algorithms # +############## +*.alg +*.loa + +# Theorems # +############ +*.thm + +# Beamer # +########## +*.nav +*.snm +*.vrb + +# Glossaries # +############## +*.acn +*.acr +*.glg +*.glo +*.gls + +# Hyperref # +############ +*.brf + +# Listings # +############ +*.lol + +# Makeidx # +########### +*.idx +*.ilg +*.ind +*.ist + +# Minitoc # +########### +*.maf +*.mtc +*.mtc0 + +# Minted # +########## +*.pyg + +# Nomencl # +########### +*.nlo + +# Todonotes # +############# +*.tdo + +# Xindy # +######### +*.xdy + +# Vim # +####### +*.project.vim +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist +*~ + +# Ant # +####### +*.ant_targets + +# Java # +######## + +# Compiled class file # +####################### +*.class + +# Log file # +######## +*.log + +# BlueJ files # +############### +*.ctxt + +# Mobile Tools for Java (J2ME) # +################################ +.mtj.tmp/ + +# Package Files # +################# +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# JVM # +####### +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# Gradle # +########## +.gradle +gradle +/build +/buildSrc/build +/subprojects/*/build +/subprojects/docs/src/samples/*/*/build +/subprojects/internal-android-performance-testing/build-android-libs + +# Python # +########## +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +include/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +*.manifest +*.spec +pip-log.txt +pip-delete-this-directory.txt +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +*.mo +*.pot +*.log +local_settings.py +instance/ +.webassets-cache +.scrapy +docs/_build/ +target/ +.python-version +celerybeat-schedule +.env +.venv/ +venv/ +ENV/ +bin/ +share/ +lib64 +pip-selfcheck.json +pyvenv.cfg + +# R # +##### +*-Ex.R +*.RData +*.Rdata +*.Rhistory +*.Rincr_history + +# Ctags # +######### +tags +.tags +tags.lock +tags.temp +tags.tmp + +# Extra files # +############### +*.xmi +*.sync +*.jekyll-metadata + +# Editor Suggestions # +###################### + +# Vim # +####### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# VSCode # +########## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# Atom # +######## +.eslintcache +Thumbs.db +.project +.svn +.nvm-version +.vscode +node_modules +npm-debug.log +debug.log +/tags +/atom-shell/ +/out/ +docs/output +docs/includes +spec/fixtures/evil-files/ +out/ +/electron/ + +# Operating Systems # +##################### + +# macOS # +######### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Linux # +######### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..08c46eb --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +rules "~MD013, ~MD026, ~MD033, ~MD034" diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f04e0e --- /dev/null +++ b/README.md @@ -0,0 +1,73 @@ + +# Review for Exam 2 + +Below is the README that will appear for exam two. + +## Introduction + +This exam for unit two covers the topics in chapters 5-10: + +- 5 STRUCTURED TYPES AND MUTABILITY +- 6 RECURSION AND GLOBAL VARIABLES +- 7 MODULES AND FILES +- 8 TESTING AND DEBUGGING +- 9 EXCEPTIONS AND ASSERTIONS +- 10 CLASSES AND OBJECT-ORIENTED PROGRAMMING + +Python 3 is required. There are no linting checks for this +exam. There are no dependencies for this exam. + +For this exam, you may only use the applications and tools that +are available locally on your computer, for example, `Git`, `Python`, +`Visual Studio Code`, `gatorgrade`. You may not collaborate or use the textbook, +class notes, or the internet during the course of the exam. The exam is +to be completed individually. + +Internet use is only permitted to clone and submit this exam to GitHub. + +Students are reminded to uphold the Honor Code. Cloning the assignment +repository is a commitment to the latter. + +## Cheat Sheet + +One sheet of paper filled with notes of your choice (front and back, 8.5x11) +can be created prior to the exam and used while taking the exam. + +## Exam Timing + +You may clone the repository staring at 9am on Friday March 29th. + +The cutoff time to submit your repository is 9:50am on Friday March 29th. + +## Accommodations + +If necessary, please make arrangements with the the instructor +in advance for SASS-documented accommodations that impact +exams (Student Accessibility and Support Services). + +## Exam Grading + +This exam consists of 10 points. + +There are nine questions within the questions directory. Some require coding and +some require writing. Each question file is worth 1 point, with partial credit given. +The tenth point is passing all gatorgrade checks and the successful use of GitHub and +Git to clone, stage, commit, and push your repository for the final submission. Be sure +to use your skills to delete TODOs from all files. The tenth point requires passing +all of the gatorgrade checks. + +## Getting Started + +After cloning the repository to your computer, please take the following steps: + +- Use the `cd` command to change into the base directory for this repository. +- From the base directory, you can run the automated grading checks by typing +`gatorgrade --config config/gatorgrade.yml`. +- Change into the questions directory by typing `cd questions`. +- Open the files within the questions directory and add code or answers as +instructed. +- Please make sure that you completely delete the `TODO` markers from all files. +- See the instructor if you need to access the starter repository for reference +during the exam. Internet use is not permitted during the course of the exam. +- Modifications to the gatorgrade.yml file are not permitted without explicit +instruction. diff --git a/config/gatorgrade.yml b/config/gatorgrade.yml new file mode 100644 index 0000000..022c578 --- /dev/null +++ b/config/gatorgrade.yml @@ -0,0 +1,50 @@ +# perform checks on a file +- questions/checklist.md: + - description: Ensure that the checklist.md file exists in the questions directory + check: ConfirmFileExists + - description: Complete all TODOs, remove the TODO markers, and rewrite comments for checklist.md + check: MatchFileFragment + options: + fragment: TODO + count: 0 + exact: true + +- questions/coding.md: + - description: Ensure that the coding.md file exists in the questions directory + check: ConfirmFileExists + - description: Complete all TODOs, remove the TODO markers, and rewrite comments for coding.md + check: MatchFileFragment + options: + fragment: TODO + count: 0 + exact: true + +- questions/objectives.md: + - description: Ensure that the objectives.md file exists in the questions directory + check: ConfirmFileExists + - description: Complete all TODOs, remove the TODO markers, and rewrite comments for objectives.md + check: MatchFileFragment + options: + fragment: TODO + count: 0 + exact: true + +- questions/objectives.md: + - description: Ensure that the objectives.md file exists in the questions directory + check: ConfirmFileExists + - description: Complete all TODOs, remove the TODO markers, and rewrite comments for objectives.md + check: MatchFileFragment + options: + fragment: TODO + count: 0 + exact: true + +- questions/terminology.md: + - description: Ensure that the terminology.md file exists in the questions directory + check: ConfirmFileExists + - description: Complete all TODOs, remove the TODO markers, and rewrite comments for terminology.md + check: MatchFileFragment + options: + fragment: TODO + count: 0 + exact: true \ No newline at end of file diff --git a/questions/checklist.md b/questions/checklist.md new file mode 100644 index 0000000..0db1958 --- /dev/null +++ b/questions/checklist.md @@ -0,0 +1,11 @@ +# Review Checklist + +TODO: Please create a filled checkbox for each review task that you completed: + +- [] Re-read all of the content in the covered chapters of the course textbooks +- [] Studied and executed all of the Python source code in the Colab notebooks +- [] Correctly answered all of the questions in the Colab notebooks +- [] Reviewed and understood all of the technical content in the course slides +- [] Completed all programming projects and engineering efforts +- [] Confirmed that you have a passing build in all of the aforementioned projects +- [] Answered all of the questions in the proactive review document diff --git a/questions/coding.md b/questions/coding.md new file mode 100644 index 0000000..df3f546 --- /dev/null +++ b/questions/coding.md @@ -0,0 +1,25 @@ +# Technical Review + +TODO: Complete the technical review below. + +## Review the Python functions from assignments and notes + +## Provide a recursive Python function that you can write on your own without assistance + +## Provide a second recursive Python function that you can write on your own without assistance + +## Provide a third recursive Python function that you can write on your own without assistance + +## Using a previously provided function, provide Python code to show how to call it + +## Write two test functions for a function above + +## Write a function that directly modifies a list + +## Write a list comprehension + +## Write an import statement from a package + +## Add a counter to a recursive function + +## Create simple class diff --git a/questions/objectives.md b/questions/objectives.md new file mode 100644 index 0000000..41cdbeb --- /dev/null +++ b/questions/objectives.md @@ -0,0 +1,27 @@ +# Learning Objectives + +TODO: Review the +[course learning objectives in the syllabus](https://github.com/allegheny-college-cmpsc-101-spring-2024/course-materials/tree/main?tab=readme-ov-file#course-learning-objectives) + +## Record three learning objectives for which you judge you can demonstrate mastery of the technical knowledge or skill + +## Restate the first learning objective and then explain how you know that you have mastered it + +TODO: Retype the learning objective and then explain why you have mastered the technical skill + +## Restate the second learning objective and then explain how you know that you have mastered it + +TODO: Retype the learning objective and then explain why you have mastered the technical skill + +## Restate the third learning objective and then explain how you know that you have mastered it + +TODO: Retype the learning objective and then explain why you have mastered the technical skill + +## Give a learning objective that you have improved on since the last module of the course + +TODO: Retype the learning objective and then explain what you did to improve your knowledge + +## Give a learning objective that connects to covered material but for which you must continue to work + +TODO: Retype the learning objective and the explain what work you need to +complete so as to ensure that you can develop a mastery of the stated technical skill \ No newline at end of file diff --git a/questions/terminology.md b/questions/terminology.md new file mode 100644 index 0000000..e427939 --- /dev/null +++ b/questions/terminology.md @@ -0,0 +1,105 @@ +# Terminology + +TODO: understand, use, and write code demonstrating the following concepts: + +Chapter 5 - Structured Types: + +- tuple +- iterable object +- indexable object +- list +- mutable type +- immutable type +- aliasing +- cloning +- shallow copy +- deep copy +- value None +- type NoneType +- list comprehension +- higher-order function +- set +- hashable type +- dictionary +- dictionary keys +- dictionary values + +Chapter 6 - Recursion and Global Variables: + +- recursion +- base case +- recursive case +- progression of input +- global variable + +CHapter 7 - Modules and Files: + +- module +- python package +- python subpackage +- python library +- import statement +- symbol +- namespace +- fully qualified name +- standard Python library +- dependencies + +Chapter 8 - Testing and Debugging: + +- testing +- pytest +- debugging +- test suite +- partition of inputs +- glass-box testing +- black-box testing +- static semantic error + +Chapter 9 - Exceptions and Assertions: + +- exceptions +- TypeError +- IndexError +- ValueError +- RecursionError +- assert statement +- AssertionError +- raising an exception +- unhandled exception +- handled exception +- try-except construct +- raise statement + +Chapter 10 - Classes and Object-Oriented Programming: + +- object-oriented programming +- abstract data type +- class +- class definition +- methods +- attribute +- private +- public +- instance +- \_\_ methods +- magic (dunder) methods +- inheritance +- subclass +- superclass +- "IS A" +- encapsulation +- information hiding +- polymorphism +- overriding +- dot notation +- self convention + +Other: + +- linting +- ruff +- profiler +- code coverage +- pytest +- mypy