Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fixExporterSelect…
Browse files Browse the repository at this point in the history
…ionCaseInsensitive

* upstream/master: (32 commits)
  Fix Export to clipboard Dialog icon (#6345)
  Refactor EntryEditorPreferences (#6245)
  Update label names
  Squashed 'src/main/resources/csl-locales/' changes from d0ee4d13c9..79845b087b
  Squashed 'src/main/resources/csl-styles/' changes from c1793d2..143464e
  Cite work by @ayaankazerouni
  Improve performance for loading files (#6332)
  Add ADR von JUnit vs. AssertJ (#6335)
  'Name' textfield on focus instead of 'OK' button when user clicks on 'Add subgroup' option (#6330)
  Bump jurt from 6.3.2 to 6.4.3 (#6325)
  Bump unoil from 6.3.2 to 6.4.3 (#6320)
  Bump ridl from 6.3.2 to 6.4.3 (#6326)
  Bump classgraph from 4.8.69 to 4.8.71 (#6322)
  Bump flexmark from 0.61.6 to 0.61.16 (#6318)
  Bump richtextfx from 0.10.4 to 0.10.5 (#6319)
  Bump guava from 28.2-jre to 29.0-jre (#6323)
  Bump flexmark-ext-gfm-tasklist from 0.61.6 to 0.61.16 (#6327)
  Bump org.beryx.jlink from 2.17.5 to 2.17.7 (#6324)
  Improve performance massively by fixing a stupid binding mistake (#6316)
  Fixed missing paste command (#6313)
  ...
  • Loading branch information
Siedlerchr committed Apr 25, 2020
2 parents f57c841 + 41b1705 commit e3c2415
Show file tree
Hide file tree
Showing 139 changed files with 1,936 additions and 1,653 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,10 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v1
name: Restore gradle cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
# in case there is no cache for the current OS, fall back to any other OS
restore-keys: |
${{ runner.os }}-gradle-cache-
Linux-gradle-cache-${{ hashFiles('**/*.gradle') }}
Windows-gradle-cache-${{ hashFiles('**/*.gradle') }}
macOS-gradle-cache-${{ hashFiles('**/*.gradle') }}
- uses: actions/cache@v1
name: Cache gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
# in case there is no cache for the current OS, fall back to any other OS
restore-keys: |
Linux-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
Windows-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
macOS-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Build runtime image
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jlinkZip
- name: Build installer
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
shell: bash
- name: Package application image
run: ${{ matrix.archivePortable }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue will be closed in 7 days due to inactivity :zzz: Please provide the requested information if the problem persists.'
stale-issue-label: 's: stale'
stale-issue-label: 'status: stale'
days-before-stale: 30
only-labels: 's: waiting-for-customer-feedback'
only-labels: 'status: waiting-for-customer-feedback'
1 change: 1 addition & 0 deletions .idea/runConfigurations/JabRef_Main.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We added tooltips for most fields in the entry editor containing a short description. [#5847](https://github.com/JabRef/jabref/issues/5847)
- We added support for basic markdown in custom formatted previews [#6194](https://github.com/JabRef/jabref/issues/6194)
- We now show the number of items found and selected to import in the online search dialog. [#6248](https://github.com/JabRef/jabref/pull/6248)
- We created a new install screen for macOS. [#5759](https://github.com/JabRef/jabref/issues/5759)

### Changed

Expand All @@ -40,6 +41,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where custom exports with an uppercase file extension could not be selected for "Copy...-> Export to Clipboard" [#6285](https://github.com/JabRef/jabref/issues/6285)

- We fixed the display of icon both in the main table and linked file editor. [#6169](https://github.com/JabRef/jabref/issues/6169)
- We fixed the paste entry command in the menu and toolbar, that did not do anything. [#6293](https://github.com/JabRef/jabref/issues/6293)
- We fixed an issue where the windows installer did not create an entry in the start menu [bug report in the forum](https://discourse.jabref.org/t/error-while-fetching-from-doi/2018/3)

### Removed

Expand Down Expand Up @@ -88,8 +91,10 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where citation styles except the default "Preview" could not be used. [#56220](https://github.com/JabRef/jabref/issues/5622)
- We fixed an issue where a warning was displayed when the title content is made up of two sentences. [#5832](https://github.com/JabRef/jabref/issues/5832)
- We fixed an issue where an exception was thrown when adding a save action without a selected formatter in the library properties [#6069](https://github.com/JabRef/jabref/issues/6069)
- We fixed an issue where JabRef's icon was missing in the Export to clipboard Dialog. [#6286](https://github.com/JabRef/jabref/issues/6286)
- We fixed an issue when an "Abstract field" was duplicating text, when importing from RIS file (Neurons) [#6065](https://github.com/JabRef/jabref/issues/6065)


### Removed

- Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action. [#5869](https://github.com/JabRef/jabref/issues/5869)
Expand Down Expand Up @@ -245,6 +250,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We added a 'LaTeX citations' tab to the entry editor, to search for citations to the active entry in the LaTeX file directory. It can be disabled in the preferences dialog.
- We added an option in preferences to allow for integers in field "edition" when running database in bibtex mode. [#4680](https://github.com/JabRef/jabref/issues/4680)
- We added the ability to use negation in export filter layouts. [#5138](https://github.com/JabRef/jabref/pull/5138)
- Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup'. [#6307](https://github.com/JabRef/jabref/issues/6307)

### Fixed

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ JabRef supports you in every step of your research work.
- Easily retrieve and link full-text articles
- Fetch complete bibliographic information based on ISBN, DOI, PubMed-ID and arXiv-ID
- Extract metadata from PDFs
- [JabFox Firefox Add-on](https://addons.mozilla.org/en-US/firefox/addon/jabfox/) lets you import new references directly from the browser with one click
- Import new references directly from the browser with one click using the [official browser extension](https://github.com/JabRef/JabRef-Browser-Extension) for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/jabref/?src=external-github), [Chrome](https://chrome.google.com/webstore/detail/jabref-browser-extension/bifehkofibaamoeaopjglfkddgkijdlh), [Edge](https://microsoftedge.microsoft.com/addons/detail/pgkajmkfgbehiomipedjhoddkejohfna) and [Vivaldi](https://chrome.google.com/webstore/detail/jabref-browser-extension/bifehkofibaamoeaopjglfkddgkijdlh)

### Organize

Expand Down Expand Up @@ -88,7 +88,7 @@ We view pull requests as a collaborative process.
Submit a pull request early to get feedback from the team on work in progress.
We will discuss improvements with you and agree to merge them once the [developers](https://github.com/JabRef/jabref/blob/master/DEVELOPERS) approve.

If you want a step-by-step walk-through on how to set-up your workspace, please check [this guideline](https://devdocs.jabref.org/guidelines-for-setting-up-a-local-workspace/).
If you want a step-by-step walk-through on how to set-up your workspace, please check [this guideline](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace).

To compile JabRef from source, you need a Java Development Kit 14 and `JAVA_HOME` pointing to this JDK.
To run it, just execute `gradlew run`.
Expand Down
28 changes: 17 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
id 'com.github.ben-manes.versions' version '0.28.0'
id 'org.javamodularity.moduleplugin' version '1.5.0'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.17.5'
id 'org.beryx.jlink' version '2.17.7'

// nicer test outputs during running and completion
id 'com.adarshr.test-logger' version '2.0.0'
Expand Down Expand Up @@ -128,10 +128,10 @@ dependencies {
// See https://bugs.documentfoundation.org/show_bug.cgi?id=117331#c8 for background information
// Use the task bundleLibreOffice to update the bundled jar
// DO NOT CHANGE THE libreoffice PREFIX
libreoffice 'org.libreoffice:juh:6.3.2'
libreoffice 'org.libreoffice:jurt:6.3.2'
libreoffice 'org.libreoffice:ridl:6.3.2'
libreoffice 'org.libreoffice:unoil:6.3.2'
libreoffice 'org.libreoffice:juh:6.4.3'
libreoffice 'org.libreoffice:jurt:6.4.3'
libreoffice 'org.libreoffice:ridl:6.4.3'
libreoffice 'org.libreoffice:unoil:6.4.3'

implementation 'io.github.java-diff-utils:java-diff-utils:4.5'
implementation 'info.debatty:java-string-similarity:1.2.1'
Expand All @@ -151,7 +151,7 @@ dependencies {
exclude module: 'oraclepki'
}

implementation ('com.google.guava:guava:28.2-jre') {
implementation ('com.google.guava:guava:29.0-jre') {
// TODO: Remove this as soon as https://github.com/google/guava/issues/2960 is fixed
exclude module: "jsr305"
}
Expand All @@ -165,7 +165,7 @@ dependencies {
implementation 'de.saxsys:mvvmfx:1.8.0'
implementation 'org.fxmisc.easybind:easybind:1.0.3'
implementation 'org.fxmisc.flowless:flowless:0.6.1'
implementation 'org.fxmisc.richtext:richtextfx:0.10.4'
implementation 'org.fxmisc.richtext:richtextfx:0.10.5'
implementation group: 'org.glassfish.hk2.external', name: 'jakarta.inject', version: '2.6.1'
implementation 'com.jfoenix:jfoenix:9.0.9'
implementation 'org.controlsfx:controlsfx:11.0.1'
Expand Down Expand Up @@ -196,11 +196,11 @@ dependencies {
exclude module: "log4j-core"
}

implementation 'com.vladsch.flexmark:flexmark:0.61.6'
implementation 'com.vladsch.flexmark:flexmark:0.61.16'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.6'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.6'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.16'

testImplementation 'io.github.classgraph:classgraph:4.8.69'
testImplementation 'io.github.classgraph:classgraph:4.8.71'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.6.2'
Expand Down Expand Up @@ -648,9 +648,11 @@ jlink {
installerOptions = [
'--vendor', 'JabRef',
'--app-version', "${project.version}",
'--verbose',
'--win-upgrade-uuid', 'd636b4ee-6f10-451e-bf57-c89656780e36',
'--win-dir-chooser',
'--win-shortcut',
'--win-menu',
'--temp', "$buildDir/installer",
'--resource-dir', "${projectDir}/buildres/windows",
'--file-associations', "${projectDir}/buildres/windows/bibtexAssociations.properties"
Expand All @@ -662,6 +664,7 @@ jlink {
'--icon', "${projectDir}/src/main/resources/icons/JabRef-icon-64.png",
]
installerOptions = [
'--verbose',
'--vendor', 'JabRef',
'--app-version', "${project.version}",
// '--temp', "$buildDir/installer",
Expand All @@ -678,11 +681,14 @@ jlink {
if (OperatingSystem.current().isMacOsX()) {
imageOptions = [
'--icon', "${projectDir}/src/main/resources/icons/jabref.icns",
'--resource-dir', "${projectDir}/buildres/mac"
]
installerOptions = [
'--verbose',
'--vendor', 'JabRef',
'--app-version', "${project.version}",
'--file-associations', "${projectDir}/buildres/mac/bibtexAssociations.properties"
'--file-associations', "${projectDir}/buildres/mac/bibtexAssociations.properties",
'--resource-dir', "${projectDir}/buildres/mac"
]
}
}
Expand Down
Binary file added buildres/mac/JabRef-background.tiff
Binary file not shown.
83 changes: 83 additions & 0 deletions docs/adr/0009-use-plain-junit5-for-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Use Plain JUnit5 for advanced test assertions

## Context and Problem Statement

How to write readable test assertions?
How to write readable test assertions for advanced tests?

## Considered Options

* Plain JUnit5
* Hamcrest
* AssertJ

## Decision Outcome

Chosen option: "Plain JUnit5", because comes out best \(see below\).

### Positive Consequences

* Tests are more readable
* More easy to write tests
* More readable assertions

### Negative Consequences

* More complicated testing leads to more complicated assertions

## Pros and Cons of the Options

### Plain JUnit5

Homepage: <https://junit.org/junit5/docs/current/user-guide/>
JabRef testing guidelines: <https://devdocs.jabref.org/getting-into-the-code/code-howtos#test-cases>

Example:

```java
String actual = markdownFormatter.format(source);
assertTrue(actual.contains("Markup<br />"));
assertTrue(actual.contains("<li>list item one</li>"));
assertTrue(actual.contains("<li>list item 2</li>"));
assertTrue(actual.contains("> rest"));
assertFalse(actual.contains("\n"));
```

* Good, because Junit5 is "common Java knowledge"
* Bad, because complex assertions tend to get hard to read
* Bad, because no fluent API

### Hamcrest

Homepage: <http://hamcrest.org/JavaHamcrest/>

* Good, because offers advanced matchers (such as `contains`)
* Bad, because not full fluent API
* Bad, because entry barrier is increased

### AssertJ

Homepage: <https://joel-costigliola.github.io/assertj/>

Example:

```java
assertThat(markdownFormatter.format(source))
.contains("Markup<br />")
.contains("<li>list item one</li>")
.contains("<li>list item 2</li>")
.contains("> rest")
.doesNotContain("\n");
```

* Good, because offers fluent assertions
* Good, because allows partial string testing to focus on important parts
* Good, because assertions are more readable
* Bad, because not commonly used
* Bad, because newcomers have to learn an additional language to express test cases
* Bad, because entry barrier is increased
* Bad, because expressions of test cases vary from unit test to unit test

## Links

* German comparison between Hamcrest and AssertJ: <https://www.sigs-datacom.de/uploads/tx_dmjournals/philipp_JS_06_15_gRfN.pdf>
9 changes: 9 additions & 0 deletions docs/teaching.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ Course [Open Source Software](https://github.com/igorsteinmacher/DSL-UTFPR)
- Summary: Students are requested to contribute to an Open Source project to learn about the maintenance and evolution of software projects. This project is the predecessor of NAU's CS499.
- Course offered from 2013 to 2016 with different names

## Interesting Read for Students and Advisors

- [Developing Procrastination Feedback for Student Software Developers](https://medium.com/@ayaankazerouni/developing-procrastination-feedback-for-student-software-developers-1652de60db7f) by [@ayaankazerouni](https://github.com/ayaankazerouni?tab=overview&from=2015-12-01&to=2015-12-31)
> When students worked earlier and more often, they produced projects that:
>
> - were more correct,
> - were completed earlier,
> - took no more or less time to complete
## References

<a id="LientzSwanson" href="#a1">1</a>: Lientz B., Swanson E., 1980: Software Maintenance Management. Addison Wesley, Reading, MA.
Expand Down
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ environment:
parts:
jabref:
plugin: dump
# source: build/distribution/JabRef-5.0-portable_linux.tar.gz
# source: build/distribution/JabRef-5.1-portable_linux.tar.gz
# Use this source for debug purposes:
source: https://builds.jabref.org/master/JabRef-5.0-portable_linux.tar.gz
source: https://builds.jabref.org/master/JabRef-5.1-portable_linux.tar.gz
stage-packages:
- x11-utils
override-build: |
Expand Down
Loading

0 comments on commit e3c2415

Please sign in to comment.