Skip to content

Commit

Permalink
Merge branch 'main' into fix-for-issue-348
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Dec 4, 2023
2 parents 7b2fd9d + 1185fda commit e8c456c
Show file tree
Hide file tree
Showing 31 changed files with 253 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
JAVA_OPTS: -Xmx4g

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -63,7 +63,6 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Clean up keychain
run: |
security delete-keychain signing_temp.keychain ${{runner.temp}}/keychain/notarization.keychain || true
Expand All @@ -85,6 +84,8 @@ jobs:
mkdir ${{runner.temp}}/keychain
security create-keychain -p jabref ${{runner.temp}}/keychain/notarization.keychain
security set-keychain-settings ${{runner.temp}}/keychain/notarization.keychain
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Prepare merged jars and modules dir (macOS)
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
- name: Build dmg (macOS)
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:
JDK21: ""

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -94,7 +94,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Prepare merged jars and modules dir (macOS)
if: (matrix.os == 'macos-latest') || (steps.checksecrets.outputs.secretspresent == 'NO')
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/refresh-journal-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Check whether journal-list.mv can be generated (the "real" generation is done inside JabRef's build process)
run: |
./gradlew generateJournalListMV
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests-fetchers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
BiodiversityHeritageApiKey: ${{ secrets.BiodiversityHeritageApiKey_FOR_TESTS}}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true

permissions:
Expand All @@ -50,7 +50,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run fetcher tests
run: ./gradlew fetcherTest
env:
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
JAVA_OPTS: -Xmx4g

concurrency:
group: tests-${{ github.head_ref }}
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true

permissions:
Expand All @@ -39,14 +39,15 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Run checkstyle reporter
uses: nikitasavinov/checkstyle-action@master
with:
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}
checkstyle_config: 'config/checkstyle/checkstyle_reviewdog.xml'
checkstyle_version: '10.3'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run checkstyle using gradle
run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh
openrewrite:
Expand All @@ -63,7 +64,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run OpenRewrite
run: |
./gradlew rewriteDryRun
Expand All @@ -81,7 +83,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run modernizer
run: |
# enable failing of this task if modernizer complains
Expand All @@ -97,7 +100,7 @@ jobs:
submodules: 'false'
show-progress: 'false'
- name: markdownlint-cli2-action
uses: DavidAnson/markdownlint-cli2-action@v13
uses: DavidAnson/markdownlint-cli2-action@v14
with:
globs: |
*.md
Expand Down Expand Up @@ -162,7 +165,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run tests
run: xvfb-run --auto-servernum ./gradlew check -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer
env:
Expand Down Expand Up @@ -197,7 +201,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run tests on PostgreSQL
run: ./gradlew databaseTest --rerun-tasks
env:
Expand Down Expand Up @@ -234,7 +239,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run GUI tests
run: xvfb-run --auto-servernum ./gradlew guiTest
env:
Expand Down Expand Up @@ -278,7 +284,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Update test coverage metrics
if: (github.ref == 'refs/heads/main') && (steps.checksecrets.outputs.secretspresent == 'YES')
run: xvfb-run --auto-servernum ./gradlew jacocoTestReport
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ on:
jobs:
update-gradle-wrapper:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: 21.0.1
distribution: 'liberica'

- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We added the option to use System Preference for Light/Dark Theme [#8729](https://github.com/JabRef/jabref/issues/8729).
- We added [scholar.archive.org](https://scholar.archive.org/) as a new fetcher. [#10498](https://github.com/JabRef/jabref/issues/10498)
- We integrated predatory journal checking as part of the Integrity Checker based on the [check-bib-for-predatory](https://github.com/CfKu/check-bib-for-predatory). [koppor#348](https://github.com/koppor/jabref/issues/348)
- We added a 'More options' section in the main table right click menu opening the preferences dialog. [#9432](https://github.com/JabRef/jabref/issues/9432)

### Changed

Expand Down
58 changes: 58 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: JabRef
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Oliver
family-names: Kopp
orcid: 'https://orcid.org/0000-0001-6962-4290'
- given-names: Tobias
family-names: Diez
orcid: 'https://orcid.org/0000-0002-1407-7696'
- given-names: Christoph
family-names: Schwentker
- given-names: Carl Christian
family-names: Snethlage
- given-names: Jonatan
family-names: Asketorp
- given-names: Benedikt
family-names: Tutzer
- given-names: Thilo
family-names: Ertel
- given-names: Houssem
family-names: Nasri
repository-code: 'https://github.com/jabref/jabref/'
url: 'https://www.jabref.org'
abstract: >-
JabRef is an open-source, cross-platform citation and
reference management tool.
keywords:
- reference manager
- bibtex
- biblatex
license: MIT
preferred-citation:
type: article
authors:
- family-names: "Kopp"
given-names: "Oliver"
orcid: "https://orcid.org/0000-0001-6962-4290"
- family-names: "Snethlage"
given-names: "Carl Christian"
- family-names: "Schwentker"
given-names: "Christoph"
doi: "10.47397/tb/44-3/tb138kopp-jabref"
journal: "TUGboat"
month: 11
start: 441
end: 447
title: "JabRef: BibTeX-based literature management software"
issue: 138
volume: 44
number: 3
year: 2023
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ dependencies {
implementation 'org.apache.lucene:lucene-highlighter:9.8.0'

implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.10.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.13.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
implementation 'com.h2database:h2-mvstore:2.2.224'

// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
implementation 'org.bouncycastle:bcprov-jdk18on:1.76'
implementation 'org.bouncycastle:bcprov-jdk18on:1.77'

implementation 'commons-cli:commons-cli:1.6.0'

Expand Down Expand Up @@ -253,7 +253,7 @@ dependencies {
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '3.0.2'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '3.0.2'

rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.5.0"))
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.5.1"))
rewrite("org.openrewrite.recipe:rewrite-static-analysis")
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
Expand All @@ -277,7 +277,8 @@ processResources {
"astrophysicsDataSystemAPIKey": System.getenv('AstrophysicsDataSystemAPIKey') ? System.getenv('AstrophysicsDataSystemAPIKey') : '',
"ieeeAPIKey": System.getenv('IEEEAPIKey') ? System.getenv('IEEEAPIKey') : '',
"scienceDirectApiKey": System.getenv('SCIENCEDIRECTAPIKEY') ? System.getenv('SCIENCEDIRECTAPIKEY') : '',
"biodiversityHeritageApiKey": System.getenv('BiodiversityHeritageApiKey') ? System.getenv('BiodiversityHeritageApiKey') : ''
"biodiversityHeritageApiKey": System.getenv('BiodiversityHeritageApiKey') ? System.getenv('BiodiversityHeritageApiKey') : '',
"semanticScholarApiKey": System.getenv('SemanticScholarApiKey') ? System.getenv("SemanticScholarApiKey") : ''
)
filteringCharset = 'UTF-8'
}
Expand Down
21 changes: 11 additions & 10 deletions docs/code-howtos/fetchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ parent: Code Howtos

Fetchers are the implementation of the [search using online services](https://docs.jabref.org/collect/import-using-online-bibliographic-database). Some fetchers require API keys to get them working. To get the fetchers running in a JabRef development setup, the keys need to be placed in the respective environment variable. The following table lists the respective fetchers, where to get the key from and the environment variable where the key has to be placed.

| Service | Key Source | Environment Variable | Rate Limit |
|:-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|--------------------------------|----------------------------------|
| [IEEEXplore](https://docs.jabref.org/collect/import-using-online-bibliographic-database#ieeexplore) | [IEEE Xplore API portal](https://developer.ieee.org) | `IEEEAPIKey` | 200 calls/day |
| [MathSciNet](http://www.ams.org/mathscinet) | (none) | (none) | Depending on the current network |
| [SAO/NASA Astrophysics Data System](https://docs.jabref.org/collect/import-using-online-bibliographic-database#sao-nasa-astrophysics-data-system) | [ADS UI](https://ui.adsabs.harvard.edu/user/settings/token) | `AstrophysicsDataSystemAPIKey` | 5000 calls/day |
| [ScienceDirect](https://www.sciencedirect.com) | | `ScienceDirectApiKey` | |
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API Portal](https://dev.springernature.com) | `SpringerNatureAPIKey` | 5000 calls/day |
| [Zentralblatt Math](https://www.zbmath.org) | (none) | (none) | Depending on the current network |
| [Biodiversity Heritage Library](https://www.biodiversitylibrary.org/) | [Biodiversitylibrary](https://about.biodiversitylibrary.org/tools-and-services/developer-and-data-tools/#APIs) | `BiodiversityHeritageApiKey` | - |
| Service | Key Source | Environment Variable | Rate Limit |
|:--------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|--------------------------------|----------------------------------|
| [IEEEXplore](https://docs.jabref.org/collect/import-using-online-bibliographic-database#ieeexplore) | [IEEE Xplore API portal](https://developer.ieee.org) | `IEEEAPIKey` | 200 calls/day |
| [MathSciNet](http://www.ams.org/mathscinet) | (none) | (none) | Depending on the current network |
| [SAO/NASA Astrophysics Data System](https://docs.jabref.org/collect/import-using-online-bibliographic-database#sao-nasa-astrophysics-data-system) | [ADS UI](https://ui.adsabs.harvard.edu/user/settings/token) | `AstrophysicsDataSystemAPIKey` | 5000 calls/day |
| [ScienceDirect](https://www.sciencedirect.com) | | `ScienceDirectApiKey` | |
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | |
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API Portal](https://dev.springernature.com) | `SpringerNatureAPIKey` | 5000 calls/day |
| [Zentralblatt Math](https://www.zbmath.org) | (none) | (none) | Depending on the current network |
| [Biodiversity Heritage Library](https://www.biodiversitylibrary.org/) | [Biodiversitylibrary](https://about.biodiversitylibrary.org/tools-and-services/developer-and-data-tools/#APIs) | `BiodiversityHeritageApiKey` | - |

"Depending on the current network" means that it depends on whether your request is routed through a network having paid access. For instance, some universities have subscriptions to MathSciNet.

Expand Down Expand Up @@ -72,7 +73,7 @@ springerNatureAPIKey=${springerNatureAPIKey}
In `build.gradle`, these variables are filled:

```groovy
"springerNatureAPIKey": System.getenv('SpringerNatureAPIKey')
"springerNatureAPIKey" : System.getenv('SpringerNatureAPIKey')
```

The `BuildInfo` class reads from that file.
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private void createMenu() {

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.SHOW_PREFS, new ShowPreferencesAction(frame, taskExecutor)),
factory.createMenuItem(StandardActions.SHOW_PREFS, new ShowPreferencesAction(frame)),

new SeparatorMenuItem(),

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/jabref/gui/actions/StandardActions.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jabref.gui.actions;

import java.util.Objects;
import java.util.Optional;

import org.jabref.gui.icon.IconTheme;
Expand Down Expand Up @@ -194,7 +195,7 @@ public enum StandardActions implements Action {
GROUP_ENTRIES_ADD(Localization.lang("Add selected entries to this group")),
GROUP_ENTRIES_REMOVE(Localization.lang("Remove selected entries from this group"));

private final String text;
private String text;
private final String description;
private final Optional<JabRefIcon> icon;
private final Optional<KeyBinding> keyBinding;
Expand Down Expand Up @@ -271,4 +272,9 @@ public String getText() {
public String getDescription() {
return description;
}

public Action withText(String text) {
this.text = Objects.requireNonNull(text);
return this;
}
}
Loading

0 comments on commit e8c456c

Please sign in to comment.