Skip to content

Commit

Permalink
Rename lightning_utilities.dev to lightning_utilities.cli (#46)
Browse files Browse the repository at this point in the history
Rename dev to cli
  • Loading branch information
akihironitta authored Sep 14, 2022
1 parent 74c9529 commit 85b04df
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- name: Set oldest dependencies
if: matrix.requires == 'oldest'
run: |
pip install -e '.[dev]'
python -m lightning_utilities.dev requirements set-oldest
pip install -e '.[cli]'
python -m lightning_utilities.cli requirements set-oldest
- uses: ./.github/actions/cache
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export SLURM_LOCALID=0
export SPHINX_MOCK_REQUIREMENTS=0

test:
pip install -q -r requirements/dev.txt
pip install -q -r requirements/cli.txt
pip install -q -r requirements/test.txt

# use this to run tests
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ __This repository covers the following use-cases:__

1. **GitHub workflows**
1. **GitHub actions**
1. **CLI `lightning_utilities.dev`**
1. **CLI `lightning_utilities.cli`**
1. **General Python utilities in `lightning_utilities.core`**

## 1. Reusable workflows
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
# requires: latest
```

## 3. CLI `lightning_utilities.dev`
## 3. CLI `lightning_utilities.cli`

The package provides common CLI commands.

Expand All @@ -71,15 +71,15 @@ pip install https://github.com/Lightning-AI/utilities/archive/refs/heads/main.zi
From pypi:

```bash
pip install lightning_utilities[dev]
pip install lightning_utilities[cli]
```

</details>

__Usage:__

```bash
python -m lightning_utilities.dev [group] [command]
python -m lightning_utilities.cli [group] [command]
```

<details>
Expand All @@ -92,7 +92,7 @@ codecov>=2.1
pytest>=6.0
pytest-cov
pytest-timeout
$ python -m lightning_utilities.dev requirements set-oldest
$ python -m lightning_utilities.cli requirements set-oldest
$ cat requirements/test.txt
coverage==5.0
codecov==2.1
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def _package_list_from_file(file):
MOCK_PACKAGES = []
if SPHINX_MOCK_REQUIREMENTS:
# mock also base packages when we are on RTD since we don't install them there
MOCK_PACKAGES += _package_list_from_file(os.path.join(_PATH_ROOT, "requirements", "dev.txt"))
MOCK_PACKAGES += _package_list_from_file(os.path.join(_PATH_ROOT, "requirements", "cli.txt"))
MOCK_PACKAGES = [PACKAGE_MAPPING.get(pkg, pkg) for pkg in MOCK_PACKAGES]

autodoc_mock_imports = MOCK_PACKAGES
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def _load_py_module(fname, pkg="lightning_utilities"):


about = _load_py_module("__about__.py")
with open(os.path.join(_PATH_REQUIRE, "dev.txt")) as fp:
requirements_dev = list(map(str, parse_requirements(fp.readline())))
with open(os.path.join(_PATH_REQUIRE, "cli.txt")) as fp:
requirements_cli = list(map(str, parse_requirements(fp.readline())))
with open(os.path.join(_PATH_ROOT, "README.md")) as fp:
readme = fp.read()

Expand All @@ -44,7 +44,7 @@ def _load_py_module(fname, pkg="lightning_utilities"):
setup_requires=[],
install_requires=[],
extras_require={
"dev": requirements_dev,
"cli": requirements_cli,
},
project_urls={
"Bug Tracker": "https://github.com/Lightning-AI/utilities/issues",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
import fire

from lightning_utilities.dev.dependencies import prune_pkgs_in_requirements, replace_oldest_ver
from lightning_utilities.cli.dependencies import prune_pkgs_in_requirements, replace_oldest_ver


def main() -> None:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path

from lightning_utilities.dev.dependencies import prune_pkgs_in_requirements, replace_oldest_ver
from lightning_utilities.cli.dependencies import prune_pkgs_in_requirements, replace_oldest_ver

_PATH_ROOT = Path(__file__).parent.parent.parent

Expand Down

0 comments on commit 85b04df

Please sign in to comment.