Skip to content

Commit

Permalink
Merge branch 'main' into LuceneSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
LoayGhreeb authored Aug 4, 2024
2 parents 4352e77 + 0052881 commit 3203439
Show file tree
Hide file tree
Showing 36 changed files with 327 additions and 170 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cleanup-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand All @@ -66,12 +68,12 @@ jobs:
submodules: 'true'
show-progress: 'false'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2.0.0
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v2.0.0
uses: gittools/actions/gitversion/execute@v3.0.0
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -109,6 +111,7 @@ jobs:
--module org.jabref/org.jabref.Launcher \
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
--add-modules org.jabref,org.jabref.merged.module \
--add-modules jdk.incubator.vector \
--dest build/distribution \
--app-content buildres/mac/jabrefHost.py \
--app-content buildres/mac/native-messaging-host \
Expand Down Expand Up @@ -137,7 +140,8 @@ jobs:
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Build pkg (macOS)
if: (steps.checksecrets.outputs.secretspresent == 'YES')
shell: bash
Expand All @@ -146,6 +150,7 @@ jobs:
--module org.jabref/org.jabref.Launcher \
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
--add-modules org.jabref,org.jabref.merged.module \
--add-modules jdk.incubator.vector \
--dest build/distribution \
--app-content buildres/mac/jabrefHost.py \
--app-content buildres/mac/native-messaging-host \
Expand Down Expand Up @@ -173,7 +178,8 @@ jobs:
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Rename files with arm64 suffix as well
if: (steps.checksecrets.outputs.secretspresent == 'YES')
shell: bash
Expand Down Expand Up @@ -225,8 +231,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ jobs:
packages: pigz
version: 1.0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2.0.0
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v2.0.0
uses: gittools/actions/gitversion/execute@v3.0.0

# JDK
- name: 'Set up JDK ${{ matrix.jdk }}'
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand All @@ -79,12 +81,12 @@ jobs:
packages: pigz
version: 1.0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2.0.0
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v2.0.0
uses: gittools/actions/gitversion/execute@v3.0.0
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -121,6 +123,7 @@ jobs:
--module org.jabref/org.jabref.Launcher \
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
--add-modules org.jabref,org.jabref.merged.module \
--add-modules jdk.incubator.vector \
--dest build/distribution \
--app-content buildres/mac/jabrefHost.py \
--app-content buildres/mac/native-messaging-host \
Expand Down Expand Up @@ -149,7 +152,8 @@ jobs:
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Build pkg (macOS)
if: (matrix.os == 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES')
shell: bash
Expand All @@ -158,6 +162,7 @@ jobs:
--module org.jabref/org.jabref.Launcher \
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
--add-modules org.jabref,org.jabref.merged.module \
--add-modules jdk.incubator.vector \
--dest build/distribution \
--app-content buildres/mac/jabrefHost.py \
--app-content buildres/mac/native-messaging-host \
Expand Down Expand Up @@ -186,7 +191,8 @@ jobs:
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Build runtime image and installer (linux, Windows)
if: (matrix.os != 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES')
shell: bash
Expand Down Expand Up @@ -268,8 +274,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand All @@ -293,8 +301,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ jobs:
run: |
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
fi
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
Expand Down
76 changes: 75 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ on:
branches:
- main
- main-release
pull_request:
merge_group:
workflow_dispatch:
# The checkers should write comments on the PR if something fails. For this, we need to have a proper GITHUB_TOKEN. This is enabled by ..._target.
pull_request_target:

env:
SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }}
Expand Down Expand Up @@ -51,6 +52,21 @@ jobs:
gradle-home-cache-cleanup: true
- name: Run checkstyle using gradle
run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
Your code currently does not meet [JabRef's code guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
We use [Checkstyle](https://checkstyle.sourceforge.io/) to identify issues.
The tool reviewdog already placed comments on GitHub to indicate the places. See the tab "Files" in you PR.
Please carefully follow [the setup guide for the codestyle](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
Afterwards, please [run checkstyle locally](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#run-checkstyle) and fix the issues.
You can check review dog's comments at the tab "Files changed" of your pull request.
comment_tag: automated-test-feedback

openrewrite:
name: OpenRewrite
runs-on: ubuntu-latest
Expand All @@ -72,6 +88,20 @@ jobs:
- name: Run OpenRewrite
run: |
./gradlew rewriteDryRun
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
Your code currently does not meet JabRef's code guidelines.
We use [OpenRewrite](https://docs.openrewrite.org/) to ensure "modern" Java coding practices.
The issues found can be **automatically fixed**.
Please execute the gradle task *`rewriteRun`*, check the results, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
comment_tag: automated-test-feedback

modernizer:
name: Modernizer
runs-on: ubuntu-latest
Expand All @@ -95,6 +125,19 @@ jobs:
# enable failing of this task if modernizer complains
sed -i "s/failOnViolations = false/failOnViolations = true/" build.gradle
./gradlew modernizer
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
Your code currently does not meet JabRef's code guidelines.
We use [Gradle Modernizer Plugin](https://github.com/andygoossens/gradle-modernizer-plugin#gradle-modernizer-plugin) to ensure "modern" Java coding practices.
Please fix the detected errors, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Modernizer".
comment_tag: automated-test-feedback

markdown:
name: Markdown
runs-on: ubuntu-latest
Expand All @@ -110,6 +153,19 @@ jobs:
globs: |
*.md
docs/**/*.md
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
You modified Markdown (`*.md`) files and did not meet JabRef's rules for consistently formatted Markdown files.
To ensure consistent styling, we have [markdown-lint](https://github.com/DavidAnson/markdownlint) in place.
[Markdown lint's rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#rules) help to keep our Markdown files consistent within this repository and consistent with the Markdown files outside here.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Markdown".
comment_tag: automated-test-feedback

changelog:
name: CHANGELOG.md
runs-on: ubuntu-latest
Expand All @@ -136,6 +192,7 @@ jobs:
# exit 1 in case of error
# We have 1 "valid" issue in CHANGELOG.md
grep -q "1 problem" heylogs.txt || exit 1
changelog-unreleased-only:
name: CHANGELOG.md - only unreleased touched
runs-on: ubuntu-latest
Expand All @@ -156,6 +213,15 @@ jobs:
diff \
<(git show origin/main:CHANGELOG.md | clparse --format=json --separator=– - | jq '.releases[] | select(.version != null)') \
<(git show HEAD:CHANGELOG.md | clparse --format=json --separator=– - | jq '.releases[] | select(.version != null)')
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
While the PR was in progress, JabRef released a new version.
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` up to the section `## [Unreleased]`.
comment_tag: automated-test-feedback

tests:
name: Unit tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -187,6 +253,7 @@ jobs:
- name: Format failed test results
if: failure()
run: scripts/after-failure.sh

databasetests:
name: Database tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -238,6 +305,7 @@ jobs:
env:
CI: "true"
DBMS: "mysql"

guitests:
name: GUI tests
runs-on: ubuntu-latest
Expand All @@ -260,6 +328,7 @@ jobs:
run: xvfb-run --auto-servernum ./gradlew guiTest
env:
CI: "true"

codecoverage:
name: Code coverage
runs-on: ubuntu-latest
Expand All @@ -282,8 +351,10 @@ jobs:
run: |
if [ "$CODECOV_TOKEN" == "" ]; then
echo "secretspresent=NO" >> $GITHUB_OUTPUT
echo "❌ Secret CODECOV_TOKEN not present"
else
echo "secretspresent=YES" >> $GITHUB_OUTPUT
echo "✔️ Secret CODECOV_TOKEN present"
fi
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -319,6 +390,7 @@ jobs:
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

# This is https://github.com/marketplace/actions/gradle-wrapper-validation
# It ensures that the jar file is from gradle and not by a strange third party.
gradlevalidation:
Expand All @@ -329,6 +401,7 @@ jobs:
with:
show-progress: 'false'
- uses: gradle/actions/wrapper-validation@v3

# This ensures that no git merge conflict markers (<<<, ...) are contained
merge_conflict_job:
name: Find merge conflicts
Expand All @@ -339,6 +412,7 @@ jobs:
show-progress: 'false'
- name: Merge Conflict finder
uses: olivernybroe/[email protected]

other_than_main:
name: Source branch is other than "main"
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We added support for selecting and using CSL Styles in JabRef's OpenOffice/LibreOffice integration for inserting bibliographic and in-text citations into a document. [#2146](https://github.com/JabRef/jabref/issues/2146), [#8893](https://github.com/JabRef/jabref/issues/8893)
- We added Tools > New library based on references in PDF file... to create a new library based on the references section in a PDF file. [#11522](https://github.com/JabRef/jabref/pull/11522)
- When converting the references section of a paper (PDF file), more than the last page is treated. [#11522](https://github.com/JabRef/jabref/pull/11522)
- Added minimal support for [biblatex data annotation](https://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf#subsection.3.7) fields in .layout files. [#11505](https://github.com/JabRef/jabref/issues/11505)
- Added minimal support for [biblatex data annotation](https://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf#subsection.3.7) fields in `.layout` files. [#11505](https://github.com/JabRef/jabref/issues/11505)
- Added saving of selected options in the [Lookup -> Search for unlinked local files dialog](https://docs.jabref.org/collect/findunlinkedfiles#link-the-pdfs-to-your-bib-library). [#11439](https://github.com/JabRef/jabref/issues/11439)

### Changed
Expand All @@ -25,12 +25,15 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- The Pubmed/Medline Plain importer now imports the PMID field as well [#11488](https://github.com/JabRef/jabref/issues/11488)
- The 'Check for updates' menu bar button is now always enabled. [#11485](https://github.com/JabRef/jabref/pull/11485)
- JabRef respects the [configuration for storing files relative to the .bib file](https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#directories-for-files) in more cases. [#11492](https://github.com/JabRef/jabref/pull/11492)
- We enhanced the indexing speed. [#11502](https://github.com/JabRef/jabref/pull/11502)

### Fixed

- We fixed an issue where the 'Check for updates' preference was not saved. [#11485](https://github.com/JabRef/jabref/pull/11485)
- We fixed an issue where the "Check for updates" preference was not saved. [#11485](https://github.com/JabRef/jabref/pull/11485)
- We fixed an issue where an exception was thrown after changing "show preview as a tab" in the preferences. [#11515](https://github.com/JabRef/jabref/pull/11515)
- We fixed an issue where a new unsaved library was not marked with an asterisk [#11519](https://github.com/JabRef/jabref/pull/11519)
- We fixed an issue with colors in the search bar when dark theme is enabled. [#11569](https://github.com/JabRef/jabref/issues/11569)
- We fixed an issue where a new unsaved library was not marked with an asterisk. [#11519](https://github.com/JabRef/jabref/pull/11519)
- We fixed an issue where JabRef starts without window decorations. [#11440](https://github.com/JabRef/jabref/pull/11440)

### Removed

Expand Down
Loading

0 comments on commit 3203439

Please sign in to comment.