Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
lych2001 committed Oct 22, 2024
2 parents 78d1f2e + 9025778 commit cdedf7b
Show file tree
Hide file tree
Showing 30 changed files with 143 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
if: ${{ (!startsWith(github.ref, 'refs/heads/gh-readonly-queue')) && (steps.checksecrets.outputs.secretspresent == 'YES') && ((matrix.os == 'ubuntu-latest') || ((matrix.os == 'macos-14') && !((startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)))) }}
shell: bash
run: |
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
- name: Upload to GitHub workflow artifacts store (macOS)
if: (matrix.os == 'macos-14') && (steps.checksecrets.outputs.secretspresent == 'YES') && (startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:
shell: cmd
# for rsync installed by chocolatey, we need the ssh.exe delivered with that installation
run: |
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/jdk-ea && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/jdk-ea/
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/jdk-ea && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/jdk-ea/ || true
- name: Upload to builds.jabref.org (linux, macOS)
if: (matrix.os != 'windows-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') && (github.ref == 'refs/heads/main')
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@ jobs:
shell: cmd
# for rsync installed by chocolatey, we need the ssh.exe delivered with that installation
run: |
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
- name: Upload to builds.jabref.org (linux, macOS)
# macOS: Negated condition of "Upload to GitHub workflow artifacts store (macOS)"
# Reason: We either upload the non-notarized files - or notarize the files later (and upload these later)
# needs to be on one line; multi line does not work
if: ${{ (!startsWith(github.ref, 'refs/heads/gh-readonly-queue')) && (steps.checksecrets.outputs.secretspresent == 'YES') && ((matrix.os == 'ubuntu-latest') || ((matrix.os == 'macos-13') && !((startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)))) }}
shell: bash
run: |
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
- name: Upload to GitHub workflow artifacts store (macOS)
if: (matrix.os == 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES') && (startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- run: ./gradlew traceRequirements
- if: failure()
run: cat build/reports/tracing.txt

# 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.
Expand Down
1 change: 1 addition & 0 deletions .vscode/ltex.dictionary.en-US.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Checkstyle
CouchDB
JabDrive
JabRef
OpenFastTrace
OpenRewrite
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- 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)
- By double clicking on a local citation in the Citation Relations Tab you can now jump the linked entry. [#11955](https://github.com/JabRef/jabref/pull/11955)

### Changed

Expand All @@ -54,6 +54,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- 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)
- When importing BibTeX data starging from on a PDF, the XMP metadata takes precedence over Grobid data. [#11992](https://github.com/JabRef/jabref/pull/11992)
- 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)
Expand Down Expand Up @@ -96,6 +97,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- 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 <kbd>Tab</kbd> cannot be used to jump to next field in some single-line fields. [#11785](https://github.com/JabRef/jabref/issues/11785)
- We fixed an issue where web search preferences "Custom API key" table modifications not discarded. [#11925](https://github.com/JabRef/jabref/issues/11925)

### Removed

Expand Down
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Detailed instructions about this step can be found in our [guidelines for settin
* [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)
* [After submission of a pull request](#after-submission-of-a-pull-request)
* [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)
Expand Down Expand Up @@ -126,6 +127,22 @@ More reading on that is available at <https://roe.dev/blog/using-ai-in-open-sour

We reserve the right to reject pull requests that contain little or no genuine and original contribution from the contributor.

### After submission of a pull request

After you submitted a pull request, automated checks will run.
You will maybe see "Some checks were not successful".
Then, please look into them and handle accordingly.

Afterwards, you will receive comments on it.
Maybe, the pull request is approved immediatly, maybe changes are requested.
In case changes are requested, please implement them.

After changing your code, commit on the branch and push.
The pull request will update automatically.

Never ever close the pull request and open a new one.
This causes much load on our side and is not the style of the GitHub open source community.

### Development hints

#### When adding an external dependency
Expand Down Expand Up @@ -162,7 +179,7 @@ Add the above snippet to the English translation file located at `src/main/resou

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).
Find more information in the [JabRef developer docs](https://devdocs.jabref.org/code-howtos/localization.html).

#### **Format of keyboard shortcuts**

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ dependencyLocking {
}

javafx {
version = "23"
version = "23.0.1"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.web', 'javafx.swing' ]
}

Expand Down
2 changes: 2 additions & 0 deletions docs/code-howtos/ui-recommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ More information:
### Name your buttons for the actions
`req~ui.dialogs.confirmation.naming~1`

Needs: impl

## Form validation

* Only validate input after leaving the field (or after the user stopped typing for some time)
Expand Down
5 changes: 3 additions & 2 deletions docs/decisions/0011-test-external-links-in-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ For high-quality documentation, external links should be working.

## Decision Outcome

Chosen option: "\[option 1\]", because \[justification. e.g., only option, which meets k.o. criterion decision driver \| which resolves force force \|\| comes out best \(see below\)\].
Chosen option: "Check external links once a month", because it provides a basic quality baseline.

### Positive Consequences

* Automatic notification of broken external links

### Negative Consequences

* Some external sites need to [be disabled](https://github.com/JabRef/jabref/pull/6542/files). For instance, GitHub.com always returns "forbidden". A [filter for status is future work of the used tool](https://github.com/tcort/markdown-link-check/issues/94#issuecomment-634947466).
* Some external sites need to [be disabled](https://github.com/JabRef/jabref/pull/6542/files). For instance, GitHub.com always returns "forbidden".
* Contributors find it strange if external links are broken (example: [user-documentation#526](https://github.com/JabRef/user-documentation/pull/526#issuecomment-2416462977))

## Pros and Cons of the Options

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Example:
It is important that there is no empty line directly after the heading.

{: note}
One needs to add `<!-- markdownlint-disable-file MD022 -->` to the end of the file, because the id of the requirement needs to follow the heading directly.
One needs to add `<!-- markdownlint-disable-file MD022 -->` to the end of the file, because the ID of the requirement needs to follow the heading directly.

## Linking implementations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ public void execute() {
boolean confirmDownload = dialogService.showConfirmationDialogAndWait(
Localization.lang("Download full text documents"),
Localization.lang(
"You are about to download full text documents for %0 entries.",
String.valueOf(stateManager.getSelectedEntries().size())) + "\n"
+ Localization.lang("JabRef will send at least one request per entry to a publisher.")
+ "\n"
+ Localization.lang("Do you still want to continue?"),
"You are attempting to download full text documents for %0 entries.\nJabRef will send at least one request per entry to a publisher.",
String.valueOf(stateManager.getSelectedEntries().size())),
// [impl->req~ui.dialogs.confirmation.naming~1]
Localization.lang("Download full text documents"),
Localization.lang("Cancel"));

Expand Down
20 changes: 6 additions & 14 deletions src/main/java/org/jabref/gui/externalfiles/ImportHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.jabref.logic.citationkeypattern.CitationKeyGenerator;
import org.jabref.logic.database.DuplicateCheck;
import org.jabref.logic.externalfiles.ExternalFilesContentImporter;
import org.jabref.logic.importer.CompositeIdFetcher;
import org.jabref.logic.importer.FetcherException;
import org.jabref.logic.importer.ImportCleanup;
import org.jabref.logic.importer.ImportException;
Expand Down Expand Up @@ -359,22 +360,13 @@ public List<BibEntry> handleStringData(String data) throws FetcherException {
return Collections.emptyList();
}

Optional<DOI> doi = DOI.findInText(data);
if (doi.isPresent()) {
return fetchByDOI(doi.get());
if (!CompositeIdFetcher.containsValidId(data)) {
return tryImportFormats(data);
}

Optional<ArXivIdentifier> arXiv = ArXivIdentifier.parse(data);
if (arXiv.isPresent()) {
return fetchByArXiv(arXiv.get());
}

Optional<ISBN> isbn = ISBN.parse(data);
if (isbn.isPresent()) {
return fetchByISBN(isbn.get());
}

return tryImportFormats(data);
CompositeIdFetcher compositeIdFetcher = new CompositeIdFetcher(preferences.getImportFormatPreferences());
Optional<BibEntry> optional = compositeIdFetcher.performSearchById(data);
return OptionalUtil.toList(optional);
}

private List<BibEntry> tryImportFormats(String data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class WebSearchTabViewModel implements PreferenceTabViewModel {
private final BooleanProperty grobidEnabledProperty = new SimpleBooleanProperty();
private final StringProperty grobidURLProperty = new SimpleStringProperty("");

private final ListProperty<FetcherApiKey> apiKeys = new SimpleListProperty<>();
private final ObservableList<FetcherApiKey> apiKeys = FXCollections.observableArrayList();
private final ObjectProperty<FetcherApiKey> selectedApiKeyProperty = new SimpleObjectProperty<>();
private final BooleanProperty apikeyPersistProperty = new SimpleBooleanProperty();
private final BooleanProperty apikeyPersistAvailableProperty = new SimpleBooleanProperty();
Expand Down Expand Up @@ -138,7 +138,10 @@ public void setValues() {
grobidEnabledProperty.setValue(grobidPreferences.isGrobidEnabled());
grobidURLProperty.setValue(grobidPreferences.getGrobidURL());

apiKeys.setValue(FXCollections.observableArrayList(preferences.getImporterPreferences().getApiKeys()));
apiKeys.setAll(preferences.getImporterPreferences().getApiKeys().stream()
.map(apiKey -> new FetcherApiKey(apiKey.getName(), apiKey.shouldUse(), apiKey.getKey()))
.toList());

apikeyPersistAvailableProperty.setValue(OS.isKeyringAvailable());
apikeyPersistProperty.setValue(preferences.getImporterPreferences().shouldPersistCustomKeys());
catalogs.addAll(WebFetchers.getSearchBasedFetchers(importFormatPreferences, importerPreferences)
Expand Down Expand Up @@ -213,7 +216,7 @@ public StringProperty grobidURLProperty() {
return grobidURLProperty;
}

public ListProperty<FetcherApiKey> fetcherApiKeys() {
public ObservableList<FetcherApiKey> fetcherApiKeys() {
return apiKeys;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public PdfMergeMetadataImporter(ImportFormatPreferences importFormatPreferences)
this.metadataImporters = new ArrayList<>(5);
this.metadataImporters.add(new PdfVerbatimBibtexImporter(importFormatPreferences));
this.metadataImporters.add(new PdfEmbeddedBibFileImporter(importFormatPreferences));
this.metadataImporters.add(new PdfXmpImporter(importFormatPreferences.xmpPreferences()));
if (importFormatPreferences.grobidPreferences().isGrobidEnabled()) {
this.metadataImporters.add(new PdfGrobidImporter(importFormatPreferences));
}
this.metadataImporters.add(new PdfXmpImporter(importFormatPreferences.xmpPreferences()));
this.metadataImporters.add(new PdfContentImporter());
}

Expand Down
Loading

0 comments on commit cdedf7b

Please sign in to comment.