feat: Initial project setup, assets, and dev notes#4
Conversation
This commit introduces the initial project structure, including: - Project assets (images) - Development notes for review and PyPI preparation - Updates to `.gitignore` - Removal of `.env.sample` - Addition of `pyproject.toml` and `uv.lock` for dependency management - Updates to `PullPal.py` and `header.md` with minor adjustments.
Reviewer's GuideThe PR establishes the initial project scaffolding: it refreshes UI elements, tunes core defaults, configures packaging and VCS settings, and adds developer-centric documentation and lock files. Class Diagram: Updates to PullPal.py ModuleclassDiagram
direction LR
class PullPalModule {
<<Module>>
+DEFAULT_REPO_OWNER: string = "therealfredp3d"
+DEFAULT_REPO_NAME: string = "pullpal"
+display_loading_bar(duration: int = 2, width: int = 80) None
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hello @TheRealFREDP3D, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello! gemini-code-assist here, providing a summary of this pull request. This PR, titled "feat: Initial project setup, assets, and dev notes", focuses on establishing the foundational structure for the PullPal project. It includes adding initial project assets (images), incorporating development notes covering a project review and PyPI preparation steps, updating the .gitignore file, removing an old .env.sample, and introducing modern Python dependency management with pyproject.toml and uv.lock. Additionally, minor adjustments were made to the main PullPal.py script and the header.md file.
Highlights
- Project Structure & Assets: The PR lays down the initial directory structure and includes necessary project assets.
- Development Notes Added: Two new markdown files (
Full-review.mdandPypi-prepare-plan.md) are added under a_DEV_NOTESdirectory, providing a detailed project review and a plan for publishing to PyPI. - Dependency Management Setup: Introduces
pyproject.tomlfor standard project metadata and build configuration (PEP 517/518) anduv.lockfor locked dependencies using theuvtool. - .gitignore Updates: Adds
/PullPal.code-workspaceto the.gitignorefile to prevent committing IDE workspace settings. - Minor Code Adjustments: Updates default repository details and loading bar parameters in
PullPal.pyand replaces the ASCII art inheader.md.
Changelog
Click here to see the changelog
- .gitignore
- Added
/PullPal.code-workspaceto ignore IDE workspace settings.
- Added
- _DEV_NOTES/Full-review.md
- Added a new file containing a comprehensive review of the PullPal project.
- Includes sections on project overview, strengths, areas for improvement (packaging, testing, CI/CD, error handling, docs, robustness, versioning), and a suggested roadmap.
- _DEV_NOTES/Pypi-prepare-plan.md
- Added a new file outlining a step-by-step plan for publishing PullPal to PyPI.
- Includes checks for name availability, updating
setup.py, creating a PyPI account, installingtwine, building the package, uploading, and verification. - Contains a mermaid diagram visualizing the publishing process.
- _DEV_NOTES/pypi-publishing.md
- Added a new file providing a detailed step-by-step guide for publishing to PyPI.
- Covers project structure, creating
pyproject.toml, adding__init__.py, building withpython -m build, uploading withtwine, and testing the installation. - Includes optional steps for using TestPyPI and extra tips for automation and version management.
- pullpal/PullPal.py
- Changed
DEFAULT_REPO_OWNERfrom "octocat" to "therealfredp3d" (L47). - Changed
DEFAULT_REPO_NAMEfrom "hello-world" to "pullpal" (L48). - Adjusted
display_loading_bardefault duration from 5 to 2 seconds and width from 50 to 80 (L73).
- Changed
- pullpal/header.md
- Replaced the existing ASCII art header with a new one.
- pyproject.toml
- Added a new file for project configuration and build system.
- Defines project name, version, description, readme, license, Python requirements, authors, dependencies (
typer[all],requests,rich,python-dotenv), script entry point, and homepage URL.
- uv.lock
- Added a new file containing locked versions and hashes for all project dependencies, generated by
uv.
- Added a new file containing locked versions and hashes for all project dependencies, generated by
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces foundational project setup elements, including assets, development notes, and pyproject.toml for modern dependency management. This is a great step forward! I've reviewed the changes and have a few suggestions.
Summary of Findings
- Entry Point Configuration: There's a mismatch in the defined entry point between
pyproject.toml(pullpal.main:app) and the existing script structure (pullpal.PullPal:main). This could lead to the installed CLI not functioning correctly. This is a high severity issue. - Python Version Consistency:
pyproject.tomlspecifiesrequires-python = ">=3.8"whilesetup.pymentions>=3.6. Clarifying the supported Python versions and ensuring consistency is advisable. - Development Notes Consistency: Minor inconsistencies in build commands and main script references were found in the development notes. Aligning these would improve clarity.
- Redundant Dependency (Low Severity - Not commented in-line): In
pyproject.toml,richis listed as a dependency, buttyper[all]already includesrich. This is a minor redundancy.
Merge Readiness
This PR makes good progress on project setup. However, due to the high-severity issue regarding the entry point configuration in pyproject.toml (which could affect the tool's installability and functionality), I recommend addressing this and the medium-severity consistency points before merging. Once these are clarified and potentially adjusted, the PR will be in a much stronger position. As an AI, I am not authorized to approve pull requests; please ensure further review and approval from team members.
| [project.scripts] | ||
| pullpal = "pullpal.main:app" |
There was a problem hiding this comment.
The [project.scripts] is set to pullpal = "pullpal.main:app". However, the current executable script is pullpal/PullPal.py which contains a main() function and uses argparse. The existing setup.py also points to pullpal.PullPal:main. If pullpal/main.py with a Typer app isn't being introduced, the CLI packaged with this pyproject.toml might not work as expected. Should this be pullpal = "pullpal.PullPal:main" to match the current structure, or is a refactor to use pullpal.main:app planned?
Resolving the entry point is crucial for the package to be installable and executable correctly.
| 2. **Update `setup.py` with correct information:** Verify that the `setup.py` file contains accurate information, including the project name, version, author, email, description, and dependencies. The version should follow semantic versioning. | ||
| 3. **Create a PyPI account (if needed):** If you don't already have a PyPI account, you will need to create one at [https://pypi.org/account/register/](https://pypi.org/account/register/). | ||
| 4. **Install `twine`:** Twine is a tool for securely uploading packages to PyPI. It can be installed using pip: `pip install twine` | ||
| 5. **Build the distribution package:** Use the `python setup.py sdist bdist_wheel` command to build the source distribution and wheel package. |
There was a problem hiding this comment.
The build command python setup.py sdist bdist_wheel is an older method. Since pyproject.toml is being introduced with a build backend, should python -m build be used instead for consistency? This is also recommended in _DEV_NOTES/pypi-publishing.md.
| 5. **Build the distribution package:** Use the `python setup.py sdist bdist_wheel` command to build the source distribution and wheel package. | |
| 5. **Build the distribution package:** Use the `python -m build` command to build the source distribution and wheel package. |
| pullpal/ | ||
| ├── pullpal/ # Your actual package code | ||
| │ ├── __init__.py | ||
| │ └── main.py |
There was a problem hiding this comment.
This is a helpful guide! There's a slight inconsistency regarding the main script file and entry point.
This note (and line 60) refers to pullpal/main.py and the entry point pullpal.main:app. However, the current primary script is pullpal/PullPal.py (with a main() function), and the existing setup.py points to pullpal.PullPal:main.
Is pullpal/main.py a new file to be introduced, or should the entry point in pyproject.toml and these notes reflect the existing pullpal.PullPal:main for now? Aligning these will prevent confusion during packaging.
| description = "PullPal - GitHub PR Suggestion Archivist CLI Tool" | ||
| readme = "README.md" | ||
| license = {file = "LICENSE"} | ||
| requires-python = ">=3.8" |
There was a problem hiding this comment.
There was a problem hiding this comment.
Hey @TheRealFREDP3D - I've reviewed your changes - here's some feedback:
- Consider moving the
_DEV_NOTES/folder out of the main package or explicitly excluding it from yourpyproject.tomlto avoid shipping internal planning docs with the release. - Avoid hard-coding
DEFAULT_REPO_OWNERandDEFAULT_REPO_NAME—pull them from CLI arguments, environment variables, or your project metadata for greater flexibility. - The loading bar’s fixed width of 80 may overflow small terminals—cap it to the current terminal width or make the bar size configurable.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| license = {file = "LICENSE"} | ||
| requires-python = ">=3.8" | ||
| authors = [{name = "Frederick Pellerin", email = "[email protected]"}] | ||
| dependencies = ["typer[all]", "requests", "rich", "python-dotenv"] |
There was a problem hiding this comment.
suggestion: Specify version ranges for dependencies
Adding minimum version constraints (e.g., requests>=2.25) helps avoid issues from incompatible upstream changes.
| dependencies = ["typer[all]", "requests", "rich", "python-dotenv"] | |
| dependencies = [ | |
| "typer[all]>=0.7.0", | |
| "requests>=2.25.0", | |
| "rich>=10.0.0", | |
| "python-dotenv>=0.19.0" | |
| ] |
| 4. **Environment variable support for GitHub tokens** | ||
| `.env` and CLI override options ensures flexibility and security. |
There was a problem hiding this comment.
issue (typo): Grammatical error: 'ensures' should be 'ensure'.
Since 'options' is plural, use 'ensure' instead of 'ensures'.
| 4. **Environment variable support for GitHub tokens** | |
| `.env` and CLI override options ensures flexibility and security. | |
| 4. **Environment variable support for GitHub tokens** | |
| `.env` and CLI override options ensure flexibility and security. |
This commit introduces the initial project structure, including:
.gitignore.env.samplepyproject.tomlanduv.lockfor dependency managementPullPal.pyandheader.mdwith minor adjustments.Summary by Sourcery
Set up the initial project skeleton with dependency management, developer notes, and minor CLI refinements.
Enhancements:
Build:
Documentation:
Chores: