On this page:
Instructions
1 Problem 1 – Canvas discussion post answerer
1.1 Hints:
1.2 Details:
1.3 Bonus:
8.13

Assignment 6-api: api, generics, whole-system integration and design practice🔗

Goals: Practice working with an API, and generic types. Practice design and implementation on a real-world problem.

Instructions🔗

As always, be very careful with your naming conventions.

The submissions will be organized as follows:

Due Dates:
  • Problem 1 – Code Sunday, November 17th at 10:00pm, Demo November 18th during class

1 Problem 1 – Canvas discussion post answerer🔗

This project involves a synthesis of things we have studied and practiced, things we have not studied for you to explore and master on your own, integration with real-world systems and real-world documentation, and solving a truly extrinsically motivated problem.

Your task for this assignment is to design and implement a command-line executable program that takes no arguments and that, when executed, will perform whatever task is asked in our course’s most recent Canvas discussion post, with respect to the most recent PDF document in our course’s Files>Documents on Canvas.

Your program will interact remotely with Canvas and will almost certainly use Microsoft’s Azure service.

You should follow good design recipe practice. Have one purpose per method, one purpose per interface/class/unit of code. You should clearly articulate this purpose statement. I absolve you of needing to write your templates. Each method should be well tested.

You should be prepared to demonstrate to me that you can invoke ./answer_discussion (or ./answer_discussion.exe on Windows for those who wish) to execute your program, and that alone should do everything necessary.

1.1 Hints:🔗
1.2 Details:🔗

The only things I put in Files>Documents will be machine-readable PDF documents. No other file formats will be used, and the only PDFs you need to consider are the ones posted in that location.

You must use Microsoft’s Azure to access your LLM. I’m being deliberate here because I want you to have to do something slightly different from the most popular tutorials on the internet. You have $100 free credit to use.

You must also ensure the quality of your code using appropriate language tooling and configurations for these should also be managed under version control. You should programmatically check for/ensure conformance to a coding style standard, and you should use some tooling to assess the quality of your code, tests, and test coverage.

The instructions for your LLM to follow will be contained entirely in the body of the discussion prompt—you can ignore the discussion post title.

Your program should be robust enough to handle a folder with a large collection of documents, and still find the most recent.

If it matters, determine "most recent" by the creation date.

Your program should continue to work even after I change the discussion post or add a new document—that is to say, you must not "hard code" in either the document or the instructions.

Do not hard-code your API keys into your code. That would be a very poor practice. Instead, store the API key(s) in environment variables, and use system calls to collect that value.

Have a robust test suite. What happens if there are no documents available? What if two documents were posted at the exact same time? What if the download of that document fails part-way through? What happens if the API key cannot be found? What happens if the API key is invalid? What happens if the file system runs out of disk space while you are writing the document? Will your program always be able to write to disk? What happens if your Azure account runs out of credits partway through? Write tests and check for such situations.

Write a well-written README.md file at the top level of your repository. It should explain the prerequsites for using your software, how to set it up and configure it, the types and kinds of arguments, and any other options or features it provides. You would be surprised how difficult it can be to use software without an adequate README.

1.3 Bonus:🔗