Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
Browse files Browse the repository at this point in the history
  • Loading branch information
InAnYan committed Aug 12, 2024
2 parents 1acadf3 + 8d7a77d commit a633766
Show file tree
Hide file tree
Showing 22 changed files with 892 additions and 131 deletions.
61 changes: 1 addition & 60 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ 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 @@ -52,21 +51,8 @@ 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 @@ -88,19 +74,6 @@ 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
Expand All @@ -125,18 +98,6 @@ 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
Expand All @@ -153,18 +114,6 @@ 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
Expand Down Expand Up @@ -213,14 +162,6 @@ 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
Expand Down
3 changes: 3 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,21 @@ These third-party services are the following:
| [Collection of Computer Science Bibliographies](https://en.wikipedia.org/wiki/Collection_of_Computer_Science_Bibliographies) | **currently unavailable**, offline |
| [CrossRef](https://www.crossref.org/) | <https://www.crossref.org/operations-and-sustainability/privacy/> |
| [dblp](https://dblp.uni-trier.de/) | <https://dblp.uni-trier.de/db/about/privacy.html> |
| [DJL (Deep Java Library)](https://djl.ai/) | <https://github.com/deepjavalibrary/djl/discussions/3370#discussioncomment-10233632> |
| [Directory of Open Access Books](https://www.doabooks.org/) | <https://www.doabooks.org/en/resources/accessibility> |
| [Digitala Vetenskapliga Arkivet](https://www.diva-portal.org/) | <https://www.uu.se/en/about-uu/data-protection-policy/> |
| [DOI Foundation](https://www.doi.org/) | <https://www.doi.org/privacy-policy/> |
| [Elsevier](https://www.elsevier.com/) | <https://www.elsevier.com/legal/privacy-policy> |
| [Google Scholar](https://scholar.google.com/) | <https://policies.google.com/privacy> |
| [Gemeinsamer Verbundkatalog](https://www.gbv.de/) | <https://www.gbv.de/datenschutz> |
| [Hugging Face](https://huggingface.co/) | <https://huggingface.co/privacy> |
| [IACR](https://www.iacr.org/) | <https://www.iacr.org/privacy.html> |
| [IEEEXplore](https://ieeexplore.ieee.org/Xplore/home.jsp) | <https://www.ieee.org/security-privacy.html> |
| [INSPIRE](https://inspirehep.net/) | <https://cern.service-now.com/service-portal?id=privacy_policy&se=INSPIRE-Online&notice=main> |
| [ISIDORE](https://isidore.science/) | <https://isidore.science/credit> |
| [JSTOR](https://www.jstor.org/) | <https://www.ithaka.org/privacypolicy/> |
| [Library of Congress](https://lccn.loc.gov/) | <https://www.loc.gov/legal/> |
| [Mistral AI](https://mistral.ai/) | <https://mistral.ai/terms/#privacy-policy> |
| [National Library of Medicine](https://www.ncbi.nlm.nih.gov/) | <https://www.nlm.nih.gov/web_policies.html> |
| [MathSciNet](http://www.ams.org/mathscinet) | <https://www.ams.org/about-us/privacy> |
| [mEDRA](https://www.medra.org/) | <https://www.medra.org/stdoc/en/Servizio_DOI_Informativa_ENG.pdf> |
Expand Down
12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ dependencies {
// Include all jar-files in the 'lib' folder as dependencies
implementation fileTree(dir: 'lib', includes: ['*.jar'])

def pdfbox = "3.0.2"
def pdfbox = "3.0.3"
implementation ("org.apache.pdfbox:pdfbox:$pdfbox") {
exclude group: 'commons-logging'
}
Expand Down Expand Up @@ -182,8 +182,12 @@ dependencies {

implementation 'commons-cli:commons-cli:1.8.0'

// region: LibreOffice
implementation 'org.libreoffice:unoloader:24.2.3'
implementation 'org.libreoffice:libreoffice:24.2.3'
// Required for ID generation
implementation 'io.github.thibaultmeyer:cuid:2.0.3'
// endregion

implementation 'io.github.java-diff-utils:java-diff-utils:4.12'
implementation 'info.debatty:java-string-similarity:2.0.0'
Expand Down Expand Up @@ -256,7 +260,7 @@ dependencies {
implementation 'com.konghq:unirest-modules-gson:4.4.4'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.3.1'

implementation 'org.slf4j:slf4j-api:2.0.13'
implementation 'org.slf4j:slf4j-api:2.0.16'
implementation 'org.tinylog:tinylog-api:2.7.0'
implementation 'org.tinylog:slf4j-tinylog:2.7.0'
implementation 'org.tinylog:tinylog-impl:2.7.0'
Expand Down Expand Up @@ -295,7 +299,7 @@ dependencies {
// Implementation of the API
implementation 'org.glassfish.jersey.core:jersey-server:3.1.7'
// injection framework
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.7'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.8'
implementation 'org.glassfish.hk2:hk2-api:3.1.1'
// testImplementation 'org.glassfish.hk2:hk2-testing:3.0.4'
// implementation 'org.glassfish.hk2:hk2-testing-jersey:3.0.4'
Expand Down Expand Up @@ -351,7 +355,7 @@ dependencies {
testImplementation 'com.tngtech.archunit:archunit-junit5-api:1.3.0'
testImplementation "org.testfx:testfx-core:4.0.16-alpha"
testImplementation "org.testfx:testfx-junit5:4.0.16-alpha"
testImplementation "org.hamcrest:hamcrest-library:2.2"
testImplementation "org.hamcrest:hamcrest-library:3.0"

checkstyle 'com.puppycrawl.tools:checkstyle:10.17.0'
// xjc needs the runtime as well for the ant task, otherwise it fails
Expand Down
1 change: 1 addition & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
requires transitive org.jspecify;

// region: other libraries (alphabetically)
requires cuid;
requires dd.plist;
// required by okhttp and some AI library
requires kotlin.stdlib;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/gui/icon/IconTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ public enum JabRefIcons implements JabRefIcon {
REMOVE_TAGS(MaterialDesignC.CLOSE),
ACCEPT_LEFT(MaterialDesignS.SUBDIRECTORY_ARROW_LEFT),
ACCEPT_RIGHT(MaterialDesignS.SUBDIRECTORY_ARROW_RIGHT),
MERGE_GROUPS(MaterialDesignS.SOURCE_MERGE);
MERGE_GROUPS(MaterialDesignS.SOURCE_MERGE),
ADD_OR_MAKE_BIBLIOGRAPHY(JabRefMaterialDesignIcon.BIBLIOGRAPHY);

private final JabRefIcon icon;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public enum JabRefMaterialDesignIcon implements Ikon {
CANCEL("jab-cancel", '\ue90e'),
SUBLIME_TEXT("jab-sublime-text", '\ue90f'),
TEXSHOP("jab-texshop", '\ue910'),
TEXWORKS("jab-texworks", '\ue911');
TEXWORKS("jab-texworks", '\ue911'),
BIBLIOGRAPHY("jab-bibliography", '\ue912');

private String description;
private int code;
Expand Down
Loading

0 comments on commit a633766

Please sign in to comment.