1. Homepage
  2. Programming
  3. FIT2107 Assessment #4 Code Review and Code Quality

FIT2107 Assessment #4 Code Review and Code Quality

Engage in a Conversation
MonashFIT2107Software quality and testingPython

CourseNana.COM

FIT2107 Assessment #4 (25%) Code Review and Code Quality  CourseNana.COM

—--------—--------—--------—--------—--------—-------- CourseNana.COM

Assessment Overview CourseNana.COM

Objective: As a result of this assessment, you will CourseNana.COM

  • ●  Conduct automated unit testing using continuous integration frameworks and system testing (ULO4); CourseNana.COM

  • ●  Analyze and report code quality issues using modern code review practices with tools and measures (ULO5). CourseNana.COM

    Marks: 25% of your final marks. Due Date: Week 12: Friday 5PM CourseNana.COM

Late Submission and Extension Policy CourseNana.COM

Late Submission: Late penalty of 10% per day after the due date, including the weekends. CourseNana.COM

Extensions: No extensions will be given in normal circumstances. An extension may be granted in special circumstances as per the faculty policy (please use this google form). Extensions must be applied online at the following link: https://www.monash.edu/exams/changes/special-consideration. CourseNana.COM

—--------—--------—--------—--------—--------—-------- CourseNana.COM

Task 1: CI/CD (2%) CourseNana.COM

The purpose of CI/CD (Continuous Integration/Continuous Deployment) is to automate and streamline the software development and deployment processes. It is a set of practices that aims to improve the efficiency, reliability, and speed of delivering software applications to end-users. CI/CD involves a combination of tools, automation, and best practices to achieve its goals. CI focuses on merging code changes from multiple developers into a shared repository regularly, typically multiple times a day. Each code change triggers an automated build process, which compiles the code, runs automated tests, and checks for any integration issues. For Task 1, the assessment will focus on setting up the Continuous Integration and Continuous Delivery in GitLab. Please perform the following tasks. CourseNana.COM

Please set up CI/CD in GitLab to automatically perform static analysis tools (pycodestyles, pydocstyles, pylint, flakes8, mypy) and automated testing with the following CI/CD pipeline. Each of the static analysis tools must successfully check only the megamart.py, but the job is allowed to fail (since all warnings are not fixed yet). On the other hand, the testing must be passed (successfully executed).
CourseNana.COM

  1. Once the CI/CD is setup, it is expected that you may have to create a new branch. The branch name can be anything, up to your choice. CourseNana.COM

Report Submission: CourseNana.COM

(1%) Please submit the URL and the screenshot for your CI/CD pipeline. The first commit of the new branch may not be correct, which is acceptable. Please only submit the URL of the pipeline when the testing step is passed, while static analysis tools must generate warnings, but the jobs can be fail. The CI/CD pipeline should be the same as requested. CourseNana.COM

(1%) What issues did you encounter during setting up the CI/CD, why did that happen, how do you fix them? CourseNana.COM

Task 2: Code Review Automation via Static Analysis Tools (9%) CourseNana.COM

Code review is effective, yet often known to be time-consuming and expensive. Thus, static analysis tools play a crucial role in code review automation and have several important purposes, e.g., improving code quality, code readability, detecting bugs, and accelerating code review practices. Assuming that you are a QA expert, you are asked to use static analysis tools, analyse code quality issues, and write a report to submit to the Board of Directors of Monash MegaMart. You must use the following six static analysis tools (i.e., pycodestyles, pydocstyles, lizard, pylint, flakes8, mypy), run them locally on your machine, and write a report to answer the following questions. CourseNana.COM

4. (6%) For each tool, please analyse all files in the GitLab repository. CourseNana.COM

  1. How many issues/categories are found? Categories refer to the types of the CourseNana.COM

    warnings provided by the tool. For example, https://www.flake8rules.com/, “E101 - Indentation contains mixed spaces and tabs” is an example of the categories. CourseNana.COM

  2. Please present a barchart (Y=Categories, X=#Issues Found) for each tool and analyse the distribution of the categories discovered. CourseNana.COM

c. In the report, please focus on the megamart.py only. CourseNana.COM

i. In the megamart.py, please report only the top-10 most common CourseNana.COM

unique categories (i.e., only the top 10 categories across the tools that CourseNana.COM

you have found). If you find more than 10 categories, please feel free CourseNana.COM

to limit the report to the top-10 categories. However, for those who CourseNana.COM

have already completed this part of the report, feel free to submit what CourseNana.COM

you have done and we will consider your effort during the marking. CourseNana.COM

ii. If the categories are duplicated with other static analysis tools, you CourseNana.COM

can report only once (Updated 11 October 2023). CourseNana.COM

iii. For each category, CourseNana.COM

  1. What is it? Why? CourseNana.COM

  2. What is the previous code? CourseNana.COM

  3. How do you fix them? CourseNana.COM

  4. The previous and the fixed code should be presented in a code CourseNana.COM

    diff format. CourseNana.COM

5. (1%) Please create a Comparison Summary Table. CourseNana.COM

Aspects/Tools CourseNana.COM

pycodestyl es CourseNana.COM

pydocstyl es CourseNana.COM

pyflakes CourseNana.COM

Total Issues found across all files in the entire repository CourseNana.COM

Score (if any) CourseNana.COM

# Issues found for the CourseNana.COM

megamart.py CourseNana.COM

# Fixed Issues for the megamart.py CourseNana.COM

# Remaining Issues Unfixed CourseNana.COM

6. (2%) Based on the entire repository provided, write a conclusion to advise the MegaMart board of Directors about the following: CourseNana.COM

  1. Which files and which functions have the highest number of code quality issues? What are the most common issues of that file and that function ? CourseNana.COM

  2. Which files and which functions are most complex (in terms of cyclomatic CourseNana.COM

complexity)?
- The raw warnings/logs from the tools should be included in the Appendix only CourseNana.COM

Task 3: Bug Fixing and Merge Request (14%) CourseNana.COM

Once all of the issues are discovered, please do your best to fix them all until they are resolved. Once all issues are resolved locally, please perform the following steps: CourseNana.COM

(2%) Create a merge request to propose an improved version of the megamart.py. That means the CI/CD pipeline should focus on the megamart.py, not all files in the repo. Please submit the URL and the screenshot of the merge request. The merge request must include the title and the description, and must be informative. See Week 9 slides for an example of informative merge requests CourseNana.COM

<screenshot> CourseNana.COM

(12%) Check the status of the CI/CD pipeline for megamart.py. Please submit the URL and the screenshot of the CI/CD pipeline of the improved version. CourseNana.COM

<screenshot> CourseNana.COM

  • ●  If all issues are resolved, we expect that all stages of the CI/CD pipeline are passed (green). CourseNana.COM

  • ●  The improved megamart.py must be originally from the original megamart.py. That means we are able to view the code diff (all changed lines are traceable). CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Monash代写,FIT2107代写,Software quality and testing代写,Python代写,Monash代编,FIT2107代编,Software quality and testing代编,Python代编,Monash代考,FIT2107代考,Software quality and testing代考,Python代考,Monashhelp,FIT2107help,Software quality and testinghelp,Pythonhelp,Monash作业代写,FIT2107作业代写,Software quality and testing作业代写,Python作业代写,Monash编程代写,FIT2107编程代写,Software quality and testing编程代写,Python编程代写,Monashprogramming help,FIT2107programming help,Software quality and testingprogramming help,Pythonprogramming help,Monashassignment help,FIT2107assignment help,Software quality and testingassignment help,Pythonassignment help,Monashsolution,FIT2107solution,Software quality and testingsolution,Pythonsolution,