Skip to content

Commit

Permalink
Merge pull request #3 from evolv-ai/release/v1.0.0
Browse files Browse the repository at this point in the history
Release/v1.0.0
  • Loading branch information
FrazerBayley authored Jun 27, 2019
2 parents dcdb291 + bff1770 commit 50a5a72
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 18 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# experiment-management-cli
Evolv CLI
====================================

[![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 --editable .
pip install evolvcli
```

2. Ensure the CLI is properly installed by calling the cli. You must be in the virtual environment
Expand Down Expand Up @@ -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

Expand All @@ -54,4 +58,4 @@ evolv get
evolv list
evolv create
evolv update
```
```
File renamed without changes.
7 changes: 3 additions & 4 deletions evolv/cli.py → evolvcli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'])

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requests==2.21.0
coverage==4.5.2
flake8==3.7.5
PyYAML==3.13
PyYAML==5.1.1
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Inside of setup.cfg
[metadata]
description-file = README.md
description-file = README.md
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
from setuptools import setup, find_packages

with open('README.md', 'r') as f:
readme = f.read()

setup(
name='evolv',
version='0.5.0',
name='evolvcli',
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='[email protected]',
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',
Expand All @@ -26,6 +31,6 @@
],
entry_points='''
[console_scripts]
evolv=evolv.cli:cli
evolv=evolvcli.cli:cli
''',
)

0 comments on commit 50a5a72

Please sign in to comment.