From 5cdd3d34f1932197fdd81d9b03570767f85eebf4 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 13 Apr 2018 16:01:33 -0700 Subject: notes/docs cleanups --- notes/basic_ui.txt | 53 ---------------------------- notes/data_model.md | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ notes/libs.txt | 15 -------- notes/notes.txt | 24 ------------- notes/test_cases.txt | 7 ---- notes/test_works.txt | 7 ++++ notes/webface_notes.txt | 54 +++++++++++++++++++++++++++++ 7 files changed, 153 insertions(+), 99 deletions(-) delete mode 100644 notes/basic_ui.txt create mode 100644 notes/data_model.md delete mode 100644 notes/libs.txt delete mode 100644 notes/notes.txt delete mode 100644 notes/test_cases.txt create mode 100644 notes/test_works.txt diff --git a/notes/basic_ui.txt b/notes/basic_ui.txt deleted file mode 100644 index 12ad1ecc..00000000 --- a/notes/basic_ui.txt +++ /dev/null @@ -1,53 +0,0 @@ - -# "Add Something" Workflow - -## Add a Work - -Title -Primary Type -Primary Creators/Authors -Description (not an abstract) -Primary/Original Language -Subject/Categorization/Tags -Is a Stub (unpublished/unreleased) - -## Release Information - -Contributors -Date -Container / Part-Of -Publisher -Identifiers -Language -Type / Media -Issue / Volume / Pages / Chapter - -## Anything Else? - -Known file / copy / url -Citations (outbound) - -# Queries / Searches / Views - -Views: work, release, creator, container, publisher - -Lookup by identifier - -# Other Workflows/Editors - -Single-creator-oriented helper to find works and disambiguate authorship - -Bulk author disambiguation helper (find other unresolved authors with same -alias text and select; drag works between columns) - -Bulk query-then-edit UI: search results in a table, edit like a spreadsheet, up -to... dozens? Query and then apply delta (eg, set topic)? Eg, author edits -basic metadata for all their citations all at once. - -Release editor - -Merge containers (and all related releases) -Merge entities (works, releases, etc) -Move release between works -Split entities (works, authors, etc), including linked stuff - diff --git a/notes/data_model.md b/notes/data_model.md new file mode 100644 index 00000000..fe21b533 --- /dev/null +++ b/notes/data_model.md @@ -0,0 +1,92 @@ + +## Cookbook + +To create a new works: + + login/create account + + match/lookup on first work; if found, modify not create + TODO: match/lookup on files? + + new edit group (under account; wip) + new edit (under group) + + match/lookup on all creators + match/lookup on all refs + TODO: match/lookup on files? + match/lookup container + + new work_rev (linked to edit) + new work_ident (linked to rev; not-live) + contributor stubs/links + new release_rev (linked to work_ident) + new release_ident (linked to rev; not-live) + contributor stubs/links + ref stubs/links + new file_rev + new file_ident + + set edit group state to "review" + + set edit group state to "accepted" + set all ident flags to "live" + + +To edit, eg, a contributor: + + new edit group (under account; wip) + new edit (under group) + + create contributor_rev row (and relationship rows) + + set edit group state to "review" + + set edit group state to "accepted" + point ident row to new rev + + +Accept edit group: + + for each edit: + update entity ident state (activate, redirect, delete) + ? mark revision/edit as immutable + ? append log/changelog row + update edit group state + +## Entity Schema + +Each entity type has tables: + + _rev + core representation of a version of the entity + + _ident + persistant, external identifier + allows merging, unmerging, stable cross-entity references + + _edit + represents change metadata for a single change to one ident + needed because an edit alwasy changes ident, but might not change rev + + _log + history of when edits were actually applied + allows fast lookups of history of an entity (ident) + unnecessary if we keep a log of edit group accepts? + punt on this for now + +## Entity States + + wip (not live; not redirect; has rev) + activate + active (live; not redirect; has rev) + redirect + delete + redirect (live; redirect; rev or not) + split + delete + deleted (live; not redirect; no rev) + redirect + activate + + "wip redirect" or "wip deleted" are invalid states + diff --git a/notes/libs.txt b/notes/libs.txt deleted file mode 100644 index ede10bdf..00000000 --- a/notes/libs.txt +++ /dev/null @@ -1,15 +0,0 @@ - -Python - flask - sqlalchemy - -Golang - sqlx (or xorm, or something to match rows to structs) - go-swagger - -Rust - diesel - -UI - tachyons - choo? diff --git a/notes/notes.txt b/notes/notes.txt deleted file mode 100644 index 4bfa3335..00000000 --- a/notes/notes.txt +++ /dev/null @@ -1,24 +0,0 @@ - -entity_id - uuid - revision - -entity_revision - entity_id - previous: entity_revision or none - state: normal, redirect, deletion - redirect_entity_id: optional - extra: json blob - edit_id - -edit - mutable: boolean - edit_group - editor - -edit_group - -editor - id - username - auth/email/etc diff --git a/notes/test_cases.txt b/notes/test_cases.txt deleted file mode 100644 index bc6ea64a..00000000 --- a/notes/test_cases.txt +++ /dev/null @@ -1,7 +0,0 @@ - -Many co-authors (group): - - "Precision measurement of the top-quark mass in lepton+jets final states" - https://arxiv.org/abs/1405.1756 - - diff --git a/notes/test_works.txt b/notes/test_works.txt new file mode 100644 index 00000000..bc6ea64a --- /dev/null +++ b/notes/test_works.txt @@ -0,0 +1,7 @@ + +Many co-authors (group): + + "Precision measurement of the top-quark mass in lepton+jets final states" + https://arxiv.org/abs/1405.1756 + + diff --git a/notes/webface_notes.txt b/notes/webface_notes.txt index 8ed47d0b..37a56c5c 100644 --- a/notes/webface_notes.txt +++ b/notes/webface_notes.txt @@ -1,4 +1,6 @@ +# CSS/JS Libraries + tachyons is nice for simple css-only stuff, but let's use "Semantic UI" because it has a bunch of javascript form stuff. @@ -6,3 +8,55 @@ it has a bunch of javascript form stuff. +# "Add Something" Workflow + +## Add a Work + +Title +Primary Type +Primary Creators/Authors +Description (not an abstract) +Primary/Original Language +Subject/Categorization/Tags +Is a Stub (unpublished/unreleased) + +## Release Information + +Contributors +Date +Container / Part-Of +Publisher +Identifiers +Language +Type / Media +Issue / Volume / Pages / Chapter + +## Anything Else? + +Known file / copy / url +Citations (outbound) + +# Queries / Searches / Views + +Views: work, release, creator, container, publisher + +Lookup by identifier + +# Other Workflows/Editors + +Single-creator-oriented helper to find works and disambiguate authorship + +Bulk author disambiguation helper (find other unresolved authors with same +alias text and select; drag works between columns) + +Bulk query-then-edit UI: search results in a table, edit like a spreadsheet, up +to... dozens? Query and then apply delta (eg, set topic)? Eg, author edits +basic metadata for all their citations all at once. + +Release editor + +Merge containers (and all related releases) +Merge entities (works, releases, etc) +Move release between works +Split entities (works, authors, etc), including linked stuff + -- cgit v1.2.3