From deed70337d9f725f6879b5b60292e8238cc7d56f Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Fri, 9 Sep 2022 10:07:59 +0900 Subject: [PATCH] Rename dev to cli --- .github/workflows/ci-testing.yml | 4 ++-- Makefile | 2 +- README.md | 10 +++++----- docs/source/conf.py | 2 +- requirements/{dev.txt => cli.txt} | 0 setup.py | 6 +++--- src/lightning_utilities/{dev => cli}/__init__.py | 0 src/lightning_utilities/{dev => cli}/__main__.py | 2 +- src/lightning_utilities/{dev => cli}/dependencies.py | 0 tests/unittests/{dev => cli}/test_dependencies.py | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) rename requirements/{dev.txt => cli.txt} (100%) rename src/lightning_utilities/{dev => cli}/__init__.py (100%) rename src/lightning_utilities/{dev => cli}/__main__.py (87%) rename src/lightning_utilities/{dev => cli}/dependencies.py (100%) rename tests/unittests/{dev => cli}/test_dependencies.py (92%) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 3115995c..ab1260c4 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -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: diff --git a/Makefile b/Makefile index 26d65154..697dff13 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index b2a74d79..47ff9163 100644 --- a/README.md +++ b/README.md @@ -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 @@ -56,7 +56,7 @@ jobs: # requires: latest ``` -## 3. CLI `lightning_utilities.dev` +## 3. CLI `lightning_utilities.cli` The package provides common CLI commands. @@ -71,7 +71,7 @@ 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] ``` @@ -79,7 +79,7 @@ pip install lightning_utilities[dev] __Usage:__ ```bash -python -m lightning_utilities.dev [group] [command] +python -m lightning_utilities.cli [group] [command] ```
@@ -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 diff --git a/docs/source/conf.py b/docs/source/conf.py index fb28ce41..13b9bb0c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 diff --git a/requirements/dev.txt b/requirements/cli.txt similarity index 100% rename from requirements/dev.txt rename to requirements/cli.txt diff --git a/setup.py b/setup.py index 8e0d90aa..0f0c3dd6 100755 --- a/setup.py +++ b/setup.py @@ -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() @@ -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", diff --git a/src/lightning_utilities/dev/__init__.py b/src/lightning_utilities/cli/__init__.py similarity index 100% rename from src/lightning_utilities/dev/__init__.py rename to src/lightning_utilities/cli/__init__.py diff --git a/src/lightning_utilities/dev/__main__.py b/src/lightning_utilities/cli/__main__.py similarity index 87% rename from src/lightning_utilities/dev/__main__.py rename to src/lightning_utilities/cli/__main__.py index 0ee2d792..1b7a16d7 100644 --- a/src/lightning_utilities/dev/__main__.py +++ b/src/lightning_utilities/cli/__main__.py @@ -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: diff --git a/src/lightning_utilities/dev/dependencies.py b/src/lightning_utilities/cli/dependencies.py similarity index 100% rename from src/lightning_utilities/dev/dependencies.py rename to src/lightning_utilities/cli/dependencies.py diff --git a/tests/unittests/dev/test_dependencies.py b/tests/unittests/cli/test_dependencies.py similarity index 92% rename from tests/unittests/dev/test_dependencies.py rename to tests/unittests/cli/test_dependencies.py index b2bce147..b7093030 100644 --- a/tests/unittests/dev/test_dependencies.py +++ b/tests/unittests/cli/test_dependencies.py @@ -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