Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-10424
Browse files Browse the repository at this point in the history
* upstream/main:
  Update journal abbreviation lists (#10645)
  Use clparse (instead of heylogs) (#10641)
  Update CSL styles (#10642)
  Added parent field to Hayagriva YAML export (#10633)
  Bump org.fxmisc.richtext:richtextfx from 0.11.1 to 0.11.2 (#10637)
  Bump io.github.classgraph:classgraph from 4.8.163 to 4.8.164 (#10634)
  Bump org.junit.platform:junit-platform-launcher from 1.10.0 to 1.10.1 (#10635)
  Bump org.mockito:mockito-core from 5.6.0 to 5.7.0 (#10638)
  Bump com.tngtech.archunit:archunit-junit5-engine from 1.1.0 to 1.2.0 (#10636)
  • Loading branch information
Siedlerchr committed Nov 18, 2023
2 parents c16ba35 + 85cd85f commit 5a820a7
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 28 deletions.
6 changes: 0 additions & 6 deletions .github/heylogs.java

This file was deleted.

36 changes: 23 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "Markdown".
comment_tag: markdown
changelog-non-frozen:
changelog:
name: CHANGELOG.md
runs-on: ubuntu-latest
steps:
Expand All @@ -161,41 +161,51 @@ jobs:
with:
submodules: 'false'
show-progress: 'false'
fetch-depth: 0
- name: Lint CHANGELOG.md
run: |
# Install jbang
curl -Ls https://sh.jbang.dev | bash -s - app setup
export PATH=$PATH:$HOME/.jbang/bin
# ensure that refs are available
BRANCH=`git rev-parse HEAD`
git checkout main
# run heylogs verification
jbang --repos jitpack,central -m nbbrd.heylogs.cli.HeylogsCommand com.github.koppor.heylogs:heylogs-cli:jitpack-SNAPSHOT check CHANGELOG.md --gitdiff main...$BRANCH > heylogs.txt || true
jbang com.github.nbbrd.heylogs:heylogs-cli:0.7.2:bin check CHANGELOG.md > heylogs.txt || true
# improve output
sed -i 's/consistent-separator/consistent-separator (ignored)/' heylogs.txt
sed -i 's/all-h2-contain-a-version/all-h2-contain-a-version (ignored)/' heylogs.txt
cat heylogs.txt
# exit 1 in case of error
# We have 1 "valid" issue in CHANGELOG.md
grep -q "1 problem" heylogs.txt || exit 1
changelog-unreleased-only:
name: CHANGELOG.md - only unreleased touched
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: 'false'
show-progress: 'false'
fetch-depth: 0
- name: Install clparse
run: |
curl -LO https://github.com/marcaddeo/clparse/releases/download/0.9.1/clparse-0.9.1-x86_64-unknown-linux-musl.tar.gz
tar xzvf clparse-0.9.1-x86_64-unknown-linux-musl.tar.gz
sudo mv clparse /usr/local/bin/clparse
- name: Check CHANGELOG.md diff
run: |
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` to section `## [Unreleased]`.
It might also be that another CHANGELOG.md issue arose.
You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "CHANGELOG.md".
comment_tag: changelog
comment_tag: changelog-unreleased-only
tests:
name: Unit tests
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We fixed an issue where the added protected term has unwanted leading and trailing whitespaces, where the formatted text has unwanted empty brackets and where the word at the cursor in the textbox can be added to the list. [#10415](https://github.com/JabRef/jabref/issues/10415)
- We fixed an issue where in the merge dialog the file field of entries was not correctly merged when the first and second entry both contained values inside the file field. [#10572](https://github.com/JabRef/jabref/issues/10572)
- We fixed some small inconsistencies in the user interface. [#10507](https://github.com/JabRef/jabref/issues/10507) [#10458](https://github.com/JabRef/jabref/issues/10458)
- We fixed the issue where the Hayagriva YAML exporter would not include a parent field for the publisher/series. [#10596](https://github.com/JabRef/jabref/issues/10596)

### Removed

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ dependencies {
implementation 'de.saxsys:mvvmfx:1.8.0'
implementation('com.tobiasdiez:easybind:2.2.1-SNAPSHOT')
implementation 'org.fxmisc.flowless:flowless:0.7.2'
implementation 'org.fxmisc.richtext:richtextfx:0.11.1'
implementation 'org.fxmisc.richtext:richtextfx:0.11.2'
implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '1.90.0') {
exclude module: 'javax.inject' // Split package, use only jakarta.inject
exclude group: 'org.apache.logging.log4j'
Expand Down Expand Up @@ -235,14 +235,14 @@ dependencies {
// Allow objects "magically" to be mapped to JSON using GSON
// implementation 'org.glassfish.jersey.media:jersey-media-json-gson:3.1.1'

testImplementation 'io.github.classgraph:classgraph:4.8.163'
testImplementation 'io.github.classgraph:classgraph:4.8.164'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.0'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.1'

testImplementation 'org.mockito:mockito-core:5.6.0'
testImplementation 'org.mockito:mockito-core:5.7.0'
testImplementation 'org.xmlunit:xmlunit-core:2.9.1'
testImplementation 'org.xmlunit:xmlunit-matchers:2.9.1'
testRuntimeOnly 'com.tngtech.archunit:archunit-junit5-engine:1.1.0'
testRuntimeOnly 'com.tngtech.archunit:archunit-junit5-engine:1.2.0'
testImplementation 'com.tngtech.archunit:archunit-junit5-api:1.2.0'
testImplementation "org.testfx:testfx-core:4.0.16-alpha"
testImplementation "org.testfx:testfx-junit5:4.0.16-alpha"
Expand Down
17 changes: 15 additions & 2 deletions src/main/resources/resource/layout/hayagrivayaml.layout
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@
- \format[Authors(LastFirst, MiddleInitial, Sep =\n - , LastSep =\n - )]{\author}
\end{author}
\begin{date} date: \date\end{date}
\begin{journal}
parent:
type: periodical
title: \journal
\end{journal}
\begin{journal&&volume}volume: \volume\end{journal&&volume}
\begin{journal&&number}issue: \number\end{journal&&number}
\begin{journal&&publisher}publisher: \publisher\end{journal&&publisher}
\begin{series}
parent:
type: book
title: "\series"
\end{series}
\begin{editor&&number} issue: \number\end{editor&&number}
\begin{editor&&publisher} publisher: \publisher\end{editor&&publisher}
\begin{editor} editor: \editor\end{editor}
\begin{publisher} publisher: \publisher\end{publisher}
\begin{address} location: \address\end{address}
\begin{institution} organization: \institution\end{institution}
\begin{volume} volume: \volume\end{volume}
\begin{edition} edition: \edition\end{edition}
\begin{pages} page-range: \pages\end{pages}
\begin{url} url: \url\end{url}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,35 @@ void passesModifiedCharsetNull(@TempDir Path tempFile) throws Exception {
"---");
assertEquals(expected, Files.readAllLines(file));
}

@Test
public final void exportsCorrectParentField(@TempDir Path tempFile) throws Exception {
BibEntry entry = new BibEntry(StandardEntryType.Article)
.withCitationKey("test")
.withField(StandardField.AUTHOR, "Test Author")
.withField(StandardField.TITLE, "Test Title")
.withField(StandardField.JOURNAL, "Test Publisher")
.withField(StandardField.URL, "http://example.com")
.withField(StandardField.DATE, "2020-10-14");

Path file = tempFile.resolve("RandomFileName");
Files.createFile(file);
hayagrivaYamlExporter.export(databaseContext, file, Collections.singletonList(entry));

List<String> expected = List.of(
"---",
"test:",
" type: article",
" title: \"Test Title\"",
" author:",
" - Author, Test",
" date: 2020-10-14",
" parent:",
" type: periodical",
" title: Test Publisher",
" url: http://example.com",
"---");

assertEquals(expected, Files.readAllLines(file));
}
}

0 comments on commit 5a820a7

Please sign in to comment.