38 Commits

Author SHA1 Message Date
pacnpal
e79e8d8d6d Merge pull request #4 from pacnpal/copilot/fix-ci-failure-issues 2026-01-23 07:02:19 -05:00
copilot-swe-agent[bot]
d088f2d9a9 Add coverage files to .gitignore and remove from tracking
Co-authored-by: pacnpal <183241239+pacnpal@users.noreply.github.com>
2026-01-23 12:01:05 +00:00
copilot-swe-agent[bot]
a1b8fd3055 Fix CI failure: Add package installation before running tests in publish.yml
Co-authored-by: pacnpal <183241239+pacnpal@users.noreply.github.com>
2026-01-23 12:00:48 +00:00
copilot-swe-agent[bot]
cdffda544b Initial plan 2026-01-23 11:58:50 +00:00
pacnpal
7290b58a10 Create release notes for version 0.2.6 2026-01-23 06:52:26 -05:00
pacnpal
270ef2417d Creating Release 0.2.6 2026-01-23 06:52:11 -05:00
pacnpal
337067f51b Create release notes for version 0.2.6 2026-01-23 06:51:53 -05:00
pacnpal
96f0dd9d31 Merge pull request #3 from pacnpal/copilot/increment-version-python-3-14 2026-01-23 06:48:30 -05:00
copilot-swe-agent[bot]
d928e7e0bd Increment version to 0.2.6 for Python 3.14 support
Co-authored-by: pacnpal <183241239+pacnpal@users.noreply.github.com>
2026-01-23 11:46:08 +00:00
copilot-swe-agent[bot]
44b9779ecf Initial plan 2026-01-23 11:44:02 +00:00
pacnpal
b1aebf2fc6 Merge pull request #2 from pacnpal/copilot/test-against-latest-python-versions 2026-01-23 06:41:32 -05:00
copilot-swe-agent[bot]
20075475fe Add Python 3.14 testing support to CI and setup.py
Co-authored-by: pacnpal <183241239+pacnpal@users.noreply.github.com>
2026-01-23 11:39:48 +00:00
copilot-swe-agent[bot]
b4bf6e48df Initial plan 2026-01-23 11:37:18 +00:00
pacnpal
24fa3971bf Update claude-review.yml 2024-12-10 18:58:44 -05:00
pacnpal
7ee17f6479 bump 2024-12-10 18:53:57 -05:00
pacnpal
330bc93df6 Update 2024-12-10 18:52:44 -05:00
pacnpal
7712950aed Update and rename cr.yml to claude-review.yml 2024-12-10 14:52:48 -05:00
pacnpal
40b618f97f Update cr.yml 2024-12-10 14:41:57 -05:00
pacnpal
6f125da2cb Update cr.yml 2024-12-10 14:40:57 -05:00
pacnpal
228ff8aae9 Create cr.yml 2024-12-10 14:39:47 -05:00
deepsource-io[bot]
99cfafa3fa ci: add .deepsource.toml 2024-12-10 19:24:42 +00:00
pacnpal
ee077907e8 Update README.md 2024-12-10 14:03:56 -05:00
pacnpal
141c6c8294 Update python-multiversion.yml 2024-12-10 14:02:21 -05:00
pacnpal
d780ea9092 Update setup.py 2024-12-10 14:01:56 -05:00
pacnpal
a81a56a55a Update setup.py 2024-12-10 14:00:04 -05:00
pacnpal
6019d260fc Update python-multiversion.yml 2024-12-10 13:59:51 -05:00
pacnpal
5672586ce0 Update setup.py 2024-12-10 13:58:21 -05:00
pacnpal
e046250444 Update python-multiversion.yml 2024-12-10 13:57:04 -05:00
pacnpal
78e4b463f9 Create python-multiversion.yml 2024-12-10 13:56:13 -05:00
pacnpal
08be12c63e Update README.md
Add codecov badge
2024-12-10 13:52:40 -05:00
pacnpal
ec082f4174 Update python-tests.yml 2024-12-10 13:50:40 -05:00
pacnpal
fd44299f11 Fix tests 2024-12-10 13:33:54 -05:00
pacnpal
5047dc8093 pytests added 2024-12-10 13:30:16 -05:00
pacnpal
7092c203f9 Create codecov.yml 2024-12-10 13:25:41 -05:00
pacnpal
7292393eec Update publish.yml 2024-12-10 13:24:41 -05:00
PacNPal
af517b1283 Fixed details in README 2024-11-19 09:56:38 -05:00
PacNPal
e821ca9ec4 docs: add virtual environment and pipx installation notes
- Add recommendation to install within virtual environment
- Include pipx installation option for global use
- Improve installation section organization
2024-11-19 09:53:06 -05:00
PacNPal
854c784eab docs: add virtual environment and pipx installation notes
- Add recommendation to install within virtual environment
- Include pipx installation option for global use
- Improve installation section organization
2024-11-19 09:52:33 -05:00
12 changed files with 225 additions and 26 deletions

7
.deepsource.toml Normal file
View File

@@ -0,0 +1,7 @@
version = 1
[[analyzers]]
name = "python"
[analyzers.meta]
runtime_version = "3.x.x"

34
.github/workflows/claude-review.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Claude Code Review
permissions:
contents: read
pull-requests: write
on:
# Run on new/updated PRs
pull_request:
types: [opened, reopened, synchronize]
# Allow manual triggers for existing PRs
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request Number'
required: true
type: string
jobs:
code-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Claude Review
uses: pacnpal/claude-code-review@v1.0.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }}
pr-number: ${{ github.event.pull_request.number || inputs.pr_number }}

View File

@@ -25,6 +25,15 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build
- name: Run Pytest tests
run: |
pip install .
pip install pytest pytest-cov
pytest --cov --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build package
run: python -m build

View File

@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python test for 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest

37
.github/workflows/python-tests.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Python pytest and upload to Codecov
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest pytest-cov
- name: Run coverage & upload to Codecov
run: |
pytest --cov --cov-report=xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run pytest tests
run: |
pytest --cov --junitxml=junit.xml -o junit_family=legacy
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

5
.gitignore vendored
View File

@@ -34,3 +34,8 @@ env/
# OS
.DS_Store
Thumbs.db
# Coverage
.coverage
coverage.xml
htmlcov/

View File

@@ -2,7 +2,9 @@
A command-line tool that combines package installation and requirements.txt management. Install, update, or remove Python packages and their dependencies with automatic requirements.txt handling.
Compatible with Python 3.11, 3.12, and 3.13.
Compatible with Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14.
[![codecov](https://codecov.io/gh/pacnpal/pip-add/graph/badge.svg?token=ATTR6TXNUL)](https://codecov.io/gh/pacnpal/pip-add)
## Features
@@ -16,11 +18,17 @@ Compatible with Python 3.11, 3.12, and 3.13.
- Creates requirements.txt if it doesn't exist
- Support for custom requirements file paths
- Smart detection of multiple requirements files
- Full support for Python 3.11, 3.12, and 3.13
- Full support for Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14
## Installation
It's recommended to install pip-add within a virtual environment to avoid conflicts with system packages:
```bash
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install from PyPI
pip install pip-add
@@ -28,9 +36,16 @@ pip install pip-add
pip install --upgrade pip-add
```
For global installation (use with caution), you can install with pipx:
```bash
# Install globally using pipx
pipx install pip-add
```
## Usage
### Installation
### Package Installation
```bash
# Basic package installation
@@ -120,7 +135,7 @@ pip-add -r -f requirements/dev.txt requests
## Command Line Options
```
```bash
pip-add [-h] [-d] [-e] [-r] [-f REQUIREMENTS_FILE] package
positional arguments:
@@ -177,33 +192,19 @@ The tool is designed to safely handle dependencies:
## Requirements
- Python 3.11, 3.12, or 3.13
- Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, or 3.14
- pip
- setuptools
## Development
### Local Setup
```bash
# Clone the repository
git clone https://github.com/PacNPal/pip-add.git
cd pip-add
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install in development mode
pip install -e .
```
## Common Scenarios
### New Project
```bash
# First time setup
pip-add flask
# Creates requirements.txt and adds Flask
pip-add -d flask
# Creates requirements.txt and adds Flask with dependencies

3
RELEASE_NOTES.md Normal file
View File

@@ -0,0 +1,3 @@
### Release 0.2.6
Support for Python 3.14 included in this release.

View File

@@ -1,5 +1,5 @@
from .cli import main
from .utils import find_requirements, add_to_requirements
__version__ = "0.1.0"
__version__ = "0.2.6"
__all__ = ['main', 'find_requirements', 'add_to_requirements']

View File

@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="pip-add",
version="0.2.3",
version="0.2.6",
packages=find_packages(),
install_requires=[
"pip",
@@ -15,7 +15,7 @@ setup(
},
author="PacNPal",
author_email="pac@pacnp.al",
description="A modern Python package manager that combines pip install with requirements.txt management. Supports Python 3.11, 3.12, and 3.13.",
description="A modern Python package manager that combines pip install with requirements.txt management. Supports Python 3.8-3.14.",
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
url="https://github.com/PacNPal/pip-add",
@@ -29,9 +29,13 @@ setup(
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Installation/Setup",
@@ -39,5 +43,5 @@ setup(
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
],
python_requires=">=3.11",
python_requires=">=3.8",
)

48
tests/test_cli.py Normal file
View File

@@ -0,0 +1,48 @@
import pytest
from pip_add.cli import (
find_requirements,
get_package_dependencies,
find_dependent_packages,
analyze_dependencies,
remove_from_requirements,
add_to_requirements,
install_package,
uninstall_packages,
main
)
def test_find_requirements():
# Add test cases for find_requirements
pass
def test_get_package_dependencies():
# Add test cases for get_package_dependencies
pass
def test_find_dependent_packages():
# Add test cases for find_dependent_packages
pass
def test_analyze_dependencies():
# Add test cases for analyze_dependencies
pass
def test_remove_from_requirements():
# Add test cases for remove_from_requirements
pass
def test_add_to_requirements():
# Add test cases for add_to_requirements
pass
def test_install_package():
# Add test cases for install_package
pass
def test_uninstall_packages():
# Add test cases for uninstall_packages
pass
def test_main():
# Add test cases for main
pass

10
tests/test_utils.py Normal file
View File

@@ -0,0 +1,10 @@
import pytest
from pip_add.utils import find_requirements, add_to_requirements
def test_find_requirements():
# Add test cases for find_requirements
pass
def test_add_to_requirements():
# Add test cases for add_to_requirements
pass