Skip to content

Latest commit

 

History

History
156 lines (101 loc) · 6.42 KB

hw1.md

File metadata and controls

156 lines (101 loc) · 6.42 KB

 


 

🌀 CSC510: Software Engineering
NC State, Spring '25

HW1: A Beautiful Repo

Your repo is your resume. Does it look professional?

How to Submit Assignment:

  • Only one group member submits the work.
  • Include:
    • Group number
    • Names of all participants (Name - github user id)
    • Repo URL
    • A screenshot as specified in Tasks 3, 4, 6.

What to Hand In:

  • A one-page PDF with a screenshot from Task 6.
  • On that page, also write the repo URL created below. (where we can look at all your wonderful badges).

Notes:

  • Tasks 1–9 are straightforward.
  • Tasks 10–13 require additional troubleshooting with web resources.
  • Task 14 is optional but encouraged. All these task 14 will be required for Project2 so if you want to check you can get all your Project2 marks, try these now. Sure, some of these will require researching on the web but you've got time (its still jsut start of semester) and you've got a good team. So why not go for it?

Ensure equal contribution among group members.

Todo

  1. Your team should create an organization on Github.

    • Do not use NCSU GitHub.
  2. Create a repo in that organization. Make it public.

Learn more about READMEs.

  1. Find the big green CODE button. Create a new codespace on the main.
  • Take a screenshot.
  • Use codespace to complete following steps.
  1. Check you have the latest Python (3.13)

    • If not, then in the terminal, install python3.13 by running the following command (it is all on one line).

      sudo apt update -y; sudo  apt upgrade -y; sudo apt install software-properties-common -y; sudo add-apt-repository ppa:deadsnakes/ppa -y ; sudo apt update -y ; sudo apt install python3.13 -y
      
      

      Then check you have python3.13.

      python3.13 -B --version
      • Take a screenshot
  2. Write a short Python program (10 lines) and add an error.

  • From the command line, run that file.

    python3 myfile.py
  • You should see errors on the command line.

  • VSCode should now be asking if you want Python support installed. Do it.

  1. Run the code again. Take your mouse and point to one of the errors on the screen. Observe how it highlights like a hyperlink.
  • Take a screenshot of you and point to that error. Include the whole window so we can see you can see the code and error at the same time.. It is probably syntax error that you fix after making screenshot.

For 7 and 8 tasks, it is recommended that a terminal be used.

  1. Add License

    • Go to Choose a License and find the text for your license of choice.
    • Add your chosen license text to LICENSE.md. Change /workspaces/LICENSE.md to have that content. The LICENSE.md document should be on your repository root. Learn more about licenses.
  2. Add .gitignore

  3. Add Badges

    • Go to Shields.io and dev.to and work out how to add a badge to a markdown file.
    • Go to /workspaces/README.md. Delete its contents. Add badges to the top for:
      • Language: Python
      • License: BSD-2 (or your choice)
      • Platform: Linux
  4. Add Tests

  • Look up "pytest". Add a test engine to your code.
  • Write two tests:
    • One test should pass.
    • One test should fail(that means that you should have one logical error).
  • Important: Make the tests in a SEPARATE file for your code file.
  • It should show "fail". Thereby showing your tests are working.
  1. Set Up GitHub Actions

    • Look up how to do Python workflows here.
    • Automate tests to run on every commit.
  2. Make your code auto-test each time you commit (using the workflows). GitHub actions are run on push. Ideally, you push after every commit to ensure what broke your code.

  3. Add a Status Badge

    • Add a badge showing if your tests pass or fail.
    • Follow instructions here.
  4. Optional