Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ruvnet authored May 25, 2024
1 parent 034140c commit adfd69e
Show file tree
Hide file tree
Showing 9 changed files with 521 additions and 13 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python package

on: [push]

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 flake8 pytest
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 .
- name: Test with pytest
run: |
pytest
100 changes: 87 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# pipackager
```
___ _____ ___ _
/ _ \\_ \/ _ \__ _ ___| | ____ _ __ _ ___ _ __
/ /_)/ / /\/ /_)/ _` |/ __| |/ / _` |/ _` |/ _ | '__|
/ ___/\/ /_/ ___| (_| | (__| | (_| | (_| | __| |
\/ \____/\/ \__,_|\___|_|\_\__,_|\__, |\___|_|
|___/
Created by rUv
```

pipackager is a tool to manage your PyPI package, including cleaning old distributions, building new ones, uploading to PyPI, version incrementing, and more.

`pipackager` is a comprehensive tool designed to manage your PyPI package, simplifying tasks such as cleaning old distributions, building new ones, uploading to PyPI, version incrementing, and more.

## Installation

To install `pipackager`, use pip:

```bash
pip install pipackager
```
Expand All @@ -16,20 +28,82 @@ You can start the tool by running:
pipackager
```

This will launch an interactive menu that allows you to manage your PyPI packages with ease.

## Features

- Clean old distributions
- Build new distributions
- Upload distributions to PyPI
- Increment version number (patch, minor, major)
- Advanced options:
- Create/update GitHub Actions workflow
- Run tests using Pytest
- Lint and format code
- Check and update dependencies
- Generate start command
- Help overview
### Main Features

1. **Clean Old Distributions**:
- Removes old distribution files from the `dist` directory.

2. **Build New Distributions**:
- Builds new distribution files (source and wheel) using `setuptools`.

3. **Upload Distributions to PyPI**:
- Uploads the built distributions to PyPI using `twine`.

4. **Increment Version Number**:
- **Patch**: Increments the patch version number (e.g., 0.1.0 -> 0.1.1).
- **Minor**: Increments the minor version number (e.g., 0.1.0 -> 0.2.0).
- **Major**: Increments the major version number (e.g., 0.1.0 -> 1.0.0).

5. **Help Overview**:
- Provides an overview of the features and options of the tool.

### Advanced Options

1. **Create/Update GitHub Actions Workflow**:
- Creates or updates a GitHub Actions workflow configuration file to automate build, test, and deployment processes.

2. **Run Tests Using Pytest**:
- Executes tests using `pytest` to ensure your package is working as expected.

3. **Lint and Format Code**:
- Lints your code using `flake8` and formats it using `black`.

4. **Check and Update Dependencies**:
- Checks for outdated dependencies and updates them to the latest versions.

5. **Generate Start Command**:
- Generates a start command for your library, allowing you to execute it easily from the command line.

### Environment Variables

`pipackager` requires the following environment variables for uploading distributions to PyPI:

- `TWINE_USERNAME`: Your PyPI username.
- `TWINE_PASSWORD`: Your PyPI password or token.

If these variables are not set, `pipackager` will prompt you to enter them and will export them for you.

## Example Workflow

Here is an example workflow of using `pipackager` to manage your PyPI package:

1. **Clean Old Distributions**:
- Select option `1` to remove old distribution files.

2. **Build New Distributions**:
- Select option `2` to build new distribution files.

3. **Increment Version Number**:
- Select option `4`, `5`, or `6` to increment the version number (patch, minor, or major).

4. **Upload Distributions to PyPI**:
- Select option `3` to upload the new distribution files to PyPI.

5. **Advanced Options**:
- Select option `7` to access advanced options such as creating/updating GitHub workflows, running tests, linting and formatting code, checking and updating dependencies, or generating a start command.

## Help

To view a detailed help overview, select option `8` from the main menu.

## License

This project is licensed under the Apache License 2.0.
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.

---

`pipackager` is designed to streamline the process of managing and deploying your Python packages to PyPI, making it easier to maintain high-quality, well-tested, and properly versioned software.
Empty file modified init.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions pipackager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pipackager/__init__.py
Loading

0 comments on commit adfd69e

Please sign in to comment.