feat(scholar): Citation graph visualization + Flask GUI + API cleanup#163
Merged
ywatanabe1989 merged 11 commits intomainfrom Feb 18, 2026
Merged
feat(scholar): Citation graph visualization + Flask GUI + API cleanup#163ywatanabe1989 merged 11 commits intomainfrom
ywatanabe1989 merged 11 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use XARRAY_AVAILABLE flag pattern (consistent with TORCH_AVAILABLE, CATBOOST_AVAILABLE, etc.) to avoid ModuleNotFoundError when xarray is not installed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t-local symlinks, and normalized search filenames
- SearchQueryParser.from_shell_syntax(): parses -t/-a/-j/-ymin/-ymax/-cmin/-cmax/-ifmin/-ifmax operators
- scitex.scholar.filters: apply_filters() for plain-dict paper filtering (no Django ORM)
- normalize_search_filename(): timestamped YYYYMMDD-HHMMSS-keyword-keyword.bib naming
- LibraryManager.project_dir: mirrors paper symlinks into {project_dir}/scitex/scholar/library/{project}/
- SymlinkHandlersMixin._create_project_local_symlink(): absolute-path symlinks in project tree
- scitex.writer: re-export export module from scitex_writer
- fix: metadata_engines/utils broken import scitex.scholar.utils → scitex.scholar._utils
- fix: test__describe.py stat names nanmean/nanstd → mean/std/median
- fix: pre-commit config empty YAML → repos: []
- tests: 42 tests for normalize_search_filename and _create_project_local_symlink (42/42 pass)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_key, sanitize_filename Three new public helpers extracted from scitex-cloud to scitex.scholar as single source of truth: - paper_from_search_result(result): normalises raw search-API dicts (handles externalUrl, snippet aliases) - make_citation_key(last_name, year): citation key generation from author/year components - sanitize_filename(filename, max_length=50): safe download filename generation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix circular import: import ScholarConfig before Scholar/Paper/Papers (ScholarPDFDownloader imports ScholarConfig from scitex.scholar) - Remove ensure_workspace from delattr list (function same name as module) - Hide local_dbs exports with underscore prefix (_crossref_scitex, _openalex_scitex) - Use delattr loop to remove leaked submodule attributes from namespace - Power-user classes accessible but excluded from __all__ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Read papers directly from Zotero's SQLite database without API key. Auto-detects Linux (~/Zotero/) and Windows WSL (/mnt/c/Users/*/Zotero/) installations. Reuses existing ZoteroMapper for data conversion. - ZoteroLocalReader: read_all(), read_by_tags(), read_by_collection() - export_for_zotero(): write BibTeX/RIS for Zotero > File > Import - Batch SQL queries (4 queries total, no N+1) - 16 tests, all passing against actual ~/Zotero/zotero.sqlite Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add to_networkx() to CitationGraph model and create visualization.py with 4 backends (figrecipe > scitex.plt > matplotlib > pyvis) using _XXX_AVAILABLE flags for graceful degradation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hide power-user classes and internal helpers via __getattr__ with backward compatibility. Expose CitationGraphBuilder and plot_citation_graph. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ported from scitex-cloud's scholar_app to standalone Flask app. Includes force-directed SVG graph visualization, dark theme, 4 API endpoints, and CLI command (scitex scholar gui). Library, Search, and Enrichment tabs are placeholders for future phases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_XXX_AVAILABLEflags for graceful degradation. Addedto_networkx()to CitationGraph model.scitex scholar guicommand launches interactive web app with Citation Graph tab (force-directed SVG). Ported from scitex-cloud's scholar_app. Library/Search/Enrichment tabs as placeholders.__getattr__with backward compatibility.list_collections()andlist_tags()methods.Test plan
scitex scholar gui --helpshows optionsscitex scholar list-python-apisshows 14 clean public namesscitex scholar mcp list-tools -vshows 22 tools (consistent with main command)🤖 Generated with Claude Code