Skip to content

Commit

Permalink
releasing 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 20, 2024
1 parent 6c3d717 commit a9e3877
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
- name: Install package & dependencies
run: |
pip --version
pip install -e '.[test]' -U \
pip install -e . -U \
-r requirements/test.txt \
--find-links=${TORCH_URL} ${PIP_EXTRA_FLAG}
pip list
shell: bash
Expand Down
19 changes: 17 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _load_py_module(fname, pkg="thunder"):

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


def _prepare_extras(
Expand All @@ -43,6 +43,19 @@ def _prepare_extras(
return extras


def _load_readme_description(path_dir: str, homepage: str, version: str) -> str:
"""Load readme as decribtion."""
path_readme = os.path.join(path_dir, "README.md")
with open(path_readme, encoding="utf-8") as fp:
text = fp.read()
# https://github.com/Lightning-AI/lightning-thunder/raw/master/docs/source/_static/images/lightning_module/pt_to_pl.png
github_source_url = os.path.join(homepage, "raw", version)
# replace relative repository path to absolute link to the release
# do not replace all "docs" as in the readme we replace some other sources with particular path to docs
text = text.replace("docs/source/_static/", f"{os.path.join(github_source_url, 'docs/source/_static/')}")
return text


about = _load_py_module("__about__.py")

# https://packaging.python.org/discussions/install-requires-vs-requirements /
Expand All @@ -58,7 +71,9 @@ def _prepare_extras(
download_url="https://github.com/Lightning-AI/lightning-thunder",
license=about.__license__,
packages=find_packages(exclude=["thunder/tests", "docs"]),
long_description=about.__long_doc__,
long_description=_load_readme_description(
path_dir=_PATH_ROOT, homepage=about.__homepage__, version=about.__version__
),
long_description_content_type="text/markdown",
include_package_data=True,
zip_safe=False,
Expand Down
8 changes: 2 additions & 6 deletions thunder/__about__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
__version__ = "0.0.0dev"
__version__ = "0.1.0"
__author__ = "Lightning-AI et al"
__author_email__ = "[email protected]"
__license__ = "Apache 2.0"
__copyright__ = f"2024 {__author__}"
__homepage__ = "https://github.com/Lightning-AI/lightning-thunder"
__docs__ = "Lightning Thunder project."
# todo: consider loading Readme here...
__long_doc__ = """
Lightning Thunder is a deep learning compiler for PyTorch.
"""


__all__ = [
"__author__",
"__author_email__",
"__copyright__",
"__docs__",
"__long_doc__",
"__homepage__",
"__license__",
"__version__",
Expand Down

0 comments on commit a9e3877

Please sign in to comment.