diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 16199f2abf7..fc055df043f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,6 +13,7 @@ Don't reference an issue in the PR title because GitHub does not support auto-li - [x] done; [ ] not done / not applicable --> +- [x] I own the copyright of the code submitted and I licence it under the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE) - [ ] 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) diff --git a/.github/workflows/add-greeting-to-issue.yml b/.github/workflows/add-greeting-to-issue.yml deleted file mode 100644 index e03ca9f8ba6..00000000000 --- a/.github/workflows/add-greeting-to-issue.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Add greeting to issues for first time contributors - -on: - issues: - types: - - labeled - pull_request_target: - types: - - labeled - -jobs: - GreetingFirstTimeCodeContribution: - if: ${{ github.event.label.name == 'FirstTimeCodeContribution' }} - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: GreetingFirstTimeCodeContribution - uses: peter-evans/create-or-update-comment@v4 - with: - issue-number: ${{ github.event.issue.number || github.event.pull_request.number }} - body: | - Welcome to the vibrant world of open-source development with JabRef! - - Newcomers, we're excited to have you on board. Start by exploring our [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) guidelines, and don't forget to check out our [workspace setup guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) to get started smoothly. - - In case you encounter failing tests during development, please check our [developer FAQs](https://devdocs.jabref.org/code-howtos/faq.html)! - - Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on [JabRef's Gitter chat](https://gitter.im/JabRef/jabref). And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. - - Happy coding! 🚀 diff --git a/.github/workflows/add-to-projects.yml b/.github/workflows/add-to-projects.yml deleted file mode 100644 index a55824e683e..00000000000 --- a/.github/workflows/add-to-projects.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Add to Project on Label - -on: - issues: - types: [labeled] - -permissions: - issues: write - -jobs: - add-to-project: - runs-on: ubuntu-latest - - steps: - - name: "good first issue" - if: "${{ github.event.label.name == 'good first issue' }}" - env: - GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} - run: | - ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") - gh project item-add 5 --owner JabRef --url $ISSUE_URL - - name: needs-refinement - if: github.event.label.name == 'needs-refinement' - env: - GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} - run: | - ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") - gh project item-add 15 --owner JabRef --url $ISSUE_URL - - name: "status: freeze" - if: "${{ github.event.label.name == 'status: freeze' }}" - env: - GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} - run: | - ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") - gh project item-add 9 --owner JabRef --url $ISSUE_URL - - name: ui - if: "${{ github.event.label.name == 'ui' }}" - env: - GH_DEBUG: api - GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} - run: | - ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") - echo $ISSUE_URL - gh project item-add 8 --owner JabRef --url $ISSUE_URL diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml new file mode 100644 index 00000000000..70c89775742 --- /dev/null +++ b/.github/workflows/assign-issue.yml @@ -0,0 +1,34 @@ +name: Assign Issue + +on: + schedule: + - cron: 0 0 * * * + issue_comment: + types: [created] + workflow_dispatch: + +jobs: + assign: + runs-on: ubuntu-latest + steps: + - name: Assign the user or unassign stale assignments + uses: takanome-dev/assign-issue-action@v2.1.1 + with: + github_token: '${{ secrets.GITHUB_TOKEN }}' + days_until_unassign: 30 + assigned_comment: | + 👋 Hey @{{ comment.user.login }}, + + Thanks for your interest in this issue! 🎉 + + Newcomers, we're excited to have you on board. Start by exploring our [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) guidelines, and don't forget to check out our [workspace setup guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) to get started smoothly. + + In case you encounter failing tests during development, please check our [developer FAQs](https://devdocs.jabref.org/code-howtos/faq.html)! + + Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on [JabRef's Gitter chat](https://gitter.im/JabRef/jabref). And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. + + ⚠ Note that this issue will become unassigned if it isn't closed within **{{ totalDays }} days**. + + 🔧 A maintainer can also add the **{{ inputs.pin_label }}** label to prevent it from being unassigned automatically. + + Happy coding! 🚀 diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index ccb056e9bec..67881841c46 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -31,7 +31,7 @@ jobs: restore-keys: cache-lychee- - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@v1.10.0 + uses: lycheeverse/lychee-action@v2.0.2 with: fail: true args: --accept '200,201,202,203,204,403,429,500' --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md' diff --git a/.github/workflows/cleanup-pr.yml b/.github/workflows/cleanup-pr.yml index 5b173eb96e7..5c816f920fa 100644 --- a/.github/workflows/cleanup-pr.yml +++ b/.github/workflows/cleanup-pr.yml @@ -28,7 +28,7 @@ jobs: BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }} - name: Delete folder on builds.jabref.org if: steps.checksecrets.outputs.secretspresent == 'YES' - uses: appleboy/ssh-action@v1.0.3 + uses: appleboy/ssh-action@v1.1.0 with: script: rm -rf /var/www/builds.jabref.org/www/pull/${{ github.event.pull_request.number }} || true host: build-upload.jabref.org @@ -37,7 +37,7 @@ jobs: key: ${{ secrets.buildJabRefPrivateKey }} - name: Update PR comment if: steps.checksecrets.outputs.secretspresent == 'YES' - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v3 with: comment_tag: download-link message: The build for this PR is no longer available. Please visit for the latest build. diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 7bd460fd4d6..0b015838d63 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -287,7 +287,7 @@ jobs: BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }} - name: Comment PR if: (steps.checksecrets.outputs.secretspresent == 'YES') - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v3 with: message: | The build of this PR is available at . diff --git a/.github/workflows/on-labeled-issue.yml b/.github/workflows/on-labeled-issue.yml new file mode 100644 index 00000000000..6d2600da58b --- /dev/null +++ b/.github/workflows/on-labeled-issue.yml @@ -0,0 +1,115 @@ +name: On labeled issue + +on: + issues: + types: + - labeled + +jobs: + FirstTimeCodeContribution: + if: ${{ github.event.label.name == 'FirstTimeCodeContribution' }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: GreetingFirstTimeCodeContribution + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.issue.number || github.event.pull_request.number }} + body: | + Welcome to the vibrant world of open-source development with JabRef! + + Newcomers, we're excited to have you on board. Start by exploring our [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) guidelines, and don't forget to check out our [workspace setup guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) to get started smoothly. + + In case you encounter failing tests during development, please check our [developer FAQs](https://devdocs.jabref.org/code-howtos/faq.html)! + + Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on [JabRef's Gitter chat](https://gitter.im/JabRef/jabref). And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. + + ⚠ Note that this issue will become unassigned if it isn't closed within **30 days**. + + 🔧 A maintainer can also add the **`Pinned`** label to prevent it from being unassigned automatically. + + Happy coding! 🚀 + - name: Move Issue to "Assigned" Column in "Candidates for University Projects" + uses: m7kvqbe1/github-action-move-issues@v1.1.1 + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/3" + target-labels: "FirstTimeCodeContribution" + target-column: "Assigned" + ignored-columns: "" + - name: Move Issue to "Assigned" Column in "Good First Issues" + uses: m7kvqbe1/github-action-move-issues@v1.1.1 + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/5" + target-labels: "FirstTimeCodeContribution" + target-column: "Assigned" + ignored-columns: "" + Assigned: + name: "📍 Assigned" + if: ${{ github.event.label.name == '📍 Assigned' }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Move Issue to "Assigned" Column in "Candidates for University Projects" + uses: m7kvqbe1/github-action-move-issues@v1.1.1 + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/3" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + - name: Move Issue to "Assigned" Column in "Good First Issues" + uses: m7kvqbe1/github-action-move-issues@v1.1.1 + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/5" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + good-first-issue: + name: "good first issue" + if: "${{ github.event.label.name == 'good first issue' }}" + runs-on: ubuntu-latest + steps: + - name: "good first issue" + env: + GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} + run: | + ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") + gh project item-add 5 --owner JabRef --url $ISSUE_URL + needs-refinement: + if: github.event.label.name == 'needs-refinement' + runs-on: ubuntu-latest + steps: + - name: needs-refinement + env: + GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} + run: | + ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") + gh project item-add 15 --owner JabRef --url $ISSUE_URL + status-freeze: + name: "status: freeze" + if: "${{ github.event.label.name == 'status: freeze' }}" + runs-on: ubuntu-latest + steps: + - name: "status: freeze" + env: + GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} + run: | + ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") + gh project item-add 9 --owner JabRef --url $ISSUE_URL + ui: + if: "${{ github.event.label.name == 'ui' }}" + runs-on: ubuntu-latest + steps: + - name: ui + env: + GH_DEBUG: api + GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }} + run: | + ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") + echo $ISSUE_URL + gh project item-add 8 --owner JabRef --url $ISSUE_URL diff --git a/.github/workflows/on-labeled-pr.yml b/.github/workflows/on-labeled-pr.yml new file mode 100644 index 00000000000..4ceb3844fe7 --- /dev/null +++ b/.github/workflows/on-labeled-pr.yml @@ -0,0 +1,23 @@ +name: On labeled PR + +on: + pull_request: + types: + - labeled + +jobs: + automerge: + name: Auto Merge + if: "${{ github.event.label.name == 'automerge' }}" + runs-on: ubuntu-latest + steps: + - name: Approve PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE}} + - name: Merge PR + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}} diff --git a/.github/workflows/on-unlabeled-issue.yml b/.github/workflows/on-unlabeled-issue.yml new file mode 100644 index 00000000000..0947fd05c2a --- /dev/null +++ b/.github/workflows/on-unlabeled-issue.yml @@ -0,0 +1,32 @@ +name: On unlabeled issue + +on: + issues: + types: + - unlabeled + +jobs: + FirstTimeCodeContribution_or_Assigned: + if: ${{ (github.event.label.name == 'FirstTimeCodeContribution') || (github.event.label.name == '📍 Assigned') }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Move Issue to "Free to take" Column in "Candidates for University Projects" + uses: m7kvqbe1/github-action-move-issues@v1.1.1 + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/3" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + - name: Move Issue to "Free to take" Column in "Good First Issues" + uses: m7kvqbe1/github-action-move-issues@v1.1.1 + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/5" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44e8716a6aa..3fc6429acc8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -340,7 +340,7 @@ jobs: CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} requirements_coverage: - name: "Validate requiremenet coverage" + name: "Validate requirement coverage" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 972ebae9d71..d9b2c4ab386 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,6 @@ { "recommendations": [ "davidanson.vscode-markdownlint", - "valentjn.vscode-ltex" + "ltex-plus.vscode-ltex-plus" ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5760240dfdd..2a609a8267d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,11 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We added support for drag'n'drop on an entry in the maintable to an external application to get the entry preview dropped. [#11846](https://github.com/JabRef/jabref/pull/11846) - We added a different background color to the search bar to indicate when the search syntax is wrong. [#11658](https://github.com/JabRef/jabref/pull/11658) - We added a setting which always adds the literal "Cited on pages" text before each JStyle citation. [#11691](https://github.com/JabRef/jabref/pull/11732) +- We added a new plain citation parser that uses LLMs. [#11825](https://github.com/JabRef/jabref/issues/11825) +- We added a compare button to the duplicates in the citation relations tab to open the "Possible duplicate entries" window. [#11192](https://github.com/JabRef/jabref/issues/11192) +- We added automatic browser extension install on Windows for Chrome and Edge. [#6076](https://github.com/JabRef/jabref/issues/6076) +- We added a search bar for filtering keyboard shortcuts. [#11686](https://github.com/JabRef/jabref/issues/11686) +- By double clicking on a local citation in the Citation Relations Tab you can now jump the the linked entry. [#11955](https://github.com/JabRef/jabref/pull/11955) ### Changed @@ -48,6 +53,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - ⚠️ Renamed command line parameters `embeddBibfileInPdf` to `embedBibFileInPdf`, `writeMetadatatoPdf` to `writeMetadataToPdf`, and `writeXMPtoPdf` to `writeXmpToPdf`. [#11575](https://github.com/JabRef/jabref/pull/11575) - The browse button for a Custom theme now opens in the directory of the current used CSS file. [#11597](https://github.com/JabRef/jabref/pull/11597) - The browse button for a Custom exporter now opens in the directory of the current used exporter file. [#11717](https://github.com/JabRef/jabref/pull/11717) +- ⚠️ We relaxed the escaping requirements for [bracketed patterns](https://docs.jabref.org/setup/citationkeypatterns), which are used for the [citaton key generator](https://docs.jabref.org/advanced/entryeditor#autogenerate-citation-key) and [filename and directory patterns](https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#auto-linking-files). One only needs to write `\"` if a quote sign should be escaped. All other escapings are not necessary (and working) any more. [#11967](https://github.com/JabRef/jabref/pull/11967) - JabRef now uses TLS 1.2 for all HTTPS connections. [#11852](https://github.com/JabRef/jabref/pull/11852) - We improved the display of long messages in the integrity check dialog. [#11619](https://github.com/JabRef/jabref/pull/11619) - We improved the undo/redo buttons in the main toolbar and main menu to be disabled when there is nothing to undo/redo. [#8807](https://github.com/JabRef/jabref/issues/8807) @@ -56,9 +62,11 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - When fulltext search is selected but indexing is deactivated, a dialog is now shown asking if the user wants to enable indexing now [#9491](https://github.com/JabRef/jabref/issues/9491) - We changed instances of 'Search Selected' to 'Search Pre-configured' in Web Search Preferences UI. [#11871](https://github.com/JabRef/jabref/pull/11871) - We added a new CSS style class `main-table` for the main table. [#11881](https://github.com/JabRef/jabref/pull/11881) +- When renaming a file, the old extension is now used if there is none provided in the new name. [#11903](https://github.com/JabRef/jabref/issues/11903) ### Fixed +- We fixed an issue where certain actions were not disabled when no libraries were open. [#11923](https://github.com/JabRef/jabref/issues/11923) - 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 JabRef put file paths as absolute path when an entry was created using drag and drop of a PDF file. [#11173](https://github.com/JabRef/jabref/issues/11173) @@ -83,16 +91,18 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where unescaped braces in the arXiv fetcher were not treated. [#11704](https://github.com/JabRef/jabref/issues/11704) - We fixed an issue where HTML instead of the fulltext pdf was downloaded when importing arXiv entries. [#4913](https://github.com/JabRef/jabref/issues/4913) - We fixed an issue where the keywords and crossref fields were not properly focused. [#11177](https://github.com/JabRef/jabref/issues/11177) +- We fixed handling of `\"` in [bracketed patterns](https://docs.jabref.org/setup/citationkeypatterns) containing a RegEx. [#11967](https://github.com/JabRef/jabref/pull/11967) - We fixed an issue where the Undo/Redo buttons were active even when all libraries are closed. [#11837](https://github.com/JabRef/jabref/issues/11837) - We fixed an issue where recently opened files were not displayed in the main menu properly. [#9042](https://github.com/JabRef/jabref/issues/9042) - We fixed an issue where the DOI lookup would show an error when a DOI was found for an entry. [#11850](https://github.com/JabRef/jabref/issues/11850) +- We fixed an issue where Tab cannot be used to jump to next field in some single-line fields. [#11785](https://github.com/JabRef/jabref/issues/11785) ### Removed - We removed support for case-sensitive and exact search. [#11542](https://github.com/JabRef/jabref/pull/11542) - We removed the description of search strings. [#11542](https://github.com/JabRef/jabref/pull/11542) - We removed support for importing using the SilverPlatterImporter (`Record INSPEC`). [#11576](https://github.com/JabRef/jabref/pull/11576) - +- We removed support for automatically generating file links using the CLI (`--automaticallySetFileLinks`). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4aebe4a5b6b..4623b2bc6aa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,177 @@ # Contributing -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository before making a change. +General overview about contributing for non-programmers is available at . -Support on **code contribution** is available at . +We welcome contributions to JabRef and encourage you to follow the GitHub workflow specified below. +If you are not familiar with this type of workflow, take a look at GitHub's excellent overview on the [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) and the explanation of [Feature Branch Workflow](https://atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development. -General overview about contributing for programmers and non-programmers is available at . +Before you start, get the JabRef code on your local machine. +Detailed instructions about this step can be found in our [guidelines for setting up a local workspace](getting-into-the-code/guidelines-for-setting-up-a-local-workspace/). + +## Table of Contents + +* [Choosing a task](#choosing-a-task-) +* [Getting a task assigned](#getting-a-task-assigned) +* [Pull Request Process](#pull-request-process) + * [Requirements on the pull request and code](#requirements-on-the-pull-request-and-code) + * [Development hints](#development-hints) + +## Choosing a task [![Join the chat at https://gitter.im/JabRef/jabref](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JabRef/jabref) + +In general, we offer small issues perfect for aspiring developers. +These tasks provide an opportunity to learn how to set up your local workspace, create your first pull request on GitHub, and contribute towards solving minor problems or making small enhancements in JabRef. + +It is essential to note that JabRef's issues vary in difficulty. +Some are simpler, while others are more complex. Our primary aim is to guide you through the code, ensuring that the understanding scope remains manageable. Sometimes, grasping the code might demand more effort than actually writing lines of code. + +### I am a student and I want to start with something easy + +We collect good issues to start with at our [list of good first issues](https://github.com/orgs/JabRef/projects/5/views/1). + +### I am a student and I want to choose from a curated list of university projects + +Take a look at [JabRef's candidates for university projects](https://github.com/orgs/JabRef/projects/3). There, a list of possible projects to work on during a teaching period is offered. + +### I am a lecturer + +If you ask yourself how to integrate JabRef into your class, please read the [documentation about how to integrate JabRef into a class of software engineering training](https://devdocs.jabref.org/teaching.html#jabref-and-software-engineering-training). +As student, you may notify your lecturer about this possibility. + +### I want something with huge impact + +Look at the discussions in our forum about [new features](https://discourse.jabref.org/c/features/6). +Find an interesting topic, discuss it and start contributing. +Alternatively, you can check out [JabRef's projects page at GitHub](https://github.com/JabRef/jabref/projects?query=is%3Aopen). +Although, of course, you can choose to work on ANY issue, choosing from the projects page has the advantage that these issues have already been categorized, sorted and screened by JabRef maintainers. +A typical subclassifications scheme is "priority" (high, normal and low). Fixing high priority issues is preferred. + +### I want to know how to contribute code and set up my workspace + +Check out the [documentation for developers](https://devdocs.jabref.org/contributing.html#contribute-code) + +### I want to improve the developer's documentation + +For improving developer's documentation, go on at the [docs/ subdirectory of JabRef's code](https://github.com/JabRef/jabref/tree/main/docs) and edit the file. +GitHub offers a good guide at [Editing files in another user's repository](https://help.github.com/en/github/managing-files-in-a-repository/editing-files-in-another-users-repository). +One can also add [callouts](https://just-the-docs.github.io/just-the-docs-tests/components/callouts/). + +## Getting a task assigned + +Comment on the issue you want to work at with `/assign-me`. +GitHub will then automatically assign you. ## Pull Request Process -1. Understand the basics listed at . -2. Follow the "formal requirements". They are not too hard, they merely support the maintainers to focus on supportive feedback than just stating the obvious. They also have helpful hints how to work with localization. -3. Create a pull request. You can create a draft pull request to enable automatic checks. -4. Wait for feedback of the developers -5. Address the feedback of the developers -6. After two developers gave their green flag, the pull request will be merged. +1. Follow the steps at [Pre Condition 3: Code on the local machine](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/pre-03-code.html) to a) create a fork and b) have the fork checked out on your local machine +2. Ensure that you followed the [steps to set up a local workspace](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/) to have the code running properly in IntelliJ. +3. **Create a new branch** (such as `fix-for-issue-121`). Be sure to create a **separate branch** for each improvement you implement. +4. Work on the **new branch — not the `main` branch.** Refer to our [code how-tos](https://devdocs.jabref.org/code-howtos) if you have questions about your implementation. +5. Create a [pull request to JabRef main repository](https://github.com/JabRef/jabref/pulls). + For an overview on the concept of pull requests, take a look at GitHub's [pull request help documentation](https://help.github.com/articles/about-pull-requests/). + 1. Ensure that you followed the requirements listed below. They are not too hard, they merely support the maintainers to focus on supportive feedback than just stating the obvious. + 2. For text inspirations, consider [How to write the perfect pull request](https://github.com/blog/1943-how-to-write-the-perfect-pull-request). + 3. In case your pull request is not yet complete or not yet ready for review, create a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) instead. +6. Wait for feedback of the developers +7. Address the feedback of the developers +8. After two developers gave their green flag, the pull request will be merged. + +In case you have any questions, please + +1. comment on the issue, +2. show up in our [Gitter chat](https://gitter.im/JabRef/jabref), or +3. show your current code using a draft pull request and ask questions. + +We favor looking into your code using a draft pull request, because we can then also load the code into our IDE. +As counterexample, if you provide us with a screenshot of your changes, we cannot run it in our IDE. + +### Requirements on the pull request and code + +#### Test your code + +We know that writing test cases takes a lot of time. +Nevertheless, we rely on our test cases to ensure that a bug fix or a feature implementation does not break anything. + +For UI changes, we know that test cases are hard to write. +Therefore, you can omit them. +However, please at least add a screenshot showing your changes to the request. + + + +#### Write a good commit message + +See [good commit message](https://github.com/joelparkerhenderson/git-commit-message) or [commit guidelines section of Pro Git](http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines). For the curious: [Why good commit messages matter!](https://cbea.ms/git-commit/). The first line of your commit message is automatically taken as the title for the pull-request. All other lines make up the body of the pull request. Add the words `fixes #xxx` to your PR to auto-close the corresponding issue. + +#### Add your change to `CHANGELOG.md` + +You should edit the [`CHANGELOG.md`](https://github.com/JabRef/jabref/blob/main/CHANGELOG.md#changelog) file located in the root directory of the JabRef source. Add a line with your changes in the appropriate section. + +If you did internal refactorings or improvements not visible to the user (e.g., UI, .bib file), then you don't need to put an entry there. + +#### Author credits + +Please, **do not add yourself at JavaDoc's `@authors`**. +The contribution information is tracked via the version control system and shown at [https://github.com/JabRef/jabref/graphs/contributors](https://github.com/JabRef/jabref/graphs/contributors). +We also show all contributors in our blog posts. See [Release 5.15 blog post](https://blog.jabref.org/2024/07/16/JabRef5-15/) for an example. + +Your contribution is considered being made under [MIT license](https://tldrlegal.com/license/mit-license). + +#### Notes on AI usage + +Please keep these two principles in mind when you contribute: + +1. Never let an LLM speak for you. +2. Never let an LLM think for you. + +More reading on that is available at . + +We reserve the right to reject pull requests that contain little or no genuine and original contribution from the contributor. + +### Development hints + +#### When adding an external dependency + +Please try to use a version available at JCenter and add it to `build.gradle`. +In any case, describe the library at [`external-libraries.md`](https://github.com/JabRef/jabref/blob/main/external-libraries.md#external-libraries). +We need that information for our package maintainers (e.g., those of the [debian package](https://tracker.debian.org/pkg/jabref)). + +#### When making an architectural decision + +In case you add a library or do major code rewrites, we ask you to document your decision. Recommended reading: [https://adr.github.io/](https://adr.github.io). + +We simply ask to create a new markdown file in `docs/adr` following the template presented at [https://adr.github.io/madr/](https://adr.github.io/madr/). +You can link that ADR using `@ADR({num})` as annotation. + +#### When adding a new `Localization.lang` entry + +Add new `Localization.lang("KEY")` to a Java file. The tests will fail. In the test output a snippet is generated, which must be added to the English translation file. + +Example: + +```text +java.lang.AssertionError: DETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE +PASTE THESE INTO THE ENGLISH LANGUAGE FILE +[ +Opens\ JabRef's\ Twitter\ page=Opens JabRef's Twitter page +] +Expected :[] +Actual :[Opens\ JabRef's\ Twitter\ page (src\main\java\org\jabref\gui\JabRefFrame.java LANG)] +``` + +Add the above snippet to the English translation file located at `src/main/resources/l10n/JabRef_en.properties`. +[Crowdin](https://crowdin.com/project/jabref) will automatically pick up the new string and add it to the other translations. + +You can also directly run the specific test in your IDE. +The test "`LocalizationConsistencyTest`" is placed under `src/test/java/org.jabref.logic.l10n/LocalizationConsistencyTest.java`. +Find more information in the [JabRef developer docs](code-howtos/localization.md). + +#### **Format of keyboard shortcuts** + +In Markdown files (e.g., `CHANGELOG.md`), sometimes keyboard shortcuts need to be added. +Example: `Ctrl + Enter` + +In case you add keys to the changelog, please follow these rules: + +* `` tag for each key +* First letter of key capitalized +* Combined keys separated by `+` +* Spaces before and after separator `+` diff --git a/build.gradle b/build.gradle index ff57188b2c0..65b5d22bb38 100644 --- a/build.gradle +++ b/build.gradle @@ -166,7 +166,7 @@ dependencies { exclude group: 'commons-logging' } - def luceneVersion = "9.11.1" + def luceneVersion = "10.0.0" implementation "org.apache.lucene:lucene-core:$luceneVersion" implementation "org.apache.lucene:lucene-queryparser:$luceneVersion" implementation "org.apache.lucene:lucene-queries:$luceneVersion" @@ -201,7 +201,7 @@ dependencies { implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '7.0.0.202409031743-r' implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.17.2' - implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.17.2' + implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.18.0' implementation 'com.fasterxml:aalto-xml:1.3.3' @@ -211,7 +211,7 @@ dependencies { // Support unix socket connection types implementation 'com.kohlschutter.junixsocket:junixsocket-core:2.10.1' - implementation 'com.kohlschutter.junixsocket:junixsocket-mysql:2.10.0' + implementation 'com.kohlschutter.junixsocket:junixsocket-mysql:2.10.1' implementation ('com.oracle.ojdbc:ojdbc10:19.3.0.0') { // causing module issues @@ -238,7 +238,7 @@ dependencies { } implementation 'org.fxmisc.flowless:flowless:0.7.3' implementation 'org.fxmisc.richtext:richtextfx:0.11.3' - implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.51.0') { + implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.58.0') { exclude module: 'javax.inject' // Split package, use only jakarta.inject exclude module: 'commons-lang3' exclude group: 'org.apache.commons.validator' @@ -302,7 +302,7 @@ dependencies { // API implementation 'jakarta.ws.rs:jakarta.ws.rs-api:4.0.0' // Implementation of the API - implementation 'org.glassfish.jersey.core:jersey-server:3.1.8' + implementation 'org.glassfish.jersey.core:jersey-server:3.1.9' // injection framework implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.8' implementation 'org.glassfish.hk2:hk2-api:3.1.1' @@ -311,7 +311,7 @@ dependencies { // testImplementation 'org.glassfish.hk2:hk2-junitrunner:3.0.4' // HTTP server // implementation 'org.glassfish.jersey.containers:jersey-container-netty-http:3.1.1' - implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.8' + implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.9' testImplementation 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.8' // Allow objects "magically" to be mapped to JSON using GSON // implementation 'org.glassfish.jersey.media:jersey-media-json-gson:3.1.1' @@ -329,9 +329,9 @@ dependencies { implementation 'org.yaml:snakeyaml:2.3' // region AI - implementation 'dev.langchain4j:langchain4j:0.34.0' + implementation 'dev.langchain4j:langchain4j:0.35.0' // Even though we use jvm-openai for LLM connection, we still need this package for tokenization. - implementation('dev.langchain4j:langchain4j-open-ai:0.34.0') { + implementation('dev.langchain4j:langchain4j-open-ai:0.35.0') { exclude group: 'com.squareup.okhttp3' exclude group: 'com.squareup.retrofit2', module: 'retrofit' exclude group: 'org.jetbrains.kotlin' @@ -341,7 +341,7 @@ dependencies { exclude group: 'com.squareup.retrofit2', module: 'retrofit' exclude group: 'org.jetbrains.kotlin' } - implementation('dev.langchain4j:langchain4j-google-ai-gemini:0.34.0') { + implementation('dev.langchain4j:langchain4j-google-ai-gemini:0.35.0') { exclude group: 'com.squareup.okhttp3' exclude group: 'com.squareup.retrofit2', module: 'retrofit' } @@ -370,7 +370,7 @@ dependencies { // Even if "compileOnly" is used, IntelliJ always adds to module-info.java. To avoid issues during committing, we use "implementation" instead of "compileOnly" implementation 'io.github.adr:e-adr:2.0.0-SNAPSHOT' - testImplementation 'io.github.classgraph:classgraph:4.8.176' + testImplementation 'io.github.classgraph:classgraph:4.8.177' testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0' testImplementation 'org.junit.platform:junit-platform-launcher:1.10.3' @@ -386,7 +386,7 @@ dependencies { // recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954 testImplementation 'org.wiremock:wiremock-standalone:3.3.1' - checkstyle 'com.puppycrawl.tools:checkstyle:10.18.1' + checkstyle 'com.puppycrawl.tools:checkstyle:10.18.2' // xjc needs the runtime as well for the ant task, otherwise it fails xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '3.0.2' xjc group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '3.0.2' diff --git a/buildres/abbrv.jabref.org b/buildres/abbrv.jabref.org index 234cce883ad..d87037495de 160000 --- a/buildres/abbrv.jabref.org +++ b/buildres/abbrv.jabref.org @@ -1 +1 @@ -Subproject commit 234cce883adf9012c2831990d883b198d1d6a939 +Subproject commit d87037495de7213b896dbb6a20170387de170709 diff --git a/buildres/windows/JabRef-post-image.wsf b/buildres/windows/JabRef-post-image.wsf index afdf92ef0ad..96717d1da55 100644 --- a/buildres/windows/JabRef-post-image.wsf +++ b/buildres/windows/JabRef-post-image.wsf @@ -21,7 +21,7 @@ wxsFile.Close(); // Add registry values for JabRef Browser Extension - contents = contents.replace("", ""); + contents = contents.replace("", ""); // Specify banner contents = contents.replace("", ""); diff --git a/docs/code-howtos/bibtex.md b/docs/code-howtos/bibtex.md new file mode 100644 index 00000000000..1ab3f3e7a73 --- /dev/null +++ b/docs/code-howtos/bibtex.md @@ -0,0 +1,19 @@ +--- +parent: Code Howtos +--- +# JabRef's handling of BibTeX + +The main class to handle a single BibTeX entry is `org.jabref.model.entry.BibEntry`. +The content of a `.bib` file is handled in `org.jabref.model.database.BibDatabase`. +Things not written in the `.bib` file, but required for handling are stored in `org.jabref.model.database.BibDatabaseContext`. +For instance, this stores the mode of the library, which can be BibTeX or `biblatex`. + +Standard BibTeX fields known to JabRef are modeled in `org.jabref.model.entry.field.StandardField`. +A user-defined field not known to JabRef's code is modelled in `org.jabref.model.entry.field.UnknownField`. +Typically, to get from a String to a `Field`, one needs to use `org.jabref.model.entry.field.FieldFactory#parseField(java.lang.String)`. + +## Cross-references + +BibTeX allows for referencing other entries by the field `crossref` (`org.jabref.model.entry.field.StandardField#CROSSREF`). +Note that BibTeX and `biblatex` handle this differently. +The method `org.jabref.model.entry.BibEntry#getResolvedFieldOrAlias(org.jabref.model.entry.field.Field, org.jabref.model.database.BibDatabase)` handles this difference. diff --git a/docs/code-howtos/fetchers.md b/docs/code-howtos/fetchers.md index b9520cb56be..e10c800b940 100644 --- a/docs/code-howtos/fetchers.md +++ b/docs/code-howtos/fetchers.md @@ -76,10 +76,16 @@ In `build.gradle`, these variables are filled: "springerNatureAPIKey" : System.getenv('SpringerNatureAPIKey') ``` -The `BuildInfo` class reads from that file. +The `BuildInfo` class reads from that file and the key needs to be put into the map of default API keys in `JabRefCliPreferences::getDefaultFetcherKeys`. ```java -new BuildInfo().springerNatureAPIKey +keys.put(SpringerFetcher.FETCHER_NAME, buildInfo.springerNatureAPIKey); +``` + +The fetcher api key can then be obtained by calling the preferences. + +```java +importerPreferences.getApiKey(SpringerFetcher.FETCHER_NAME); ``` When executing `./gradlew run`, gradle executes `processResources` and populates `build/build.properties` accordingly. However, when working directly in the IDE, Eclipse keeps reading `build.properties` from `src/main/resources`. In IntelliJ, the task `JabRef Main` is executing `./gradlew processResources` before running JabRef from the IDE to ensure the `build.properties` is properly populated. diff --git a/docs/code-howtos/http-server.md b/docs/code-howtos/http-server.md index 309c3eeb30f..295c02aad40 100644 --- a/docs/code-howtos/http-server.md +++ b/docs/code-howtos/http-server.md @@ -3,23 +3,8 @@ parent: Code Howtos --- # HTTP Server -## Get SSL Working - -(Based on ) - -Howto for Windows - other operating systems work similar: - -1. As admin `choco install mkcert` -2. As admin: `mkcert -install` -3. `cd %APPDATA%\..\local\org.jabref\jabref\ssl` -4. `mkcert -pkcs12 jabref.desktop jabref localhost 127.0.0.1 ::1` -5. Rename the file to `server.p12` - -Note: If you do not do this, you get following error message: - -```text -Could not find server key store C:\Users\USERNAME\AppData\Local\org.jabref\jabref\ssl\server.p12. -``` +JabRef has a built-in http server. +For example, the resource for a library is implemented at [`org.jabref.http.server.LibraryResource`](https://github.com/JabRef/jabref/blob/main/src/main/java/org/jabref/http/server/LibraryResource.java). ## Start http server @@ -69,3 +54,24 @@ DEBUG: Server started. IntelliJ Ultimate offers a Markdown-based http-client. One has to open the file `src/test/java/org/jabref/testutils/interactive/http/rest-api.http`. Then, there are play buttons appearing for interacting with the server. + +## Get SSL Working + +When interacting with the [Microsoft Word AddIn](https://github.com/JabRef/JabRef-Word-Addin), a SSL-based connection is required. +[The Word-AddIn is currentely under development](https://github.com/JabRef/JabRef-Word-Addin/pull/568). + +(Based on ) + +Howto for Windows - other operating systems work similar: + +1. As admin `choco install mkcert` +2. As admin: `mkcert -install` +3. `cd %APPDATA%\..\local\org.jabref\jabref\ssl` +4. `mkcert -pkcs12 jabref.desktop jabref localhost 127.0.0.1 ::1` +5. Rename the file to `server.p12` + +Note: If you do not do this, you get following error message: + +```text +Could not find server key store C:\Users\USERNAME\AppData\Local\org.jabref\jabref\ssl\server.p12. +``` diff --git a/docs/code-howtos/localization.md b/docs/code-howtos/localization.md index d7a2a8c6559..568ad369529 100644 --- a/docs/code-howtos/localization.md +++ b/docs/code-howtos/localization.md @@ -66,3 +66,7 @@ The tests in `org.jabref.logic.l10n.LocalizationConsistencyTest` check whether t 3. Configure the new language in [Crowdin](https://crowdin.com/project/jabref) If the language is a variant of a language `zh_CN` or `pt_BR` it is necessary to add a language mapping for Crowdin to the crowdin.yml file in the root. Of course the properties file also has to be named according to the language code and locale. + +## Background information + +The localization is tested via the class [LocalizationConsistencyTest](https://github.com/JabRef/jabref/blob/main/src/test/java/org/jabref/logic/l10n/LocalizationConsistencyTest.java). diff --git a/docs/code-howtos/ui-recommendations.md b/docs/code-howtos/ui-recommendations.md index c10fea8394c..4121226d666 100644 --- a/docs/code-howtos/ui-recommendations.md +++ b/docs/code-howtos/ui-recommendations.md @@ -8,19 +8,27 @@ parent: Code Howtos * For a usual form, place the label above the text field * If the user uses the form often to edit fields, then it might make sense to switch to left-aligned labels -## Designing GUI Confirmation dialogs +## Designing GUI Confirmation Dialogs 1. Avoid asking questions 2. Be as concise as possible 3. Identify the item at risk 4. Name your buttons for the actions -More information: [http://ux.stackexchange.com/a/768](http://ux.stackexchange.com/a/768) +More information: + +* [StackOverflow: What are some alternatives to the phrase "Are you sure you want to XYZ" in confirmation dialogs?](https://ux.stackexchange.com/q/756/93436). +* JabRef issue discussing Yes/No/Cancel: [koppor#149](https://github.com/koppor/jabref/issues/149). + +### Name your buttons for the actions +`req~ui.dialogs.confirmation.naming~1` ## Form validation * Only validate input after leaving the field (or after the user stopped typing for some time) * The user shouldn't be able to submit the form if there are errors * However, disabling the submit button in case there are errors is also not optimal. Instead, clicking the submit button should highlight the errors. -* Empty required files shouldn't be marked as invalid until the user a) tries to submit the form or b) focused the field, deleted it contents and then left the field (see [Example](https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_required) -* Ideally, the error message should be shown below the text field and not as a tooltip (so that users quickly understand what's the problem). For example as here [in Boostrap](https://mdbootstrap.com/docs/jquery/forms/validation/?#custom-styles) +* Empty required files should not be marked as invalid until the user a) tried to submit the form or b) focused the field, deleted its contents and then left the field (see [Example](https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_required)). +* Ideally, the error message should be shown below the text field and not as a tooltip (so that users quickly understand what's the problem). For example as [in Boostrap](https://mdbootstrap.com/docs/jquery/forms/validation/?#custom-styles). + + diff --git a/docs/contributing.md b/docs/contributing.md index d827129b175..b93fe7b58c7 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -3,114 +3,4 @@ nav_order: 2 --- # Contributing -* After reading through this guide, check out some good first issues to contribute to by going to our [list of good first issues](https://github.com/orgs/JabRef/projects/5/views/1). - We offer small issues perfect for aspiring developers. These tasks provide an opportunity to learn how to set up your local workspace, create your first pull request on GitHub, and contribute towards solving minor problems or making small enhancements in JabRef. It is essential to note that the issues vary in difficulty. Some are simpler, while others are more complex. Our primary aim is to guide you through the code, ensuring that the understanding scope remains manageable. Sometimes, grasping the code might demand more effort than actually writing lines of code. -* In case you are aiming to contribute other improvements, please head over to our [general JabRef contribution page](https://docs.jabref.org/faqcontributing). -* In case you are an instructor and want to use **JabRef as a software engineering example**, please head to [https://devdocs.jabref.org/teaching](https://devdocs.jabref.org/teaching). - -## Contribute code - -### Understanding the basics of code contributions - -We welcome contributions to JabRef and encourage you to follow the GitHub workflow specified below. If you are not familiar with this type of workflow, take a look at GitHub's excellent overview on the [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) and the explanation of [Feature Branch Workflow](https://atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development. - -1. Get the JabRef code on your local machine. Detailed instructions about this step can be found in our [guidelines for setting up a local workspace](getting-into-the-code/guidelines-for-setting-up-a-local-workspace/). - 1. Fork the JabRef into your GitHub account. - 2. Clone your forked repository on your local machine. -2. **Create a new branch** (such as `fix-for-issue-121`). Be sure to create a **separate branch** for each improvement you implement. -3. Work on the **new branch — not the `main` branch.** Refer to our [code how-tos](https://devdocs.jabref.org/code-howtos) if you have questions about your implementation. -4. Create a pull request. For an overview of pull requests, take a look at GitHub's [pull request help documentation](https://help.github.com/articles/about-pull-requests/). -5. In case your pull request is not yet complete or not yet ready for review, create a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) instead. - -In case you have any questions, please comment on the issue - or show up in our [gitter chat](https://gitter.im/JabRef/jabref). -Please also help others in case of general questions there. - -### Formal requirements for a pull request - -The main goal of the formal requirements is to provide credit to you and to be able to understand the patch. - -#### Add your change to `CHANGELOG.md` - -You should edit the [`CHANGELOG.md`](https://github.com/JabRef/jabref/blob/main/CHANGELOG.md#changelog) file located in the root directory of the JabRef source. Add a line with your changes in the appropriate section. - -If you did internal refactorings or improvements not visible to the user (e.g., UI, .bib file), then you don't need to put an entry there. - -#### **Format of keyboard shortcuts** - -Example: `Ctrl + Enter` - -In case you add keys to the changelog, please follow these rules: - -* `` tag for each key -* First letter of key capitalized -* Combined keys separated by `+` -* Spaces before and after separator `+` - -#### Author credits - -Please, **do not add yourself at JavaDoc's `@authors`**. The contribution information is tracked via the version control system and shown at [https://github.com/JabRef/jabref/graphs/contributors](https://github.com/JabRef/jabref/graphs/contributors). We also link to the contributors page in our about dialog. - -Your contribution is considered being made under [MIT license](https://tldrlegal.com/license/mit-license). - -#### Write a good commit message - -See [good commit message](https://github.com/joelparkerhenderson/git-commit-message) or [commit guidelines section of Pro Git](http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines). For the curious: [Why good commit messages matter!](https://cbea.ms/git-commit/). The first line of your commit message is automatically taken as the title for the pull-request. All other lines make up the body of the pull request. Add the words `fixes #xxx` to your PR to auto-close the corresponding issue. - -#### Test your code - -We know that writing test cases takes a lot of time. Nevertheless, we rely on our test cases to ensure that a bug fix or a feature implementation doesn't break anything. In case you do not have time to add a test case, we nevertheless ask you to at least run `gradlew check` to ensure that your change doesn't break anything else. - -#### When adding a new `Localization.lang` entry - -Add new `Localization.lang("KEY")` to a Java file. The tests will fail. In the test output a snippet is generated, which must be added to the English translation file. - -Example: - -```text -java.lang.AssertionError: DETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE -PASTE THESE INTO THE ENGLISH LANGUAGE FILE -[ -Opens\ JabRef's\ Twitter\ page=Opens JabRef's Twitter page -] -Expected :[] -Actual :[Opens\ JabRef's\ Twitter\ page (src\main\java\org\jabref\gui\JabRefFrame.java LANG)] -``` - -Add the above snippet to the English translation file located at `src/main/resources/l10n/JabRef_en.properties`. [Crowdin](https://crowdin.com/project/jabref) will automatically pick up the new string and add it to the other translations. - -You can also directly run the specific test in your IDE. The test "LocalizationConsistencyTest" is placed under `src/test/java/org.jabref.logic.l10n/LocalizationConsistencyTest.java`. Find more information in the [JabRef developer docs](code-howtos/localization.md). - -#### When adding a library - -Please try to use a version available at JCenter and add it to `build.gradle`. In any case, describe the library at [`external-libraries.md`](https://github.com/JabRef/jabref/blob/main/external-libraries.md#external-libraries). We need that information for our package maintainers (e.g., those of the [debian package](https://tracker.debian.org/pkg/jabref)). Also add a txt file stating the license in `libraries/`. It is used at `gradlew processResources` to generate the About.html files. You can see the result in `build\resources\main\help\en\About.html` or when clicking Help -> About. - -#### When making an architectural decision - -In case you add a library or do major code rewrites, we ask you to document your decision. Recommended reading: [https://adr.github.io/](https://adr.github.io). - -We simply ask to create a new markdown file in `docs/adr` following the template presented at [https://adr.github.io/madr/](https://adr.github.io/madr/). - -In case you want to directly add a comment to a class, simply use the following template (based on [sustainable architectural decisions](https://www.infoq.com/articles/sustainable-architectural-design-decisions)): - -```text -In the context of , -facing -we decided for