Skip to content

Commit

Permalink
Add long description to setup.py
Browse files Browse the repository at this point in the history
- Exclude GitHub specifics
- Use absolute paths in README.md

PiperOrigin-RevId: 637891868
Change-Id: I450cd723414aa0faf0c7913036497748a7a97492
  • Loading branch information
jagapiou authored and copybara-github committed May 28, 2024
1 parent d0cf839 commit 01cea97
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

*A library for generative social simulation*

<!-- GITHUB -->
[![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)
<!-- /GITHUB -->

[Concordia Tech Report](https://arxiv.org/abs/2312.03664)

Expand Down
17 changes: 17 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@

import setuptools


def _remove_excluded(description: str) -> str:
description, *sections = description.split('<!-- GITHUB -->')
for section in sections:
excluded, included = section.split('<!-- /GITHUB -->')
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',
Expand All @@ -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'
Expand Down

0 comments on commit 01cea97

Please sign in to comment.