Skip to content

Commit a9e3877

Browse files
committed
releasing 0.1.0
1 parent 6c3d717 commit a9e3877

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

.github/workflows/ci-testing.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ jobs:
7979
- name: Install package & dependencies
8080
run: |
8181
pip --version
82-
pip install -e '.[test]' -U \
82+
pip install -e . -U \
83+
-r requirements/test.txt \
8384
--find-links=${TORCH_URL} ${PIP_EXTRA_FLAG}
8485
pip list
8586
shell: bash

setup.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _load_py_module(fname, pkg="thunder"):
2121

2222
def _load_requirements(path_dir: str, file_name: str = "requirements.txt") -> list:
2323
reqs = parse_requirements(open(os.path.join(path_dir, file_name)).readlines())
24-
return list(map(str, reqs))
24+
return [r for r in list(map(str, reqs)) if "@" not in r]
2525

2626

2727
def _prepare_extras(
@@ -43,6 +43,19 @@ def _prepare_extras(
4343
return extras
4444

4545

46+
def _load_readme_description(path_dir: str, homepage: str, version: str) -> str:
47+
"""Load readme as decribtion."""
48+
path_readme = os.path.join(path_dir, "README.md")
49+
with open(path_readme, encoding="utf-8") as fp:
50+
text = fp.read()
51+
# https://github.com/Lightning-AI/lightning-thunder/raw/master/docs/source/_static/images/lightning_module/pt_to_pl.png
52+
github_source_url = os.path.join(homepage, "raw", version)
53+
# replace relative repository path to absolute link to the release
54+
# do not replace all "docs" as in the readme we replace some other sources with particular path to docs
55+
text = text.replace("docs/source/_static/", f"{os.path.join(github_source_url, 'docs/source/_static/')}")
56+
return text
57+
58+
4659
about = _load_py_module("__about__.py")
4760

4861
# https://packaging.python.org/discussions/install-requires-vs-requirements /
@@ -58,7 +71,9 @@ def _prepare_extras(
5871
download_url="https://github.com/Lightning-AI/lightning-thunder",
5972
license=about.__license__,
6073
packages=find_packages(exclude=["thunder/tests", "docs"]),
61-
long_description=about.__long_doc__,
74+
long_description=_load_readme_description(
75+
path_dir=_PATH_ROOT, homepage=about.__homepage__, version=about.__version__
76+
),
6277
long_description_content_type="text/markdown",
6378
include_package_data=True,
6479
zip_safe=False,

thunder/__about__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
__version__ = "0.0.0dev"
1+
__version__ = "0.1.0"
22
__author__ = "Lightning-AI et al"
33
__author_email__ = "community@lightning.ai"
44
__license__ = "Apache 2.0"
55
__copyright__ = f"2024 {__author__}"
66
__homepage__ = "https://github.com/Lightning-AI/lightning-thunder"
77
__docs__ = "Lightning Thunder project."
8-
# todo: consider loading Readme here...
9-
__long_doc__ = """
10-
Lightning Thunder is a deep learning compiler for PyTorch.
11-
"""
8+
129

1310
__all__ = [
1411
"__author__",
1512
"__author_email__",
1613
"__copyright__",
1714
"__docs__",
18-
"__long_doc__",
1915
"__homepage__",
2016
"__license__",
2117
"__version__",

0 commit comments

Comments
 (0)