Skip to content

Super Update - #56

Open
datalogism wants to merge 25 commits into
Wimmics:devfrom
datalogism:main
Open

datalogism wants to merge 25 commits into
Wimmics:devfrom
datalogism:main

Conversation

@datalogism

Copy link
Copy Markdown

Desktop app: a complete review workflow

  • Review steps:

    1. Overview;
    2. Explore;
    3. Configure;
    4. Collect, which becomes Extend once the review has papers;
    5. Eligibility criteria;
    6. Screen;
    7. Annotate;
    8. Consolidate;
    9. Enrich;
    10. Analyses;
    11. Export.

    A required ORCID iD. A one-file SciLEx.exe for Windows. The legacy web API and post-filter are removed.

  • Settings: API keys, collectors and NordVPN rotation are configured in the app.

  • New reviews can start from scratch, from a Zotero library or collection (one review, or one per
    collection), from a BibTeX file, or from a SciLEx knowledge graph.

  • Running jobs: independent jobs run together and only real conflicts are refused. A jobs button
    with a counter shows what is running, with progress and cancel.

Zotero

  • One global access key in the app settings; the user id is detected from the key.

  • One dedicated Zotero group per review, chosen among the groups the key reaches.

  • Zotero group page: group details (type, rights, papers, link) and the members of the review.

  • Two-way sync of papers, metadata, annotations and screening decisions.

  • Workflow tags:

    • ANNOT:<id>, ANNOT_VALID_BY:<id>;
    • DELETED_BY:<who> / DELETED_BY:filter:<cause>;
    • KEEP:<criterion>;
    • PAPER_TYPE:<type>.

    None of them count as annotation codes.

  • Members and annotators: assignments, validation, and an agreement study (Krippendorff's alpha, MASI).

Extending the corpus

  • Extend has one tab per method: New collect (add new papers only / re-aggregate), Snowballing,
    Keyword suggestions, BibTeX import, Zotero.
  • Each extension gets its own Zotero collection in the review's group (new or existing).
  • Consolidate deduplicates and filters the extended corpus.

Eligibility criteria (SLR protocol)

  • A criteria table: EC / IC / exceptions, with defaults C1 period, C2 coherence, C3 language,
    C4 access, C5 peer review, C6 DOI, C7 duplicates, C8 the quality filters of scilex.yml.
  • Each criterion is a testable rule. Applying the criteria tags excluded papers
    DELETED_BY:filter:<id> <cause>.
  • Exceptions: KEEP:<id> tags (one click in Screen and Explore), kept paper types, and papers
    included in Screen are never excluded.
  • Export of the criteria table as Markdown for the paper.

Enrichment

  • Sources: citations (Semantic Scholar, OpenCitations, Crossref, frozen Zotero snapshot) and
    per-paper citation metrics, plus Papers with Code, Crossref, Linked Papers With Code, ORKG and
    search keywords.
  • Paper types: every paper is classified Benchmark / Review or State of the art / Dataset /
    Model or Method, automatically after each collect, import or extension.
  • One paper at a time: enrichment from Explore.
  • Abstracts first: a warning appears when abstracts are missing before keyword enrichment, with a
    "Run Crossref first" button.
  • Fixes: the SQLite parameter-limit crash in abstract enrichment is fixed (with incremental saving
    and a year pre-filter).

Analysis and reporting

  • Overview:
    • a PRISMA flow (identification, extensions, filters and criteria, screening, inclusion,
      enrichments), exportable as SVG/PNG;
    • review provenance and annotation history;
    • charts per type and collection.
  • Analyses compare by paper type or Zotero collection on every tab:
    • Charts;
    • Graph ("Colour by", with a table of links inside and across groups);
    • Accessibility;
    • Annotations;
    • Summaries.
  • New Accessibility analysis: open (PDF) / open / restricted / unknown, and the rates of papers
    with a DOI, a code repository, citation data, and citations inside the corpus.
  • Paper details (badges, Zotero item links, annotations by dimension) in Explore and the citation
    network.
  • Workflow journal with a stable results folder and consistency checks.

Knowledge graph

  • Proposed a KG application profile for literature reviews:
    scilex-lpwc-ap. It is built on OpenCitations/SPAR
    and Linked Papers With Code. It maps a review's papers, citations and annotation codes to RDF
    (RML mapping, FnO functions, SPARQL UPDATE) and comes with SHACL shapes to validate the result.
  • Integrated in SciLEx:
    • the profile is pinned in scilex/kg/ap, refreshed with python -m scilex.kg.sync_profile, and
      adapted to each review: base IRI, source, coding dimensions;
    • rebuilding the profile's own sample reproduces its published graph triple for triple;
    • KG export from the app (CLI scilex-build-kg), checked with SHACL;
    • new reviews can be imported from a KG;
    • discarded papers and agreement copies are left out, and no API key is ever written in a graph.

Under the hood

  • Parsed files are cached until they change on disk, so cached reads are about 50× faster.
  • The test suite isolates the developer's home and passes on Windows.
  • The docs (guides, module pages, reference) are updated for the new steps.

datalogism and others added 25 commits November 10, 2026 15:10
The FastAPI/Streamlit web interface and the post-filter step are dropped in
favour of the desktop app; README, docs index and requirements follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VPN rotation configured from Configure (collect.vpn), per-review keys,
OpenAIRE token, settings schema and collector updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scilex.kg pins a copy of the profile (scilex/kg/ap, refreshed by
python -m scilex.kg.sync_profile, --local for a checkout), fills its
iteration-3 templates with a collection profile generated from the review's
annotation grid, and runs the mapping (morph-kgc, pyoxigraph) with SHACL
validation. bib2json is ported to bibtexparser 2. New command
scilex-build-kg and optional extra 'kg' (included in 'gui'; morph-kgc caps
rdflib below 7.3). Rebuilding the profile's four use cases gives the same
triple counts as the profile's own build. Provenance proposal in docs/kg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each review picks its own Zotero library (user or group) and a collection,
its sub-collections or the whole library (zotero_source.yml). Import as one
review with collections kept as sub-corpora, or one review per collection.
The push, Annotate and the knowledge graph use the review's choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enrichment is split from Analyses. Citations can come from OpenCitations or
Crossref directly; Crossref fills empty bibliographic fields, Linked Papers
With Code adds tasks, methods, datasets and repositories, ORKG adds research
fields and problems. Every source can be limited to the papers kept in Screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening a review shows a visual Overview (papers, collections, screening,
enrichment, annotation history from snapshots). Collect becomes Extend
collect once there are papers (add new papers only / re-aggregate
everything, Snowball, keyword suggestions). The app is locked until the
user sets a valid ORCID iD, written as the creator of knowledge graphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/build_exe_desktop.ps1 builds the desktop app as a single
self-contained SciLEx.exe (SCILEX_ONEFILE=1 in the PyInstaller spec),
runs its --self-test and copies it to the Desktop (or -Destination).
The folder build of scripts/build_gui.sh is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explore and Screen
- Explore step: filters, breakdown chart (click to filter) and the full
  notice of each paper.
- Screen filters: type, origin, import date, source, Zotero collection,
  search keywords, tags, LPWC tasks/datasets, ORKG problems/fields.
- paper_log.json: when and how each paper entered the review.

Extend and Enrich
- Add papers from a Zotero library or collection (optionally linking
  the review to it), or from a BibTeX file.
- "Search keywords" enrichment: Collect_KW / BK tags from the
  scilex.yml keywords found in titles and abstracts.

Consolidate
- Cross-source duplicates (DOI, title, fuzzy title), never grouped
  across sub-corpora by default, merged only when ticked, without
  contradictory annotation codes.
- scilex.yml filters applied to the merged corpus (imported papers
  spared by default); subcorpora.required with a Classify action that
  adds papers to their Zotero collection.

Zotero sync fixes
- link: no longer parses the plain-text library version as JSON; one
  item per row, preferring the required sub-corpora over import copies;
  sub-corpora taken from the items' collections.

Also includes the uncommitted review-step restructure it builds on
(Overview, Extend, run history, sync badge, KG import, ORCID).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zotero_citations reads the {'citing', 'cited'} child notes SciLEx wrote
in Zotero into zotero_citations.json and merges them into the caches the
graph reads (the snapshot wins), so the citation network no longer
depends on which API answers. citation_metrics computes citations,
references, citations per year, in-corpus degree, PageRank, quality and
venue rank, written as metric_* columns and DIMENSION:value tags.
Not wired in the UI yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each review records its actions in workflow.jsonl (append-only, agent =
ORCID, secrets masked; past reconstructed once from existing files).
review_state.yml records the results folder, kept on rename; a review
whose output/<name> is empty adopts the folder named after it.
Overview shows a History timeline and the issues found, with fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- review_tags: ANNOT:<id> (assigned), ANNOT_VALID_BY:<id> (validated
  against the grid), DELETED_BY:<who> (discarded, filter:<reason> for
  rules); <id> is an ORCID iD, else a Zotero user name.
- members: members.yml from the Zotero group (owner, admins, members,
  item editors), editable ORCIDs, balanced assignment (per sub-corpus,
  several annotators per paper) and progress per annotator.
- Annotate: Annotators card. Explore: workflow badge, "Validated by me"
  and "Discard" with the user's ORCID. Screen/Explore filters: status,
  assigned to, validated by; workflow tags left out of "Tags".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The journal now opens with a "created" event giving the origin of the
review (SciLEx collection with its query and config fingerprint, Zotero
import with library and collection, knowledge-graph or BibTeX import, or
empty), inferred for existing reviews. Every event names its agent
(ORCID iD and name; "unknown (before tracking)" when reconstructed).
Extensions and enrichments record mode or source, start and end, papers
before and after, columns written and papers updated. Imports, Zotero
link and pull, consolidation and KG export record the annotation state
and its change (ANNOT_VALID_BY validations counted apart), and Zotero
reads record which Zotero users created or modified items. The Overview
shows a Review card with origin, extensions, enrichments, annotation
growth and contributors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runner allowed one active job in the whole app, so a stuck
collection blocked enrichment, analyses and exports of every review.

Each job now declares the resources it uses, and starting it fails only
when an active job holds a conflicting one (the error names it):
- collect (exclusive): one collection at a time (shared APIs and VPN);
- results:<review> read / write / rows: readers never wait, column
  enrichers (write) run together, row-changing jobs (aggregate, extend,
  consolidate, imports, Zotero link/pull, snowball adding papers) are
  alone on that review's results;
- zotero:<library> (rows): writes to one Zotero library;
- job:<kind>:<review>: the same action twice on a review.

Enrichers no longer rewrite the whole results file: results_store
merges, under a per-file lock, only the cells (write_changes) or
columns (write_columns) a job changed into the current file, matching
rows by paper key and occurrence. Reads and writes of results files
take the same lock, and the atomic writer retries os.replace while a
reader holds the file (Windows).

Pages ask the runner which job would block their action; buttons and
the busy notice name it. BibTeX import and Zotero sync actions run as
awaited jobs. Log lines of anonymous pipeline threads go to the
collection, or to the only active job, not to every job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tag change no longer rewrites the whole results file, so an enricher
running on the same review keeps its work. Also fixes a shadowed
variable that passed a tag string instead of the table to the writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n Enrich

- DELETED_BY papers are left out of every analysis reading the results
  (charts, graph, tags analysis, citations, PwC, Crossref, LPWC, ORKG,
  search keywords, metrics) and of the Overview / journal counts, which
  now also count validated (ANNOT_VALID_BY), assigned and discarded papers.
- Consolidate: new default action "Discard" writing
  DELETED_BY:filter:<reason>; discarded papers are not listed again.
- Enrich: Citations source "Zotero snapshot" (frozen citation notes) and
  a "Citation metrics" tab (metric_* columns and CITATIONS / PAGERANK /
  QUALITY ... tags, written as cell changes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tests/conftest.py: an autouse fixture points HOME, USERPROFILE,
  APPDATA, LOCALAPPDATA and XDG_CONFIG_HOME at a temporary folder, unsets
  SCILEX_KEYS / SCILEX_CONFIG and hides the package's legacy
  api.config.yml, so no test reads the real keys, reviews or profile.
- Fixtures setting HOME also set USERPROFILE ("~" on Windows).
- Paths compared as Path objects; POSIX permission checks skipped on
  Windows; the two Extend tests follow the ⑤ Extend step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- annotation_agreement: MASI distance, Krippendorff's alpha over
  multi-label values, per dimension, reading levels, merge proposals
  (agreed / majority / disputed).
- agreement service: one blind copy per annotator in
  agreement/<annotator> (AGREEMENT_COPY:<key> + ANNOT:<id>), read back,
  alpha per dimension, agreed codes written on the reference items.
  Copies are skipped as papers by zotero_library.fetch_papers.
- Annotate: Agreement study card. User guide: annotators, workflow tags
  and agreement study.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entries whose Zotero tags hold DELETED_BY: or AGREEMENT_COPY: are removed
from the BibLaTeX export before the scilex-lpwc-ap mapping (other entries
kept byte for byte), and agreement/<annotator> collections are no longer
exported as sub-corpora.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workflow (ANNOT, ANNOT_VALID_BY, DELETED_BY, AGREEMENT_COPY), screening
(SCREEN) and citation metric tags join the automation tags, so grid
deduction, tag analysis, the Overview counts and the knowledge graph no
longer take them for dimensions. Profile terms proposed in
docs/kg/provenance-proposal.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
except InvalidOrcidError as exc:
error.text = str(exc)
return
ui.navigate.to("/")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on macOS (uv run scilex-gui, native window): on first launch, clicking Save on the ORCID form appears to do nothing. The profile is written (~/Library/Application Support/scilex/user.yml holds the iD and name), but the form stays on screen until the app is restarted.

Likely cause: the form is rendered by require_orcid in place of the page at /, so ui.navigate.to("/") targets the current path and ui.sub_pages doesn't re-render. Suggested fix:

Suggested change
ui.navigate.to("/")
ui.navigate.reload()

@BenjaminNavet

Copy link
Copy Markdown
Collaborator

I tested this PR end to end in the app (real OpenAlex + arXiv collection, 528 papers): every step works through Export.

The fixes are in datalogism#9, each with a regression test (2342 tests pass, ruff clean):

  • the ORCID form stayed displayed after Save;
  • a new review was credited to "unknown", and its first collection was counted as an extension;
  • Explore froze the app on first launch (matplotlib imported on the event loop);
  • the duplicate removal compared DOIs with case, so one paper stayed twice;
  • PAPER_TYPE: tags counted as annotation codes;
  • an empty review could not start from a BibTeX file.

I couldn't push to this branch directly (403 even with "allow edits" on), so merging #9 into your main will update this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants