diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index dc7016079f0..b3604972891 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -25,11 +25,9 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel - pip install pylint==2.8.2 - # https://github.com/edaniszewski/pylint-quotes - pip install pylint-quotes pip install ".[all]" + pip install pylint==2.8.2 + pip install pylint-quotes==0.2.3 - name: Analysing the code with pylint run: | pylint --load-plugins pylint_quotes sky diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 7d311392af5..927d35acf86 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -23,8 +23,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel pip install ".[all]" + pip install pytest - name: Run tests with pytest run: pytest diff --git a/requirements-dev.txt b/requirements-dev.txt index 84637f6d5d2..bb28199f986 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,8 @@ # formatting yapf==0.32.0 pylint==2.8.2 +# https://github.com/edaniszewski/pylint-quotes pylint-quotes==0.2.3 + +# testing +pytest diff --git a/sky/clouds/service_catalog/data_fetchers/fetch_aws.py b/sky/clouds/service_catalog/data_fetchers/fetch_aws.py index 9a355b85217..540ea7108d2 100644 --- a/sky/clouds/service_catalog/data_fetchers/fetch_aws.py +++ b/sky/clouds/service_catalog/data_fetchers/fetch_aws.py @@ -5,8 +5,6 @@ import datetime from typing import Tuple -from absl import app -from absl import logging import numpy as np import pandas as pd import ray @@ -137,14 +135,8 @@ def get_all_regions_instance_types_df(): return df -def main(argv): - del argv # Unused. +if __name__ == '__main__': ray.init() - logging.set_verbosity(logging.DEBUG) df = get_all_regions_instance_types_df() df.to_csv(common.get_data_path('aws.csv'), index=False) print('AWS Service Catalog saved to aws.csv') - - -if __name__ == '__main__': - app.run(main) diff --git a/sky/clouds/service_catalog/data_fetchers/fetch_azure.py b/sky/clouds/service_catalog/data_fetchers/fetch_azure.py index 8bea00cfd98..b930a306c08 100644 --- a/sky/clouds/service_catalog/data_fetchers/fetch_azure.py +++ b/sky/clouds/service_catalog/data_fetchers/fetch_azure.py @@ -7,8 +7,6 @@ from typing import Optional, Tuple import urllib -from absl import app -from absl import logging import numpy as np import pandas as pd import ray @@ -174,14 +172,8 @@ def get_additional_columns(row): return df_ret -def main(argv): - del argv # Unused. +if __name__ == '__main__': ray.init() - logging.set_verbosity(logging.DEBUG) df = get_all_regions_instance_types_df() df.to_csv('../data/azure.csv', index=False) print('Azure Service Catalog saved to azure.csv') - - -if __name__ == '__main__': - app.run(main) diff --git a/sky/clouds/service_catalog/data_fetchers/fetch_gcp_accelerators.py b/sky/clouds/service_catalog/data_fetchers/fetch_gcp_accelerators.py index 2d84658ad26..ce72bae39f1 100644 --- a/sky/clouds/service_catalog/data_fetchers/fetch_gcp_accelerators.py +++ b/sky/clouds/service_catalog/data_fetchers/fetch_gcp_accelerators.py @@ -7,8 +7,6 @@ https://cloud.google.com/sdk/gcloud/reference/compute/machine-types/list """ -from absl import app -from absl import logging import numpy as np import pandas as pd @@ -94,13 +92,7 @@ def get_gpu_tpu_df(): return df -def main(argv): - del argv # Unused. - logging.set_verbosity(logging.DEBUG) +if __name__ == '__main__': df = get_gpu_tpu_df() df.to_csv('../data/gcp.csv', index=False) print('GCP Service Catalog saved to gcp.csv') - - -if __name__ == '__main__': - app.run(main) diff --git a/sky/setup_files/README.md b/sky/setup_files/README.md index 1e9563bde93..177b9cb2bd7 100644 --- a/sky/setup_files/README.md +++ b/sky/setup_files/README.md @@ -8,7 +8,9 @@ # Sky requires python version >= 3.6 # You can just install the dependencies for -# certain clouds, e.g., ".[aws,azure,gcp]" +# certain clouds or containers, e.g., ".[aws,azure,gcp,docker]" + +# Use "all" to install all dependencies pip install -e ".[all]" python examples/resnet_app.py diff --git a/sky/setup_files/setup.py b/sky/setup_files/setup.py index 9f40a2ab14f..4a9901248cc 100644 --- a/sky/setup_files/setup.py +++ b/sky/setup_files/setup.py @@ -5,8 +5,8 @@ ROOT_DIR = os.path.dirname(__file__) install_requires = [ + 'wheel', 'Click', - 'absl-py', 'colorama', 'jinja2', 'networkx', @@ -15,17 +15,15 @@ 'pycryptodome==3.12.0', 'pendulum', 'PrettyTable', - 'pytest', 'ray[default]', 'tabulate', - 'docker', - 'wheel', ] extras_require = { 'aws': ['awscli==1.22.17', 'boto3'], 'azure': ['azure-cli==2.30.0'], 'gcp': ['google-api-python-client', 'google-cloud-storage'], + 'docker': ['docker'], } extras_require['all'] = sum(extras_require.values(), [])