From 55a1ed03af3b8326a1e29cccc23f4422cf85f8ac Mon Sep 17 00:00:00 2001 From: Luke Baumann Date: Fri, 18 Oct 2024 23:01:21 +0000 Subject: [PATCH] Preparing for releasing on PyPI. * Adding a changelog * Minor formatting change to the readme * Converted from setup.py to pyproject.toml --- CHANGELOG.md | 34 +++++++++++++++++++++++++++++ README.md | 8 +++++-- pyproject.toml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 32 ---------------------------- 4 files changed, 98 insertions(+), 34 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7ecdf72 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# Changelog + + + +## [Unreleased] +* Updated `setup.py` to `pyproject.toml` +* Added this changelog + +## [0.0.6] - 2024-10-10 +* Decreased logging severity for most logs +* Persistence enabled +* General argument type fixes + +[Unreleased]: https://github.com/AI-Hypercomputer/pathways-utils/compare/v0.0.6...HEAD + diff --git a/README.md b/README.md index 3784424..2836c07 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ -Package of Pathways-on-Cloud utilities +# Package of Pathways-on-Cloud utilities -For customers to utilize Pathways-on-Cloud, there are several in changes that need to be made to the user job. We want to encapsulate these changes to a single Python package for two primary reasons. First, most of the changes are temporary patches that will not be needed long-term. Second, several of the changes follow anti-patterns and we want to confine them to a single repository. +For customers to utilize Pathways-on-Cloud, there are several changes needed by +the user job. We encapsulate these changes in a single Python package for two +primary reasons. First, some of the changes are temporary patches that will not +be needed long-term. Second, several of the changes follow anti-patterns and +are now confined to a single repository. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c9eec9c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,58 @@ +[project] +# Project metadata. Available keys are documented at: +# https://packaging.python.org/en/latest/specifications/declaring-project-metadata +name = "pathwaysutils" +readme = "README.md" +requires-python = ">=3.10" +license = {file = "LICENSE"} +authors = [{name = "Pathways-on-Cloud Utilities Developers", email="pathwaysutils-dev@google.com"}] +classifiers = [ # List of https://pypi.org/classifiers/ + "License :: OSI Approved :: Apache Software License", +] +keywords = [] + +dependencies = [ + "absl-py", + "fastapi", + "google-cloud-logging", + "jax>=0.4.26", + "orbax-checkpoint", + "uvicorn", +] + +# `version` is automatically set by flit to use `my_project.__version__` +# `description` is automatically set by flit to use `my_project.__doc__` +dynamic = ["version", "description"] + +[project.urls] +homepage = "https://github.com/AI-Hypercomputer/pathways-utils" +repository = "https://github.com/AI-Hypercomputer/pathways-utils" +changelog = "https://github.com/AI-Hypercomputer/pathways-utils/blob/main/CHANGELOG.md" +# documentation = "" + +[project.optional-dependencies] +# Development deps (unittest, linting, formating,...) +# Installed through `pip install -e .[dev]` +dev = [ + "pytest", + "pytest-xdist", + "pylint>=2.6.0", + "pyink", +] + +[tool.pyink] +# Formatting configuration to follow Google style-guide +line-length = 80 +unstable = true +pyink-indentation = 2 +pyink-use-majority-quotes = true + +[build-system] +requires = ["flit_core >=3.8,<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.sdist] +exclude = [ + "**/*_test.py", +] + diff --git a/setup.py b/setup.py deleted file mode 100644 index 0045994..0000000 --- a/setup.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Setup file for pathwaysutils.""" - -import setuptools - -setuptools.setup( - name='pathwaysutils', - version='0.0.6', - description='Pathways-on-Cloud utilities', - packages=setuptools.find_packages(), # Automatically find packages - # Add any dependencies your package needs here: - install_requires=[ - 'google-cloud-logging', - 'jax[cpu]>=0.4.26', - 'absl-py', - 'orbax-checkpoint', - 'uvicorn', - 'fastapi', - ], -)