T9: Person title/pwzNumber fields [checkpoint]
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"description": "Stan wykonania kolejki zadań lokalnego agenta (PLAN2.md §11-13). Zrodlo prawdy przy konflikcie: git log.",
|
||||
"resumeHint": "Wczytaj ten plik, znajdz pierwszy task o statusie todo/in_progress. Jesli in_progress i drzewo git brudne -> git checkout -- . && git clean -fd, ustaw task na todo, zacznij od zera (PLAN2.md §13.1).",
|
||||
"createdAt": "2026-07-07",
|
||||
"updatedAt": "2026-07-08",
|
||||
"updatedAt": "2026-07-08T23:03:00Z",
|
||||
"tasks": [
|
||||
{
|
||||
"id": "T1",
|
||||
@@ -82,10 +82,10 @@
|
||||
"id": "T9",
|
||||
"title": "Person: title/pwzNumber",
|
||||
"tag": null,
|
||||
"status": "todo",
|
||||
"startedAt": null,
|
||||
"finishedAt": null,
|
||||
"note": "PLAN2.md delta: rozszerzenie Person o title i pwzNumber (PLAN.md sekcja 2, T9)."
|
||||
"status": "done",
|
||||
"startedAt": "2026-07-08T23:00:00Z",
|
||||
"finishedAt": "2026-07-08T23:03:00Z",
|
||||
"note": "Dodano title i pwzNumber do Person record. Zaktualizowano wszystkie nowicje Person (CanonicalWriter, Deduplicator, testy). 7 testow zielonych."
|
||||
},
|
||||
{
|
||||
"id": "T10",
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CanonicalWriter {
|
||||
if (!peopleMap.containsKey(personId)) {
|
||||
peopleMap.put(personId, new Person(
|
||||
personId, extractedName, personEntry.displayTitle(),
|
||||
titles, new ArrayList<>()
|
||||
titles, new ArrayList<>(), null, null
|
||||
));
|
||||
personUrlsMap.put(personId, new LinkedHashSet<>());
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public class CanonicalWriter {
|
||||
if (p != null) {
|
||||
updatedPeople.add(new Person(
|
||||
p.id(), p.fullName(), p.displayName(),
|
||||
p.titles(), new ArrayList<>(entry.getValue())
|
||||
p.titles(), new ArrayList<>(entry.getValue()), null, null
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -49,7 +49,8 @@ public class Deduplicator {
|
||||
first.fullName(),
|
||||
first.displayName(),
|
||||
first.titles(),
|
||||
new ArrayList<>(allUrls)
|
||||
new ArrayList<>(allUrls),
|
||||
null, null
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ public record Person(
|
||||
@JsonProperty("fullName") String fullName,
|
||||
@JsonProperty("displayName") String displayName,
|
||||
@JsonProperty("titles") List<String> titles,
|
||||
@JsonProperty("sourceUrls") List<String> sourceUrls
|
||||
@JsonProperty("sourceUrls") List<String> sourceUrls,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("pwzNumber") String pwzNumber
|
||||
) {
|
||||
}
|
||||
|
||||
+8
-4
@@ -24,14 +24,16 @@ class DeduplicatorTest {
|
||||
"Jan Kowalski",
|
||||
"Jan Kowalski",
|
||||
List.of(),
|
||||
List.of("https://example.com/1")
|
||||
List.of("https://example.com/1"),
|
||||
null, null
|
||||
);
|
||||
Person janKowaski = new Person(
|
||||
"person:jan-kowaski",
|
||||
"Jan Kowaski",
|
||||
"Jan Kowaski",
|
||||
List.of(),
|
||||
List.of("https://example.com/2")
|
||||
List.of("https://example.com/2"),
|
||||
null, null
|
||||
);
|
||||
|
||||
List<Person> input = List.of(janKowalski, janKowaski);
|
||||
@@ -50,14 +52,16 @@ class DeduplicatorTest {
|
||||
"Jan Kowalski",
|
||||
"Jan Kowalski",
|
||||
List.of(),
|
||||
List.of("https://example.com/1")
|
||||
List.of("https://example.com/1"),
|
||||
null, null
|
||||
);
|
||||
Person second = new Person(
|
||||
"person:jan-kowalski",
|
||||
"Jan Kowalski",
|
||||
"Jan Kowalski",
|
||||
List.of(),
|
||||
List.of("https://example.com/2")
|
||||
List.of("https://example.com/2"),
|
||||
null, null
|
||||
);
|
||||
|
||||
List<Person> result = deduplicator.deduplicate(List.of(first, second));
|
||||
|
||||
@@ -40,7 +40,8 @@ class CanonicalRoundTripTest {
|
||||
"Jan Kowalski",
|
||||
"Dyrektor Naczelny",
|
||||
List.of("prof."),
|
||||
List.of("https://uskwb.pl/dyrekcja")
|
||||
List.of("https://uskwb.pl/dyrekcja"),
|
||||
null, null
|
||||
);
|
||||
|
||||
Affiliation affiliation = new Affiliation(
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.developx.szpitale.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class PersonTest {
|
||||
|
||||
@Test
|
||||
void person_withTitleAndPwzNumber_fieldsAccessible() {
|
||||
Person person = new Person(
|
||||
"person:jan-kochanowicz",
|
||||
"Jan Kochanowicz",
|
||||
"prof. dr hab. n. med. Jan Kochanowicz",
|
||||
List.of("prof.", "dr hab.", "n. med."),
|
||||
List.of("https://uskwb.pl/dyrekcja-szpitala/"),
|
||||
"prof. dr hab. n. med.",
|
||||
"1234567"
|
||||
);
|
||||
|
||||
assertEquals("prof. dr hab. n. med.", person.title());
|
||||
assertEquals("1234567", person.pwzNumber());
|
||||
}
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
com/developx/szpitale/ingest/normalize/NameNormalizerTest.class
|
||||
com/developx/szpitale/ingest/normalize/PartyNormalizerTest.class
|
||||
com/developx/szpitale/model/PersonTest.class
|
||||
com/developx/szpitale/ingest/source/MarkdownRegistrySourceTest.class
|
||||
com/developx/szpitale/ingest/normalize/DeduplicatorTest.class
|
||||
com/developx/szpitale/load/GraphLoaderIT.class
|
||||
com/developx/szpitale/load/CanonicalRoundTripTest.class
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
/home/kruszewskia/Workspace/Private/Szpitale-graph/szpitale-graph/src/test/java/com/developx/szpitale/ingest/normalize/PartyNormalizerTest.java
|
||||
/home/kruszewskia/Workspace/Private/Szpitale-graph/szpitale-graph/src/test/java/com/developx/szpitale/ingest/source/MarkdownRegistrySourceTest.java
|
||||
/home/kruszewskia/Workspace/Private/Szpitale-graph/szpitale-graph/src/test/java/com/developx/szpitale/load/CanonicalRoundTripTest.java
|
||||
/home/kruszewskia/Workspace/Private/Szpitale-graph/szpitale-graph/src/test/java/com/developx/szpitale/load/GraphLoaderIT.java
|
||||
/home/kruszewskia/Workspace/Private/Szpitale-graph/szpitale-graph/src/test/java/com/developx/szpitale/model/PersonTest.java
|
||||
|
||||
+5
-5
File diff suppressed because one or more lines are too long
+14
-14
File diff suppressed because one or more lines are too long
+8
-8
File diff suppressed because one or more lines are too long
+7
-7
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+59
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.developx.szpitale.ingest.normalize.DeduplicatorTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s -- in com.developx.szpitale.ingest.normalize.DeduplicatorTest
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s -- in com.developx.szpitale.ingest.normalize.DeduplicatorTest
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.developx.szpitale.ingest.normalize.NameNormalizerTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 s -- in com.developx.szpitale.ingest.normalize.NameNormalizerTest
|
||||
Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 s -- in com.developx.szpitale.ingest.normalize.NameNormalizerTest
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.developx.szpitale.ingest.normalize.PartyNormalizerTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 s -- in com.developx.szpitale.ingest.normalize.PartyNormalizerTest
|
||||
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.010 s -- in com.developx.szpitale.ingest.normalize.PartyNormalizerTest
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.developx.szpitale.ingest.source.MarkdownRegistrySourceTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.100 s -- in com.developx.szpitale.ingest.source.MarkdownRegistrySourceTest
|
||||
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.101 s -- in com.developx.szpitale.ingest.source.MarkdownRegistrySourceTest
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.developx.szpitale.load.CanonicalRoundTripTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.187 s -- in com.developx.szpitale.load.CanonicalRoundTripTest
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.165 s -- in com.developx.szpitale.load.CanonicalRoundTripTest
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.developx.szpitale.model.PersonTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s -- in com.developx.szpitale.model.PersonTest
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user