diff --git a/gemma/__init__.py b/gemma/__init__.py index e4502bd..a58f9e8 100644 --- a/gemma/__init__.py +++ b/gemma/__init__.py @@ -26,3 +26,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================ + +"""gemma API.""" + +# A new PyPI release will be pushed every time `__version__` is increased. +# When changing this, also update the CHANGELOG.md. +__version__ = '1.0.0' diff --git a/pyproject.toml b/pyproject.toml index 0998a95..c12aafc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,37 +1,80 @@ -[tool.poetry] +[project] +# Project metadata. Available keys are documented at: +# https://packaging.python.org/en/latest/specifications/declaring-project-metadata name = "gemma" -version = "1.0.0" description = "Open weights large language model (LLM) from Google DeepMind." +readme = "README.md" +requires-python = ">=3.10" +license = {file = "LICENSE"} authors = [ - "Alek Andreev ", - "Armand Joulin ", - "Cassidy Hardin ", - "Juliette Love ", - "Kathleen Kenealy ", - "Laurent Sifre ", - "Léonard Hussenot ", - "Michelle Casbon ", - "Mihir Sanjay Kale ", - "Morgane Riviere ", - "Ravin Kumar ", - "Robert Dadashi ", - "Shreya Pathak ", - "Surya Bhupatiraju ", - "Thomas Mesnard " + {name = "Alek Andreev", email="alekandreev@google.com"}, + {name = "Armand Joulin", email="ajoulin@google.com"}, + {name = "Cassidy Hardin", email="cassidyhardin@google.com"}, + {name = "Juliette Love", email="juliettelove@google.com"}, + {name = "Kathleen Kenealy", email="kkenealy@google.com"}, + {name = "Laurent Sifre", email="sifre@google.com"}, + {name = "Léonard Hussenot", email="hussenot@google.com"}, + {name = "Michelle Casbon", email="michellecasbon@google.com"}, + {name = "Mihir Sanjay Kale", email="mihirkale@google.com"}, + {name = "Morgane Riviere", email="mriviere@google.com"}, + {name = "Ravin Kumar", email="ravink@google.com"}, + {name = "Robert Dadashi", email="dadashi@google.com"}, + {name = "Shreya Pathak", email="shreyapa@google.com"}, + {name = "Surya Bhupatiraju", email="sbhupatiraju@google.com"}, + {name = "Thomas Mesnard", email="mesnard@google.com"}, +] +classifiers = [ # List of https://pypi.org/classifiers/ + "License :: OSI Approved :: Apache Software License", + "Intended Audience :: Science/Research", +] +keywords = [] + +# pip dependencies of the project +# Installed locally with `pip install -e .` +dependencies = [ + "absl-py", + "sentencepiece", + "flax", ] -python-version = "3.10" -license = "Apache-2.0" -readme = "README.md" -[tool.poetry.dependencies] -absl-py = "^2.1.0" -sentencepiece = "^0.1.99" -flax = ">=0.8" -pytest = {version = "^8.0.0", optional = true} +# `version` is automatically set by flit to use `gemma.__version__` +dynamic = ["version"] -[tool.poetry.extras] -test = ["pytest"] +[project.urls] +homepage = "https://github.com/google-deepmind/gemma" +repository = "https://github.com/google-deepmind/gemma" +changelog = "https://github.com/google-deepmind/gemma/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 = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +# Build system specify which backend is used to build/install the project (flit, +# poetry, setuptools,...). All backends are supported by `pip install` +requires = ["flit_core >=3.8,<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.sdist] +# Flit specific options (files to exclude from the PyPI package). +# If using another build backend (setuptools, poetry), you can remove this +# section. +exclude = [ + # Do not release tests files on PyPI + "**/*_test.py", + "testdata/**", +]