Skip to content

copilot changes#1

Merged
art-test-stack merged 5 commits into
mainfrom
copilot-vibe-code
Mar 17, 2026
Merged

copilot changes#1
art-test-stack merged 5 commits into
mainfrom
copilot-vibe-code

Conversation

@art-test-stack
Copy link
Copy Markdown
Owner

cli exp separated + cli nice colors + extraction from multiple sources + pytest + graph + readme - all in one lol

…m multiple sources + pytest + graph + readme - all in one lol
@art-test-stack
Copy link
Copy Markdown
Owner Author

@copilot check lint failures

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

@art-test-stack I've opened a new pull request, #2, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR turns the repository into a structured Python package + CLI for managing a bibliography (CSV-backed), adding richer CLI UX (via rich), adding metadata extraction (arXiv/DOI/generic), adding BibTeX + citation-graph output, and introducing pytest + CI (tests + ruff lint/format) alongside expanded documentation.

Changes:

  • Refactors core functionality into pkg/mybib/* modules (storage/markdown/arxiv/metadata/bibtex/graph) and expands the CLI with multiple subcommands.
  • Adds a pytest suite, pytest config, and GitHub Actions workflows for tests/coverage + ruff lint/format enforcement.
  • Adds docs (README + claude docs) and vendors front-end assets under lib/.

Reviewed changes

Copilot reviewed 26 out of 29 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
tests/test_storage.py New storage tests (currently import-path issues + unused import).
tests/test_metadata.py New metadata tests (currently uses incorrect sys.path hack + unused import).
tests/test_markdown.py New markdown/util tests (currently uses invalid pkg.mybib imports).
tests/test_arxiv.py New arXiv tests (currently uses invalid pkg.mybib imports + patch targets).
tests/init.py Marks test package.
pytest.ini Pytest discovery/options config.
pyproject.toml Adds deps + dev extras + updates console script entry point.
pkg/mybib/init.py Exposes package entrypoint/version.
pkg/mybib/cli.py Expanded CLI with rich UX + bibtex/graph commands.
pkg/mybib/storage.py CSV storage + duplicate DOI detection + load helper.
pkg/mybib/markdown.py Markdown table generation + by-category output/footer.
pkg/mybib/utils.py Author-name formatting helper.
pkg/mybib/ui.py Rich-based UI helpers (progress/confirm/table/printing).
pkg/mybib/arxiv.py arXiv API metadata fetcher.
pkg/mybib/metadata.py Multi-source metadata routing + Crossref + generic HTML meta parsing.
pkg/mybib/bibtex.py BibTeX generation from DataFrame.
pkg/mybib/graph.py Crossref-based citation graph builder + pyvis HTML export.
pkg/mybib/main.py Removes old monolithic script.
README.md Major documentation expansion + usage/architecture.
.github/workflows/tests.yml CI: run pytest + coverage upload.
.github/workflows/lint.yml CI: ruff lint + ruff format check.
lib/tom-select/tom-select.css Vendored Tom Select CSS.
lib/tom-select/tom-select.complete.min.js Vendored Tom Select JS bundle.
lib/bindings/utils.js Front-end graph interaction utilities.
claude/TEST_README.md Test-suite documentation.
claude/CLI_IMPROVEMENTS.md CLI UX documentation.
claude/CITATION_GRAPH.md Citation graph feature documentation.

💡 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.

Comment thread tests/test_storage.py Outdated
Comment on lines +8 to +10
import sys

from pkg.mybib import storage
Comment thread tests/test_markdown.py Outdated
Comment on lines +8 to +9
from pkg.mybib import storage, markdown

Comment thread tests/test_markdown.py
Comment on lines +334 to +335
from pkg.mybib.utils import reform_names

Comment thread tests/test_markdown.py
Comment on lines +334 to +369
from pkg.mybib.utils import reform_names

result = reform_names("John Smith")
assert result == "Smith"

def test_reform_names_two_authors(self):
"""Test reformatting two authors."""
from pkg.mybib.utils import reform_names

result = reform_names("John Smith, Jane Doe")
assert result == "Smith and Doe"

def test_reform_names_three_authors(self):
"""Test reformatting three authors."""
from pkg.mybib.utils import reform_names

result = reform_names("John Smith, Jane Doe, Bob Johnson")
assert result == "Smith et al."

def test_reform_names_many_authors(self):
"""Test reformatting many authors."""
from pkg.mybib.utils import reform_names

result = reform_names("Alice A, Bob B, Charlie C, Diana D, Eve E")
assert result == "A et al."

def test_reform_names_with_middle_names(self):
"""Test reformatting with middle names."""
from pkg.mybib.utils import reform_names

result = reform_names("John Michael Smith, Jane Ellen Doe")
assert result == "Smith and Doe"

def test_reform_names_with_suffixes(self):
"""Test reformatting with name suffixes."""
from pkg.mybib.utils import reform_names
Comment thread tests/test_markdown.py
Comment on lines +334 to +369
from pkg.mybib.utils import reform_names

result = reform_names("John Smith")
assert result == "Smith"

def test_reform_names_two_authors(self):
"""Test reformatting two authors."""
from pkg.mybib.utils import reform_names

result = reform_names("John Smith, Jane Doe")
assert result == "Smith and Doe"

def test_reform_names_three_authors(self):
"""Test reformatting three authors."""
from pkg.mybib.utils import reform_names

result = reform_names("John Smith, Jane Doe, Bob Johnson")
assert result == "Smith et al."

def test_reform_names_many_authors(self):
"""Test reformatting many authors."""
from pkg.mybib.utils import reform_names

result = reform_names("Alice A, Bob B, Charlie C, Diana D, Eve E")
assert result == "A et al."

def test_reform_names_with_middle_names(self):
"""Test reformatting with middle names."""
from pkg.mybib.utils import reform_names

result = reform_names("John Michael Smith, Jane Ellen Doe")
assert result == "Smith and Doe"

def test_reform_names_with_suffixes(self):
"""Test reformatting with name suffixes."""
from pkg.mybib.utils import reform_names
Comment thread pkg/mybib/cli.py Outdated
Comment on lines +20 to +23
create_references_table,
)


Comment thread pkg/mybib/cli.py
Comment on lines +218 to +225
add_parser.add_argument("--title", required=True, help="Article title")
add_parser.add_argument("--authors", required=True, help="Comma-separated author names")
add_parser.add_argument("--journal", required=True, help="Journal or publication name")
add_parser.add_argument("--year", required=True, type=int, help="Publication year")
add_parser.add_argument("--doi", required=True, help="DOI identifier")
add_parser.add_argument("--link", help="URL link to the resource")
add_parser.add_argument("--category", help="Category for classification")
add_parser.add_argument(
Comment thread pkg/mybib/arxiv.py
SystemExit: If API call fails or no entry found
"""
url = f"http://export.arxiv.org/api/query?id_list={arxiv_id}"
response = requests.get(url)
Comment thread pyproject.toml
"networkx>=3.0",
"pyvis>=0.3.2",
"rich>=13.0.0",
"networks>=0.3.7",
Comment thread pkg/mybib/ui.py Outdated
Comment on lines +66 to +70
task_id = progress.add_task("[cyan]Fetching from API...", total=None)
try:
yield
finally:
progress.stop()
Copilot AI and others added 3 commits March 17, 2026 11:09
… unused vars, I001 import order

Co-authored-by: art-test-stack <110672812+art-test-stack@users.noreply.github.com>
Co-authored-by: art-test-stack <110672812+art-test-stack@users.noreply.github.com>
Fix ruff lint failures across pkg/ and tests/
@art-test-stack art-test-stack merged commit 009cd47 into main Mar 17, 2026
2 checks passed
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.

3 participants