Skip to content

Merge pephubclient into peppy#509

Merged
khoroshevskyi merged 138 commits intodev_claudefrom
dev_merge_pephubclient
Dec 15, 2025
Merged

Merge pephubclient into peppy#509
khoroshevskyi merged 138 commits intodev_claudefrom
dev_merge_pephubclient

Conversation

@ClaudeHu
Copy link
Collaborator

@ClaudeHu ClaudeHu commented Dec 3, 2025

Major changes:

  1. Pephubclient is incorporated (with git history of code)
  2. CLI: from argparser to typer

Copy link

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 merges the pephubclient package into peppy and migrates the CLI from argparser to typer. The integration incorporates the full pephubclient codebase with git history, adds new pephubclient modules to the peppy package structure, and modernizes the CLI interface using typer for both the main peppy CLI and the eido subcommand.

Key Changes:

  • Incorporated pephubclient code into peppy.pephubclient module with OAuth, helpers, models, and client modules
  • Migrated CLI from argparse to typer for improved user experience and help documentation
  • Removed deprecated argparser.py file and replaced with cli.py using typer
  • Updated package configuration to include new pephubclient subpackages

Reviewed changes

Copilot reviewed 41 out of 45 changed files in this pull request and generated 36 comments.

Show a summary per file
File Description
tests/phctests/test_pephubclient.py Added comprehensive tests for PEPHubClient with parameterized error scenarios; contains typos and test logic issues
tests/phctests/test_manual.py Manual integration tests for views and samples operations (marked as skipped)
tests/phctests/conftest.py Test fixtures for JWT tokens and sample PEP data
peppy/pephubclient/pephubclient.py Main PEPHubClient class implementing login, pull, push, and project operations; contains type and documentation issues
peppy/pephubclient/pephub_oauth/pephub_oauth.py OAuth authentication flow for PEPhub device code authorization; contains spelling and documentation errors
peppy/pephubclient/helpers.py Request management and message handling utilities; contains security issue with SSL verification disabled
peppy/pephubclient/modules/sample.py Sample CRUD operations module for PEPhub projects
peppy/pephubclient/modules/view.py View management module for PEPhub project views
peppy/cli.py New typer-based CLI replacing argparse implementation
peppy/eido/cli.py Migrated eido subcommands to typer
setup.py Updated to include pephubclient subpackages in distribution
requirements/requirements-all.txt Added pephubclient dependencies; contains leftover external dependency that should be removed
requirements/requirements-test.txt Added test dependencies for pephubclient testing
Comments suppressed due to low confidence (2)

tests/phctests/test_pephubclient.py:258

  • Comparison of identical values; use cmath.isnan() if testing for not-a-number.
    tests/phctests/test_pephubclient.py:453
  • Comparison of identical values; use cmath.isnan() if testing for not-a-number.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if sample_name:
try:
sample_name = int(sample_name)
except ValueError:
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
except ValueError:
except ValueError:
# If sample_name is not an integer, keep it as a string (some sample names may be non-numeric)

Copilot uses AI. Check for mistakes.
ClaudeHu and others added 2 commits December 10, 2025 12:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@khoroshevskyi khoroshevskyi left a comment

Choose a reason for hiding this comment

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

LGTM

There is a lot of files, for now I will just merge everything, and do better review in next PR, where phc and eido are combinied

Comment on lines +45 to +48
"peppy.eido",
"peppy.pephubclient",
"peppy.pephubclient.pephub_oauth",
"peppy.pephubclient.modules",
Copy link
Member

Choose a reason for hiding this comment

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

I think you don't have to add here anything, it can be just package name

importlib-metadata; python_version < '3.10'
jsonschema>=3.0.1 No newline at end of file
jsonschema>=3.0.1
# pephubclient
Copy link
Member

Choose a reason for hiding this comment

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

you can delete commented things

@khoroshevskyi khoroshevskyi merged commit 2c3025f into dev_claude Dec 15, 2025
1 check passed
@khoroshevskyi khoroshevskyi deleted the dev_merge_pephubclient branch December 15, 2025 19:26
@github-project-automation github-project-automation bot moved this to Done in PEP Dec 15, 2025
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.

4 participants