From 01cea97466c3c6c46805f74ba73d4e11c3ce16fc Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Tue, 28 May 2024 07:25:50 -0700 Subject: [PATCH] Add long description to setup.py - Exclude GitHub specifics - Use absolute paths in README.md PiperOrigin-RevId: 637891868 Change-Id: I450cd723414aa0faf0c7913036497748a7a97492 --- README.md | 2 ++ setup.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index d0fe4187..5703dba0 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ *A library for generative social simulation* + [![Python](https://img.shields.io/pypi/pyversions/gdm-concordia.svg)](https://pypi.python.org/pypi/gdm-concordia) [![PyPI version](https://img.shields.io/pypi/v/gdm-concordia.svg)](https://pypi.python.org/pypi/gdm-concordia) [![PyPI tests](../../actions/workflows/pypi-test.yml/badge.svg)](../../actions/workflows/pypi-test.yml) [![Tests](../../actions/workflows/test-concordia.yml/badge.svg)](../../actions/workflows/test-concordia.yml) [![Examples](../../actions/workflows/test-examples.yml/badge.svg)](../../actions/workflows/test-examples.yml) + [Concordia Tech Report](https://arxiv.org/abs/2312.03664) diff --git a/setup.py b/setup.py index 39438562..0b6ea3b3 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,20 @@ import setuptools + +def _remove_excluded(description: str) -> str: + description, *sections = description.split('') + for section in sections: + excluded, included = section.split('') + del excluded + description += included + return description + + +with open('README.md') as f: + LONG_DESCRIPTION = _remove_excluded(f.read()) + + setuptools.setup( name='gdm-concordia', version='1.5.0', @@ -29,6 +43,9 @@ description=( 'A library for building a generative model of social interacions.' ), + description_content_type='text/plain', + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', keywords=( 'multi-agent agent-based-simulation generative-agents python' ' machine-learning'