Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre committed May 3, 2024
1 parent bca7952 commit bb45c58
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions morl_baselines/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
"""MORL-Baselines contains various MORL algorithms and utility functions."""


__version__ = "1.0.0"
26 changes: 25 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
import pathlib

from setuptools import setup


CWD = pathlib.Path(__file__).absolute().parent


def get_version():
"""Gets the mo-gymnasium version."""
path = CWD / "morl_baselines" / "__init__.py"
content = path.read_text()
for line in content.splitlines():
if line.startswith("__version__"):
return line.strip().split()[-1].strip().strip('"')
raise RuntimeError("bad version data in __init__.py")


setup(
name="morl-baselines",
version=get_version(),
description="Implementations of multi-objective reinforcement learning (MORL) algorithms.",
version="1.0.0",
long_description=open("README.md").read(),
)

# python setup.py sdist
# python setup.py bdist_wheel
# twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# twine upload dist/*

# https://towardsdatascience.com/create-your-own-python-package-and-publish-it-into-pypi-9306a29bc116

0 comments on commit bb45c58

Please sign in to comment.