versionhawk


Nameversionhawk JSON
Version 0.5 PyPI version JSON
download
home_pageNone
SummaryπŸ¦… Version Hawk by Andrew A Levin
upload_time2024-10-27 17:11:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords versionhawk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# πŸ¦… Version Hawk

Version Hawk is a command-line tool for managing and generating version tags for Python packages on PyPI and GitHub repositories. It allows you to retrieve existing version tags from both platforms and generate new version numbers based on your project's release history.

## Features

- **Retrieve Versions from PyPI**: Get all version tags for a specified PyPI package.
- **Retrieve Releases from GitHub**: Fetch release tags from a GitHub repository.
- **Generate New Version Tags**: Automatically generate a new version tag based on existing versions.
- **Flexible Input**: Accepts various input formats including:
  - URLs for GitHub repositories (e.g., `https://github.com/username/repo`)
  - URLs for PyPI packages (e.g., `https://pypi.org/project/package`)
  - GitHub owner/repo format (e.g., `username/repo`)
  - Direct package names (e.g., `package`)

## Installation

To use Version Hawk, you need to have Python 3.6 or higher. You can clone the repository and install the required dependencies using `pip`:

```bash
git clone https://github.com/yourusername/versionhawk.git
cd versionhawk
pip install -r requirements.txt
```


## Usage

Run the tool from the command line:

```bash
python version_hawk.py <input>
```


Input Options

	β€’	GitHub Repository URL:
	β€’	Example: https://github.com/psf/requests
	β€’	PyPI Package URL:
	β€’	Example: https://pypi.org/project/requests/
	β€’	Owner/Repo Format:
	β€’	Example: psf/requests
	β€’	Direct Package Name:
	β€’	Example: requests

Listing Versions

To list all versions of a package or releases of a repository, use the --versions flag:

```bash
python version_hawk.py <input> --versions
```

## Example

```bash
# Get all versions from PyPI for the 'requests' package
python version_hawk.py requests --versions

# Get all releases from GitHub for the 'psf/requests' repository
python version_hawk.py psf/requests --versions

# Generate a new version based on existing tags
python version_hawk.py https://github.com/psf/requests
```

## Testing

You can run the unit tests to ensure that everything is working correctly. Make sure you have unittest available, then execute:


```bash
python -m unittest discover tests
```

### Contributing

Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.

### License

This project is licensed under the MIT License. See the LICENSE file for details.

### Acknowledgements

	β€’	Requests for HTTP requests.
	β€’	argparse for command-line argument parsing.
	β€’	packaging for version parsing.


### Key Sections Explained

1. **Features**: Outlines what the tool can do.
2. **Installation**: Provides steps to set up the project.
3. **Usage**: Explains how to run the tool and its input options.
4. **Example**: Shows practical usage examples.
5. **Testing**: Instructions for running unit tests.
6. **Contributing**: Encourages community contributions.
7. **License**: Mentions the license type.

Feel free to modify any part of the README to better fit your project! If you have additional features or sections to add, let me know!





VersionHawk is a tool for managing the versions of Python packages based on semantic versioning and the current date. It automatically suggests a new version tag if previous ones are already taken and allows you to fetch a list of all existing versions of a package.

## ✨ Features

	β€’	Generate a new version: Suggests a unique version tag based on the current date and time.
	β€’	View all versions: Optionally fetches a list of all existing versions of a package on PyPI.
	β€’	User-friendly command-line interface: Easily run it from the terminal.

## πŸ”§ Installation

You can install VersionHawk using pip:


pip install versionhawk

## πŸš€ Usage

Once installed, you can run VersionHawk through the versionhawk command in your terminal.

## πŸ†• Generate a New Version

To generate a new version for a package on PyPI, use the following command:


versionhawk <package_name>

Example:

versionhawk requests

## πŸ“„ View All Versions

To fetch a list of all existing versions of a package on PyPI, use the --versions flag:

versionhawk <package_name> --versions

Example:

versionhawk requests --versions

## βš™οΈ How It Works

VersionHawk uses the current date and time to suggest a new version. It checks the following patterns in order:

	β€’	Year.Month (e.g., 2024.10)
	β€’	Year.Month.Week Number in Month (e.g., 2024.10.3)
	β€’	Year.Month.Day (e.g., 2024.10.22)
	β€’	Year.Month.Day.Hour (e.g., 2024.10.22.20)
	β€’	Year.Month.Day.Hour.Minutes (e.g., 2024.10.22.20.01)
	β€’	Year.Month.Day.Hour.Minutes.Seconds (e.g., 2024.10.22.20.01.30)

VersionHawk checks these patterns against existing versions and suggests the first available unique tag.

## πŸ’‘ Example Usage

Let’s say the current date is 2024-10-22 20:01, and the requests package already has versions up to 2024.10.22.20.01. VersionHawk will suggest the next available version, such as 2024.10.22.20.01.30, if earlier versions are taken.

## πŸ“¦ Dependencies

VersionHawk requires the following dependencies to work:

	β€’	requests β€” to fetch version information from PyPI.
	β€’	packaging β€” to correctly sort versions.

These dependencies are automatically installed when you install VersionHawk.

## πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for more details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "versionhawk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "\"A. Great Maintainer\" <maintainer@example.com>",
    "keywords": "versionhawk",
    "author": null,
    "author_email": "Andrew Levin <author@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/78/48/edfa3d901e58a38bd4602306cfa255ec02af03d1e0142c6a0e8bda9ede74/versionhawk-0.5.tar.gz",
    "platform": null,
    "description": "\n\n# \ud83e\udd85 Version Hawk\n\nVersion Hawk is a command-line tool for managing and generating version tags for Python packages on PyPI and GitHub repositories. It allows you to retrieve existing version tags from both platforms and generate new version numbers based on your project's release history.\n\n## Features\n\n- **Retrieve Versions from PyPI**: Get all version tags for a specified PyPI package.\n- **Retrieve Releases from GitHub**: Fetch release tags from a GitHub repository.\n- **Generate New Version Tags**: Automatically generate a new version tag based on existing versions.\n- **Flexible Input**: Accepts various input formats including:\n  - URLs for GitHub repositories (e.g., `https://github.com/username/repo`)\n  - URLs for PyPI packages (e.g., `https://pypi.org/project/package`)\n  - GitHub owner/repo format (e.g., `username/repo`)\n  - Direct package names (e.g., `package`)\n\n## Installation\n\nTo use Version Hawk, you need to have Python 3.6 or higher. You can clone the repository and install the required dependencies using `pip`:\n\n```bash\ngit clone https://github.com/yourusername/versionhawk.git\ncd versionhawk\npip install -r requirements.txt\n```\n\n\n## Usage\n\nRun the tool from the command line:\n\n```bash\npython version_hawk.py <input>\n```\n\n\nInput Options\n\n\t\u2022\tGitHub Repository URL:\n\t\u2022\tExample: https://github.com/psf/requests\n\t\u2022\tPyPI Package URL:\n\t\u2022\tExample: https://pypi.org/project/requests/\n\t\u2022\tOwner/Repo Format:\n\t\u2022\tExample: psf/requests\n\t\u2022\tDirect Package Name:\n\t\u2022\tExample: requests\n\nListing Versions\n\nTo list all versions of a package or releases of a repository, use the --versions flag:\n\n```bash\npython version_hawk.py <input> --versions\n```\n\n## Example\n\n```bash\n# Get all versions from PyPI for the 'requests' package\npython version_hawk.py requests --versions\n\n# Get all releases from GitHub for the 'psf/requests' repository\npython version_hawk.py psf/requests --versions\n\n# Generate a new version based on existing tags\npython version_hawk.py https://github.com/psf/requests\n```\n\n## Testing\n\nYou can run the unit tests to ensure that everything is working correctly. Make sure you have unittest available, then execute:\n\n\n```bash\npython -m unittest discover tests\n```\n\n### Contributing\n\nContributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.\n\n### License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n### Acknowledgements\n\n\t\u2022\tRequests for HTTP requests.\n\t\u2022\targparse for command-line argument parsing.\n\t\u2022\tpackaging for version parsing.\n\n\n### Key Sections Explained\n\n1. **Features**: Outlines what the tool can do.\n2. **Installation**: Provides steps to set up the project.\n3. **Usage**: Explains how to run the tool and its input options.\n4. **Example**: Shows practical usage examples.\n5. **Testing**: Instructions for running unit tests.\n6. **Contributing**: Encourages community contributions.\n7. **License**: Mentions the license type.\n\nFeel free to modify any part of the README to better fit your project! If you have additional features or sections to add, let me know!\n\n\n\n\n\nVersionHawk is a tool for managing the versions of Python packages based on semantic versioning and the current date. It automatically suggests a new version tag if previous ones are already taken and allows you to fetch a list of all existing versions of a package.\n\n## \u2728 Features\n\n\t\u2022\tGenerate a new version: Suggests a unique version tag based on the current date and time.\n\t\u2022\tView all versions: Optionally fetches a list of all existing versions of a package on PyPI.\n\t\u2022\tUser-friendly command-line interface: Easily run it from the terminal.\n\n## \ud83d\udd27 Installation\n\nYou can install VersionHawk using pip:\n\n\npip install versionhawk\n\n## \ud83d\ude80 Usage\n\nOnce installed, you can run VersionHawk through the versionhawk command in your terminal.\n\n## \ud83c\udd95 Generate a New Version\n\nTo generate a new version for a package on PyPI, use the following command:\n\n\nversionhawk <package_name>\n\nExample:\n\nversionhawk requests\n\n## \ud83d\udcc4 View All Versions\n\nTo fetch a list of all existing versions of a package on PyPI, use the --versions flag:\n\nversionhawk <package_name> --versions\n\nExample:\n\nversionhawk requests --versions\n\n## \u2699\ufe0f How It Works\n\nVersionHawk uses the current date and time to suggest a new version. It checks the following patterns in order:\n\n\t\u2022\tYear.Month (e.g., 2024.10)\n\t\u2022\tYear.Month.Week Number in Month (e.g., 2024.10.3)\n\t\u2022\tYear.Month.Day (e.g., 2024.10.22)\n\t\u2022\tYear.Month.Day.Hour (e.g., 2024.10.22.20)\n\t\u2022\tYear.Month.Day.Hour.Minutes (e.g., 2024.10.22.20.01)\n\t\u2022\tYear.Month.Day.Hour.Minutes.Seconds (e.g., 2024.10.22.20.01.30)\n\nVersionHawk checks these patterns against existing versions and suggests the first available unique tag.\n\n## \ud83d\udca1 Example Usage\n\nLet\u2019s say the current date is 2024-10-22 20:01, and the requests package already has versions up to 2024.10.22.20.01. VersionHawk will suggest the next available version, such as 2024.10.22.20.01.30, if earlier versions are taken.\n\n## \ud83d\udce6 Dependencies\n\nVersionHawk requires the following dependencies to work:\n\n\t\u2022\trequests \u2014 to fetch version information from PyPI.\n\t\u2022\tpackaging \u2014 to correctly sort versions.\n\nThese dependencies are automatically installed when you install VersionHawk.\n\n## \ud83d\udcdc License\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\ud83e\udd85 Version Hawk by Andrew A Levin",
    "version": "0.5",
    "project_urls": {
        "Bug Reports": "https://github.com/andrewalevin",
        "Funding": "https://donate.pypi.org",
        "Homepage": "https://github.com/andrewalevin",
        "Say Thanks!": "https://github.com/andrewalevin",
        "Source": "https://github.com/andrewalevin"
    },
    "split_keywords": [
        "versionhawk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4ca96b0ee2f6bd28e2d6aa993d9f61493c50d9051fe74c23086e66ba240ec09",
                "md5": "c74a53bc3169f07731f6045c95a78c5c",
                "sha256": "110f1838d03d19b15ef4e18014bd48c6f1ddf2e75cce21dbd45580dad5751840"
            },
            "downloads": -1,
            "filename": "versionhawk-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c74a53bc3169f07731f6045c95a78c5c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5127,
            "upload_time": "2024-10-27T17:11:53",
            "upload_time_iso_8601": "2024-10-27T17:11:53.697599Z",
            "url": "https://files.pythonhosted.org/packages/f4/ca/96b0ee2f6bd28e2d6aa993d9f61493c50d9051fe74c23086e66ba240ec09/versionhawk-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7848edfa3d901e58a38bd4602306cfa255ec02af03d1e0142c6a0e8bda9ede74",
                "md5": "a6f3093a81410314a0002e61c85933e0",
                "sha256": "28369914ca65e570c744879678bb145af803495f3f1e18eb1d3e121c4262111d"
            },
            "downloads": -1,
            "filename": "versionhawk-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "a6f3093a81410314a0002e61c85933e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5708,
            "upload_time": "2024-10-27T17:11:54",
            "upload_time_iso_8601": "2024-10-27T17:11:54.720416Z",
            "url": "https://files.pythonhosted.org/packages/78/48/edfa3d901e58a38bd4602306cfa255ec02af03d1e0142c6a0e8bda9ede74/versionhawk-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 17:11:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "versionhawk"
}
        
Elapsed time: 2.24167s