Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 2 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lightning Sample project/package
# Lightning Models

This is starter project template which shall simplify initial steps for each new PL project...
...TBD...

[![lightning](https://img.shields.io/badge/-Lightning_2.0+-792ee5?logo=pytorchlightning&logoColor=white)](https://lightning.ai/)
[![CI testing](https://github.com/Lightning-AI/models/actions/workflows/ci-testing.yml/badge.svg?event=push)](https://github.com/Lightning-AI/models/actions/workflows/ci-testing.yml)
Expand All @@ -9,32 +9,3 @@ This is starter project template which shall simplify initial steps for each new
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Lightning-AI/models/main.svg?badge_token=mqheL1-cTn-280Vx4cJUdg)](https://results.pre-commit.ci/latest/github/Lightning-AI/models/main?badge_token=mqheL1-cTn-280Vx4cJUdg)

\* the Read-The-Docs is failing as this one leads to the public domain which requires the repo to be public too

## Included

Listing the implemented sections:

- sample package named `litmodels`
- setting [CI](https://github.com/Lightning-AI/models/actions?query=workflow%3A%22CI+testing%22) for package and _tests_ folder
- setup/install package
- setting docs with Sphinx
- automatic PyPI release on GH release
- Docs deployed as [GH pages](https://Lightning-AI.github.io/models)
- Makefile for building docs with `make docs` and run all tests `make test`

## To be Done aka cross-check

You still need to enable some external integrations such as:

- [ ] update path used in the badges to the repository
- [ ] lock the main breach in GH setting - no direct push without PR
- [ ] set `gh-pages` as website and _docs_ as source folder in GH setting
- [ ] init Read-The-Docs (add this new project)
- [ ] add credentials for releasing package to PyPI
- [ ] specify license in `LICENSE` file and package init

## Tests / Docs notes

- We are using [Napoleon style,](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html) and we shall use static types...
- It is nice to se [doctest](https://docs.python.org/3/library/doctest.html) as they are also generated as examples in documentation
- For wider and edge cases testing use [pytest parametrization](https://docs.pytest.org/en/stable/parametrize.html) :\]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# NOTE: once we add more dependencies, consider update dependabot to check for updates

lightning-sdk >=0.1.35
lightning-utilities
14 changes: 14 additions & 0 deletions src/litmodels/demos/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""Define a demos model for examples and testing purposes."""

from lightning_utilities import module_available

__all__ = []

if module_available("lightning"):
from lightning.pytorch.demos.boring_classes import BoringModel, DemoModel

__all__ += ["BoringModel", "DemoModel"]
elif module_available("pytorch_lightning"):
from pytorch_lightning.demos.boring_classes import BoringModel, DemoModel

__all__ += ["BoringModel", "DemoModel"]
Loading