From 97a9e25560c4924df8c46315b20c0924797ba743 Mon Sep 17 00:00:00 2001 From: Frazer Bayley Date: Wed, 26 Jun 2019 09:10:58 -0700 Subject: [PATCH 1/3] Releasing veersion 1.0.0 --- README.md | 12 ++++++++---- setup.py | 11 ++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8fc2445..a28ce10 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# experiment-management-cli +Evolv CLI +==================================== + +[![image](https://img.shields.io/pypi/v/evolv.svg)](https://pypi.org/project/evolv/) +[![image](https://img.shields.io/pypi/l/evolv.svg)](https://pypi.org/project/evolv/) +[![image](https://img.shields.io/pypi/pyversions/evolv.svg)](https://pypi.org/project/evolv/) The experiment management CLI provides functionality to create and maintain Evolv experiments. @@ -10,7 +15,7 @@ Pre-requisites: You must have Python 3.7 or above installed on your computer. ```bash python3 -m venv .venv source .venv/bin/activate - pip install --editable . + pip install evolv ``` 2. Ensure the CLI is properly installed by calling the cli. You must be in the virtual environment @@ -38,8 +43,7 @@ To start using the CLI obtain your account id from Evolv staff. 3. The system will prompt you to enter your Evolv email and password. -4. Once logged in you will not have to login again till your credentials expire - or you close your terminal. +4. Once logged in you will not have to login again till your credentials expire. ## Other Commands diff --git a/setup.py b/setup.py index e75a2bc..d8c11fe 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,27 @@ from setuptools import setup, find_packages +with open('README.md', 'r', 'utf-8') as f: + readme = f.read() + setup( name='evolv', - version='0.5.0', + version='1.0.0', packages=find_packages(), include_package_data=True, license='Apache License 2.0', description='CLI user for creating and maintaining Evolv experiments.', + long_description=readme, + long_description_content_type='text/markdown', author='Frazer Bayley', author_email='frazer.bayley@evolv.ai', url='https://github.com/evolv-ai/experiment-management-cli', - download_url='https://github.com/evolv-ai/experiment-management-cli/archive/0.5.0.tar.gz', + download_url='https://github.com/evolv-ai/experiment-management-cli/archive/1.0.0.tar.gz', keywords=['cli', 'Evolv', 'experiments', 'optimization'], install_requires=[ 'Click', 'requests' ], classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Natural Language :: English', From 105e3b8f4e3575b0260650c79609de3a03b73ac9 Mon Sep 17 00:00:00 2001 From: Frazer Bayley Date: Wed, 26 Jun 2019 09:20:16 -0700 Subject: [PATCH 2/3] Updating Yaml package --- README.md | 2 +- evolv/sdk/evolvclient/tests/test_evolv_request.py | 2 +- evolv/sdk/requirements.txt | 2 +- setup.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a28ce10..3707daf 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,4 @@ evolv get evolv list evolv create evolv update -``` \ No newline at end of file +``` diff --git a/evolv/sdk/evolvclient/tests/test_evolv_request.py b/evolv/sdk/evolvclient/tests/test_evolv_request.py index 940dd71..961afcc 100644 --- a/evolv/sdk/evolvclient/tests/test_evolv_request.py +++ b/evolv/sdk/evolvclient/tests/test_evolv_request.py @@ -241,7 +241,7 @@ def json(self): self.assertEqual(EvolvRequest.json_response(response), [{'test': 1}, {'test': 2}]) response = MockResponse({'_name': 'Sample'}, headers={'Content-Type': 'application/yaml'}) - self.assertEqual(EvolvRequest.json_response(response), {'response_yaml': True, 'content': '{_name: Sample}\n'}) + self.assertEqual(EvolvRequest.json_response(response), {'response_yaml': True, 'content': '_name: Sample\n'}) if __name__ == '__main__': diff --git a/evolv/sdk/requirements.txt b/evolv/sdk/requirements.txt index a5f7235..386e252 100644 --- a/evolv/sdk/requirements.txt +++ b/evolv/sdk/requirements.txt @@ -1,4 +1,4 @@ requests==2.21.0 coverage==4.5.2 flake8==3.7.5 -PyYAML==3.13 +PyYAML==5.1.1 diff --git a/setup.cfg b/setup.cfg index 9d5f797..3287428 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ # Inside of setup.cfg [metadata] -description-file = README.md \ No newline at end of file +description-file = README.md From bff1770bd76fc718d04041386a2a845156bce73e Mon Sep 17 00:00:00 2001 From: Frazer Bayley Date: Wed, 26 Jun 2019 21:07:43 -0700 Subject: [PATCH 3/3] Renaming package --- README.md | 10 +++++----- {evolv => evolvcli}/__init__.py | 0 {evolv => evolvcli}/cli.py | 7 +++---- {evolv => evolvcli}/sdk/.flake8 | 0 {evolv => evolvcli}/sdk/.gitignore | 0 {evolv => evolvcli}/sdk/README.md | 0 {evolv => evolvcli}/sdk/__init__.py | 0 {evolv => evolvcli}/sdk/evolvclient/__init__.py | 0 {evolv => evolvcli}/sdk/evolvclient/client.py | 0 {evolv => evolvcli}/sdk/evolvclient/collections.py | 0 {evolv => evolvcli}/sdk/evolvclient/config.py | 0 {evolv => evolvcli}/sdk/evolvclient/request.py | 0 {evolv => evolvcli}/sdk/evolvclient/tests/__init__.py | 0 .../sdk/evolvclient/tests/test_client.py | 0 .../sdk/evolvclient/tests/test_config.py | 0 .../sdk/evolvclient/tests/test_evolv_request.py | 0 {evolv => evolvcli}/sdk/evolvclient/util.py | 0 {evolv => evolvcli}/sdk/requirements.txt | 0 {evolv => evolvcli}/sdk/setup.py | 0 setup.py | 6 +++--- 20 files changed, 11 insertions(+), 12 deletions(-) rename {evolv => evolvcli}/__init__.py (100%) rename {evolv => evolvcli}/cli.py (98%) rename {evolv => evolvcli}/sdk/.flake8 (100%) rename {evolv => evolvcli}/sdk/.gitignore (100%) rename {evolv => evolvcli}/sdk/README.md (100%) rename {evolv => evolvcli}/sdk/__init__.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/__init__.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/client.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/collections.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/config.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/request.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/tests/__init__.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/tests/test_client.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/tests/test_config.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/tests/test_evolv_request.py (100%) rename {evolv => evolvcli}/sdk/evolvclient/util.py (100%) rename {evolv => evolvcli}/sdk/requirements.txt (100%) rename {evolv => evolvcli}/sdk/setup.py (100%) diff --git a/README.md b/README.md index 3707daf..c190d87 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ Evolv CLI ==================================== -[![image](https://img.shields.io/pypi/v/evolv.svg)](https://pypi.org/project/evolv/) -[![image](https://img.shields.io/pypi/l/evolv.svg)](https://pypi.org/project/evolv/) -[![image](https://img.shields.io/pypi/pyversions/evolv.svg)](https://pypi.org/project/evolv/) +[![image](https://img.shields.io/pypi/v/evolvcli.svg)](https://pypi.org/project/evolvcli/) +[![image](https://img.shields.io/pypi/l/evolvcli.svg)](https://pypi.org/project/evolvcli/) +[![image](https://img.shields.io/pypi/pyversions/evolvcli.svg)](https://pypi.org/project/evolvcli/) The experiment management CLI provides functionality to create and maintain Evolv experiments. ## Setup -Pre-requisites: You must have Python 3.7 or above installed on your computer. +Pre-requisites: You must have Python 3.7 installed on your computer. 1. Create a Python vitual environment and install the cli. ```bash python3 -m venv .venv source .venv/bin/activate - pip install evolv + pip install evolvcli ``` 2. Ensure the CLI is properly installed by calling the cli. You must be in the virtual environment diff --git a/evolv/__init__.py b/evolvcli/__init__.py similarity index 100% rename from evolv/__init__.py rename to evolvcli/__init__.py diff --git a/evolv/cli.py b/evolvcli/cli.py similarity index 98% rename from evolv/cli.py rename to evolvcli/cli.py index 7d42a66..08b0b30 100644 --- a/evolv/cli.py +++ b/evolvcli/cli.py @@ -10,14 +10,13 @@ import click -from evolv.sdk.evolvclient.config import EvolvConfig -from evolv.sdk.evolvclient.client import EvolvClient +from evolvcli.sdk.evolvclient.config import EvolvConfig +from evolvcli.sdk.evolvclient.client import EvolvClient APPLICATION_JSON = 'application/json' APPLICATION_YAML = 'application/yaml' -EVOLV_AUTH_FILE = '/tmp/.evolv/auth.json' EVOLV_ACCOUNT_ID = '' EVOLV_CONFIG = None @@ -50,7 +49,7 @@ def cli(domain, account_id, api_key, login): if api_key: EVOLV_CONFIG = EvolvConfig(domain, api_key=api_key) else: - with open(EVOLV_AUTH_FILE) as auth_file: + with open(_find_creds_files('*evolv-creds', tempfile.gettempdir())[0]) as auth_file: auth = json.load(auth_file) EVOLV_CONFIG = EvolvConfig(domain, bearer_token=auth['access_token']) diff --git a/evolv/sdk/.flake8 b/evolvcli/sdk/.flake8 similarity index 100% rename from evolv/sdk/.flake8 rename to evolvcli/sdk/.flake8 diff --git a/evolv/sdk/.gitignore b/evolvcli/sdk/.gitignore similarity index 100% rename from evolv/sdk/.gitignore rename to evolvcli/sdk/.gitignore diff --git a/evolv/sdk/README.md b/evolvcli/sdk/README.md similarity index 100% rename from evolv/sdk/README.md rename to evolvcli/sdk/README.md diff --git a/evolv/sdk/__init__.py b/evolvcli/sdk/__init__.py similarity index 100% rename from evolv/sdk/__init__.py rename to evolvcli/sdk/__init__.py diff --git a/evolv/sdk/evolvclient/__init__.py b/evolvcli/sdk/evolvclient/__init__.py similarity index 100% rename from evolv/sdk/evolvclient/__init__.py rename to evolvcli/sdk/evolvclient/__init__.py diff --git a/evolv/sdk/evolvclient/client.py b/evolvcli/sdk/evolvclient/client.py similarity index 100% rename from evolv/sdk/evolvclient/client.py rename to evolvcli/sdk/evolvclient/client.py diff --git a/evolv/sdk/evolvclient/collections.py b/evolvcli/sdk/evolvclient/collections.py similarity index 100% rename from evolv/sdk/evolvclient/collections.py rename to evolvcli/sdk/evolvclient/collections.py diff --git a/evolv/sdk/evolvclient/config.py b/evolvcli/sdk/evolvclient/config.py similarity index 100% rename from evolv/sdk/evolvclient/config.py rename to evolvcli/sdk/evolvclient/config.py diff --git a/evolv/sdk/evolvclient/request.py b/evolvcli/sdk/evolvclient/request.py similarity index 100% rename from evolv/sdk/evolvclient/request.py rename to evolvcli/sdk/evolvclient/request.py diff --git a/evolv/sdk/evolvclient/tests/__init__.py b/evolvcli/sdk/evolvclient/tests/__init__.py similarity index 100% rename from evolv/sdk/evolvclient/tests/__init__.py rename to evolvcli/sdk/evolvclient/tests/__init__.py diff --git a/evolv/sdk/evolvclient/tests/test_client.py b/evolvcli/sdk/evolvclient/tests/test_client.py similarity index 100% rename from evolv/sdk/evolvclient/tests/test_client.py rename to evolvcli/sdk/evolvclient/tests/test_client.py diff --git a/evolv/sdk/evolvclient/tests/test_config.py b/evolvcli/sdk/evolvclient/tests/test_config.py similarity index 100% rename from evolv/sdk/evolvclient/tests/test_config.py rename to evolvcli/sdk/evolvclient/tests/test_config.py diff --git a/evolv/sdk/evolvclient/tests/test_evolv_request.py b/evolvcli/sdk/evolvclient/tests/test_evolv_request.py similarity index 100% rename from evolv/sdk/evolvclient/tests/test_evolv_request.py rename to evolvcli/sdk/evolvclient/tests/test_evolv_request.py diff --git a/evolv/sdk/evolvclient/util.py b/evolvcli/sdk/evolvclient/util.py similarity index 100% rename from evolv/sdk/evolvclient/util.py rename to evolvcli/sdk/evolvclient/util.py diff --git a/evolv/sdk/requirements.txt b/evolvcli/sdk/requirements.txt similarity index 100% rename from evolv/sdk/requirements.txt rename to evolvcli/sdk/requirements.txt diff --git a/evolv/sdk/setup.py b/evolvcli/sdk/setup.py similarity index 100% rename from evolv/sdk/setup.py rename to evolvcli/sdk/setup.py diff --git a/setup.py b/setup.py index d8c11fe..c25bfd8 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,10 @@ from setuptools import setup, find_packages -with open('README.md', 'r', 'utf-8') as f: +with open('README.md', 'r') as f: readme = f.read() setup( - name='evolv', + name='evolvcli', version='1.0.0', packages=find_packages(), include_package_data=True, @@ -31,6 +31,6 @@ ], entry_points=''' [console_scripts] - evolv=evolv.cli:cli + evolv=evolvcli.cli:cli ''', )