Skip to content
/ hw1-java Public template

A template repository for the Java version of Homework 1 from CSC 483-583: Text Retrieval and Web Search taught by Mihai Surdeanu & Haris Riaz, Spring 2024

Notifications You must be signed in to change notification settings

hriaz17/hw1-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup your environment

You will need to set up an appropriate coding environment on whatever computer you expect to use for this assignment. Minimally, you should install:

Check out a new branch

Before you start editing any code, you will need to create a new branch in your GitHub repository to hold your work.

  1. Go to the repository that GitHub Classroom created for you. You should have received an email/link and you are most probably reading this there. It should look like https://github.com/CSC483-583-Spring-2024/hw1-java-<your-username>, where <your-username> is your GitHub username. Create a branch through the GitHub interface.
  2. Name your <branch> as lastname_firstname_dev
  3. Clone the repository to your local machine and checkout the branch you just created. Your command must be similar to :
    git clone -b <branch> https://github.com/CSC483-583-Spring-2024/hw1-java-<your-username>.git
    git checkout lastname_firstname_dev
    

Write your code

You will implement one function each for each question, Eg:runQ5_1() inside the class InvertedIndex. These functions should return the documents as asked in the question, as a String array.

Also, you should not edit these files:

  • .github/workflows/run-tests-on-pull.yml
  • src/main/resources/Docs.txt
  • src/test/java/csc583/TestQ5.java

Note: The file src/main/resources/Docs.txt is the input file you must use (or would have started using) as per Homework 1 guidelines. Please don't edit it.

Test your code

Tests have been provided for you in the src/test/java/csc583/TestQ5.java file. To run all the provided tests, run the mvn test script from the top project directory which contains a file named pom.xml

If your code passes the test case, you will see an output similar to:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running edu.arizona.cs.TestQ5
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.038 s - in edu.arizona.cs.TestQ5
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.037 s
[INFO] Finished at: 2020-08-23T15:06:13-07:00
[INFO] ------------------------------------------------------------------------

Note: doing mvn clean from time to time is a good habit.

For more information on maven, see: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

Submit your code

As you are working on the code, you should regularly git commit to save your current changes locally and git push to push all saved changes to the remote repository on GitHub.

To submit your assignment, create a pull request on GitHub. where the "base" branch is "master", and the "compare" branch is the branch you created at the beginning of this assignment. Then go to the "Files changed" tab, and make sure that all your changes look as you would expect them to. There are test cases that will be run automatically (via., Github Actions) when a pull request is submitted. These are the same as mvn test. So if your code passed mvn test in your machine, it’s highly likely that it will pass in GitHub. Nevertheless, you should make sure that you see a green tick mark or a message saying “All Checks Have Passed” like this: like this:

If your test cases are failing, you will get an error message like this: like this:

click on the link which says details and find out what is causing the issue or which test case is not passing. Once you have identified that, close the pull request, fix the errors, and raise another pull request. Do not merge the pull request.

Your instructor will grade the code off this pull request. Pull requests submitted after the deadline won’t be considered. You don't have to submit the code on Gradescope. Note that you still have to submit the answers to questions 1 to 4 on Gradescope.

Grading

Question 5 of this assignment will be graded primarily on their ability to pass the tests that have been provided to you on GitHub after the pull request. Assignments that pass all, and with the corresponding code implementing the correct logic, will receive at least 95% of the possible points.

To get the remaining of the points, your code will be checked for things like readability and code quality.

About

A template repository for the Java version of Homework 1 from CSC 483-583: Text Retrieval and Web Search taught by Mihai Surdeanu & Haris Riaz, Spring 2024

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages