Skip to content

Conversation

@Zeglow
Copy link
Owner

@Zeglow Zeglow commented Sep 22, 2025

Homework 2 Pull Request

Checklist before creating

  • There are no Checkstyle issues.
  • There are no SpotBugs issues.
  • There are no javadoc errors.
  • All tests in the file pass.

Questions

Will you get full credit on this assignment?

Yes, I expect to receive full credit. I successfully converted 15 test methods with multiple assertions to use @ParameterizedTest, following JUnit 5 best practices.

How long did you spend on the assignment?

Approximately 6 hours total, including:

  • Initial setup: It took so long because there was something wrong with jbang when I run build jabref, I tried multiple methods but didn't fix it. Then it recovered itself... Maybe it was caused by network issues. (2 hours)
  • Converting the 15 test methods (2.5 hours)
  • Testing (0.5 hour)
  • Commit&PR (0.5 hour)

What problems did you encounter, and how did you deal with them?

JBang had problems during the initial build jabref step. After trying multiple solutions, it resolved itself, likely due to network connectivity issues. This delayed the initial setup by about 2 hours.

Initially I ran tests in the wrong module (jabgui instead of jablib). Solved by identifying the correct file location.

What help did you give or receive on this assignment (including answering these question)? What was your AI usage?

I collaborated with a classmate on task division - she handled the first 11 methods and the other class in AB while I converted the remaining 15. We coordinated to avoid duplicate work.
I used AI assistance (Claude) for:

  • Learning proper @ParameterizedTest syntax and best practices
  • Code review suggestions
  • Git commands suggestions
  • Debugging gradle test execution issues

Summary of Changes

Methods converted: nAuthors1, applyModifiers, checkLegalKeyNoUnwantedCharacters, checkLegalKeyUnwantedCharacters, keywordsNKeywordsSeparatedBySpace, keywordNKeywordsSeparatedBySpace, title, camel, shortTitle, veryShortTitle, lastPage, pagePrefix, firstPage, nAuthors3, oneAuthorPlusIni

@espertusnu
Copy link
Collaborator

What is the status of this PR?

@Zeglow
Copy link
Owner Author

Zeglow commented Oct 7, 2025

What is the status of this PR?

I just resolved the submodule conflicts (csl-locales and csl-styles). It seems that this PR has no conflicts with the base branch now.

Copy link
Collaborator

@espertusnu espertusnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look for additional opportunities to parameterize tests. Let me know if you have any questions.

}

@Test
void authIniNEmptyReturnsEmpty() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be combined with the previous method.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not parameterize these?

@espertusnu
Copy link
Collaborator

espertusnu commented Oct 7, 2025 via email

@espertusnu
Copy link
Collaborator

Lucia and I both worked on the [CitationKeyGeneratorTest.java] to complete all the methods. I'll update my version with her changes as soon as possible.

I hadn't remembered that multiple people were working on that file. Just let me know what lines are your responsibility, and I'll review only those.

@espertusnu
Copy link
Collaborator

It did seem unlike you not to do a thorough job!

@Zeglow
Copy link
Owner Author

Zeglow commented Oct 7, 2025

Lucia and I both worked on the [CitationKeyGeneratorTest.java] to complete all the methods. I'll update my version with her changes as soon as possible.

I hadn't remembered that multiple people were working on that file. Just let me know what lines are your responsibility, and I'll review only those.

Thank you! I worked on the methods starting from line 579 -> oneAuthorPlusIni.

@Zeglow
Copy link
Owner Author

Zeglow commented Oct 15, 2025

Hi Ellen,
I've addressed all the review comments. So sorry for the late response! I was unwell with an ear infection these days and wasn't feeling well enough to work...Thanks for your patience!
P.S. Do I need to merge my changes with Lucia's modifications before submitting a PR to the main JabRef repository?
Thanks,
Avery

@espertusnu
Copy link
Collaborator

I'm sorry you were unwell and I hope you are all better.

While it would be easier for the jabref people if you merge your changes, one of you wouldn't be listed as a contributor.

Something you could if Lucia agreed would be to split on file boundaries, where you submit the 2 files you did alone, and she submits the file you both worked on, mentioning you in the PR. @Zeglow

@Zeglow
Copy link
Owner Author

Zeglow commented Oct 15, 2025

I'm sorry you were unwell and I hope you are all better.

While it would be easier for the jabref people if you merge your changes, one of you wouldn't be listed as a contributor.

Something you could if Lucia agreed would be to split on file boundaries, where you submit the 2 files you did alone, and she submits the file you both worked on, mentioning you in the PR. @Zeglow

Hi Ellen,

Thank you for your understanding!

I discussed this with Lucia. Actually, I don't have any files that I worked on independently - we only collaborated on CitationKeyGeneratorTest.java together. So we've decided that I will submit the PR for CitationKeyGeneratorTest.java and mention her contributions in the PR description. And she will submit the file she worked on independently. This way we'll both be listed as contributors.

Copy link
Collaborator

@espertusnu espertusnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that I failed to share these comments. Don't bother correcting them in this PR, but do correct them.

Arguments.of("Green Scheduling of `Whatever`", "GreenSchedulingofWhatever")
);
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be CSV.

}

@Test
void generateKeyCorrectKeyWithAndOthersAtTheEnd() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants