many updates -> copilot/IMPROVEMENTS_SUMMARY.md#3
Conversation
|
@copilot solve conflicts by prefering lastest commits. Most of conflicts appears as they were done first to clean lint |
|
@art-test-stack I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
This PR expands the bibliography manager with Google Scholar ingestion, category ID management, and an initial SQLAlchemy-backed storage path, while also updating CSV storage/markdown output to preserve ArxivID as a string and adjusting tests/docs accordingly.
Changes:
- Add Google Scholar (SerpAPI) search + interactive confirmation flow and wire it into the CLI (
add-scholar, enhancedadd). - Extend CSV schema with an
ArxivIDcolumn (string-preserved) and addscholar_id/arxiv_idplumbing. - Introduce a SQLAlchemy ORM + DB migration/export commands, plus extensive documentation updates.
Reviewed changes
Copilot reviewed 24 out of 28 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_storage.py |
Updates storage tests for ArxivID and scholar_id DOI fallback; improves temp file handling. |
tests/test_metadata.py |
Adds temp-dir/file fixtures (currently unused by tests). |
tests/test_markdown.py |
Updates temp CSV fixture to use a temp directory. |
tests/test_arxiv.py |
Adds temp-dir/file fixtures and asserts returned arxiv_id. |
tests/README.md |
Adds a short test-suite overview and commands. |
test_output.md |
Adds a sample/generated markdown output table including ArxivID. |
references.md |
Adds a large generated references markdown file with category tables + footer refs. |
pyproject.toml |
Removes networks dependency; keeps script entrypoint formatting. |
pkg/mybib/utils.py |
Updates author display formatting (et al. + team name handling). |
pkg/mybib/ui.py |
Changes confirmation default behavior (Enter defaults to “yes”). |
pkg/mybib/storage.py |
Adds ArxivID column handling and scholar_id DOI fallback in CSV storage. |
pkg/mybib/scholar.py |
New: SerpAPI Google Scholar search + metadata extraction + confirmation flow. |
pkg/mybib/models.py |
New: SQLAlchemy ORM models + engine/session helpers. |
pkg/mybib/markdown.py |
Ensures ArxivID stays string-y for markdown display. |
pkg/mybib/db_storage.py |
New: database adapter + CSV migration/export routines + CLI support. |
pkg/mybib/cli.py |
Adds add-scholar, category prompting, and DB init/migrate/export commands. |
pkg/mybib/categories.py |
New: persistent ID→name category mapping in categories.json. |
pkg/mybib/arxiv.py |
Adds arxiv_id to returned metadata dict. |
copilot/TEST_README.md |
New internal doc describing tests and how to run them. |
copilot/QUICKSTART.md |
New quickstart for Scholar integration. |
copilot/IMPROVEMENTS_SUMMARY.md |
New summary doc for the changes and claimed fixes. |
copilot/IMPLEMENTATION_SUMMARY.md |
New technical implementation notes for Scholar integration. |
copilot/GOOGLE_SCHOLAR_README.md |
New end-user documentation for Scholar integration. |
copilot/FILES_MODIFIED.md |
New index of changed/created files. |
copilot/CLI_IMPROVEMENTS.md |
New doc describing CLI UX enhancements. |
copilot/CITATION_GRAPH.md |
New doc describing the citation graph feature. |
README.md |
Updates install/usage docs + adds v2.0 improvements, DB commands, and project structure. |
.gitignore |
Ignores .env, categories.json, and *.bib outputs. |
Comments suppressed due to low confidence (1)
pkg/mybib/ui.py:83
- Changing
confirm_action()to default to confirmation on Enter (default=True) makes add/migrate/export flows much easier to accept accidentally, since most call sites don’t pass an explicit default. If these prompts are meant to guard potentially-destructive actions, consider keeping the default asFalse(explicit opt-in) and only usingdefault=Truefor low-risk prompts.
def confirm_action(prompt: str, default: bool = True) -> bool:
"""Show a confirmation prompt with rich styling.
Args:
prompt: The question to ask
default: Default response if user just presses enter (default: True)
Returns:
True if confirmed, False otherwise
"""
return Confirm.ask(prompt, default=default, console=console)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| from sqlalchemy import ( | ||
| create_engine, | ||
| Column, | ||
| Integer, | ||
| String, | ||
| Float, | ||
| DateTime, | ||
| ForeignKey, | ||
| Index, | ||
| ) |
| # Use scholar_id as DOI fallback if DOI not provided | ||
| final_doi = doi if doi else scholar_id | ||
|
|
||
| new_reference = { | ||
| "Title": title, | ||
| "Authors": authors, | ||
| "Journal": journal, | ||
| "Year": year, | ||
| "DOI": doi, | ||
| "DOI": final_doi, |
|
|
||
| ### 3. Activate Virtual Environment | ||
| ```bash | ||
| cd /Users/arthurtestard/MyBible |
| import json | ||
| from typing import Optional, Dict, List | ||
| from urllib.parse import urlencode |
| @@ -11,7 +11,6 @@ dependencies = [ | |||
| "networkx>=3.0", | |||
| "pyvis>=0.3.2", | |||
| "rich>=13.0.0", | |||
| - `pytest`: Testing framework | ||
| - `pytest-cov`: Code coverage reporting | ||
|
|
||
| [!Note] |
| - Expand test coverage | ||
| - Report bugs or suggest improvements | ||
|
|
||
| ## Aknowledgements |
| """Category management for bibliography.""" | ||
|
|
||
| import json | ||
| from pathlib import Path |
| reference = Reference( | ||
| title=title, | ||
| authors=authors, | ||
| journal=journal, | ||
| year=year, | ||
| doi=doi or scholar_id, # Use scholar_id as DOI fallback | ||
| link=link, | ||
| arxiv_id=arxiv_id, | ||
| scholar_id=scholar_id, | ||
| category_id=category.id if category else None, |
| - Combines your info with Scholar search | ||
| - More targeted results | ||
| - Still asks for confirmation |
…applied Co-authored-by: art-test-stack <110672812+art-test-stack@users.noreply.github.com>
Resolve copilot-vibe-code → main conflicts, preferring latest commits with lint fixes
No description provided.