Skip to content

Commit

Permalink
Added github action for pypi publishing. Modified pypi page attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchMedeiros committed Jul 31, 2024
1 parent d1ee590 commit f2513f7
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 15 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Python Package

on:
push:
tags:
- 'v*.*.*'

jobs:
publish:
if: github.repository_owner == 'MitchMedeiros' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
name: Upload release to PyPI

permissions:
id-token: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch twine
- name: Build package
run: hatch build

- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*
11 changes: 11 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## v1.0.1 (2024-07-31)

[GitHub release](https://github.com/MitchMedeiros/MLCompare/tag/v1.0.1)

- Updated the project versioning to dynamically use the version in mlcompare/__init__.py
- Modified the package attributes displayed on PyPi including adding links to documentation
- Added the link to the documentation to the library __init__
- Created a GitHub action for publishing newly tagged versions to PyPi

## v1.0.0 (2024-07-31)

[GitHub release](https://github.com/MitchMedeiros/MLCompare/tag/v1.0.0)

Initial Release
8 changes: 4 additions & 4 deletions mlcompare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
from .params_reader import ParamsReader
from .pipelines import data_exploration_pipeline, full_pipeline

__version__ = "1.0.0"
__version__ = "1.0.1"
__title__ = "MLCompare"
__author__ = "Mitchell Medeiros"
__license__ = "MIT"
__description__ = (
"Quickly compare machine learning models from different libraries across datasets."
)
__docformat__ = "restructuredtext"
__docs_url__ = ""
__github_url__ = "https://github.com/MitchMedeiros/mlcompare"
__github_issues_url__ = "https://github.com/MitchMedeiros/mlcompare/issues"
__docs_url__ = "https://mlcompare.readthedocs.io/en/latest/api_reference"
__github_url__ = "https://github.com/MitchMedeiros/MLCompare"
__github_issues_url__ = "https://github.com/MitchMedeiros/MLCompare/issues"
__doc__ = f"""
MLCompare is a Python library for running comparison pipelines, focused on being straight-forward and
flexible. It supports multiple popular ML libraries, can perform dataset retrieval, processing, and
Expand Down
30 changes: 19 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ build-backend = "hatchling.build"

[project]
name = "mlcompare"
version = "1.0.0"
requires-python = ">=3.10"
description = "Quickly compare machine learning models across libraries and datasets."
readme = "README.md"
license = {file = "LICENSE.txt"}
authors = [{name = "Mitchell Medeiros"}]
license = "MIT"
requires-python = ">=3.10"
readme = "README.md"
classifiers = [
"License :: OSI Approved :: MIT License",
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Typing :: Typed',
'Operating System :: POSIX',
"License :: OSI Approved :: MIT License",
'Operating System :: Unix',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Typing :: Typed',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
]
dependencies = [
"numpy>=1.23.5,<2.0.0", # for OpenML & Tensorflow compatability
Expand All @@ -41,6 +41,7 @@ dependencies = [
"torch>=2.0.0",
# "tensorflow>=2.0.0",
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
Expand All @@ -65,11 +66,18 @@ docs = [
]

[project.urls]
"Homepage" = "https://github.com/MitchMedeiros/mlcompare"
Homepage = "https://github.com/MitchMedeiros/mlcompare"
Documentation = "https://mlcompare.readthedocs.io/en/latest/api_reference"
Source = "https://github.com/MitchMedeiros/mlcompare"
Changelog = "https://mlcompare.readthedocs.io/en/latest/release_notes"

[tool.hatch.build.targets.wheel]
packages = ["mlcompare"]

[tool.hatch.version]
path = "mlcompare/__init__.py"
pattern = "^__version__ = ['\"](?P<version>[^'\"]*)['\"]"

[tool.pytest.ini_options]
testpaths = "tests"
xfail_strict = true
Expand Down

0 comments on commit f2513f7

Please sign in to comment.