Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature store journal lists in seperate directory #10824

Conversation

MathewKnee
Copy link

@MathewKnee MathewKnee commented Jan 24, 2024

Closes #10557
jabref1

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Sorry, something went wrong.

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Whats the status here? Is this ready for review?

@@ -15,6 +15,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We added a fetcher for [ISIDORE](https://isidore.science/), simply paste in the link into the text field or the last 6 digits in the link that identify that paper. [#10423](https://github.com/JabRef/jabref/issues/10423)
- When importing entries form the "Citation relations" tab, the field [cites](https://docs.jabref.org/advanced/entryeditor/entrylinks) is now filled according to the relationship between the entries. [#10572](https://github.com/JabRef/jabref/pull/10752)
- We added a new group icon column to the main table showing the icons of the entry's groups. [#10801](https://github.com/JabRef/jabref/pull/10801)
- We added journal abbreviations directory in jabref data directory with automatic processing. [#10557](https://github.com/JabRef/jabref/issues/10557)
Copy link
Member

Choose a reason for hiding this comment

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

As this feature is not really facing the frontend ui, I tend not to put this to the changelog. Are there other opinions?

Copy link
Member

Choose a reason for hiding this comment

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

This is only a part of the issue. The issue also lists "custom.csv" which should be mentioned.

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

I have some basic comments. Need to test manually later. Meanwhile some comments.on the code style...

@@ -70,6 +70,6 @@ public static JournalAbbreviationRepository loadRepository(JournalAbbreviationPr
}

public static JournalAbbreviationRepository loadBuiltInRepository() {
return loadRepository(new JournalAbbreviationPreferences(Collections.emptyList(), true));
return loadRepository(new JournalAbbreviationPreferences(Collections.emptyList(), true, null));
Copy link
Member

Choose a reason for hiding this comment

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

Passing null to a constructor is bad style. There should be a constructor without the additional argument...

this.externalJournalLists = FXCollections.observableArrayList(externalJournalLists);
this.useFJournalField = new SimpleBooleanProperty(useFJournalField);
this.journalAbbreviationsDirectory.setValue(journalAbbreviationsDirectory);
Copy link
Member

Choose a reason for hiding this comment

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

Such a method should not accept null

if (path.getParent() == null) {
return;
}
String mvFileName = path.getFileName().toString().split("\\.")[0] + ".mv";
Copy link
Member

Choose a reason for hiding this comment

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

Use javas basename feature, not string magic

@@ -468,6 +468,7 @@ JabRef\ requests\ recommendations\ from\ Mr.\ DLib,\ which\ is\ an\ external\ se
JabRef\ Version\ (Required\ to\ ensure\ backwards\ compatibility\ with\ Mr.\ DLib's\ Web\ Service)=JabRef Version (Required to ensure backwards compatibility with Mr. DLib's Web Service)

Journal\ abbreviations=Journal abbreviations
Journal\ abbreviations\ directory\:=Journal abbreviations directory:
Copy link
Member

Choose a reason for hiding this comment

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

Remove the : at the end. We aim to get rid of these.

cleanupDir(workDir);
}

public void cleanupDir(File dir) {
Copy link
Member

Choose a reason for hiding this comment

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

Use @tempdir instead of manual test file management

public class JournalAbbreviationStorerTest {

@Test
public void shouldStoreMVFile() throws IOException {
Copy link
Member

Choose a reason for hiding this comment

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

Also use @tempdir

@@ -313,7 +327,8 @@ public void saveJournalAbbreviationFiles() {
journalFiles.forEach(file -> {
try {
file.writeOrCreate();
} catch (IOException e) {
} catch (
IOException e) {
Copy link
Member

Choose a reason for hiding this comment

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

Our IntellIj formatter is broken here somehow..please remove the newline manually.

@Siedlerchr Siedlerchr added the status: changes required Pull requests that are not yet complete label Feb 27, 2024
@koppor
Copy link
Member

koppor commented Feb 28, 2024

@MathewKnee Do you have time to work on this? I would be nice if the smaller issues were resolved so that the next review round can start on "clean code".

@Siedlerchr
Copy link
Member

Closing this PR due to inactivity 💤

@Siedlerchr Siedlerchr closed this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store journal lists in separate directory
4 participants