Skip to content

Commit

Permalink
release(v0.0.1): just to reserve name
Browse files Browse the repository at this point in the history
  • Loading branch information
yalattas committed Apr 24, 2023
1 parent 8d6b7f3 commit 02a3781
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# .gitignore

# environment specific settings
environment.yaml
# Python virtual environment
venv/
run/

# Compiled Python files
*.pyc
Expand Down
5 changes: 5 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pip install -r requirements/dev.txt

python setup.py sdist bdist_wheel

twine upload dist/*
2 changes: 2 additions & 0 deletions mindmate/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import click
from .utils import helper
from .commands.configure import configure
from .commands.initdb import initdb
from .commands.dropdb import dropdb
from .commands.nested_group import nested_group
Expand All @@ -9,6 +10,7 @@ def cli():
"""hi to mindmate cli, try option --help for more information"""
pass

cli.add_command(configure)
cli.add_command(initdb)
cli.add_command(dropdb)
cli.add_command(nested_group)
Expand Down
37 changes: 37 additions & 0 deletions mindmate/commands/configure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import click
import yaml
import os

def set_yaml_state(file: str) -> dict:
with open(file, 'r') as f:
data_dict = yaml.load(f, Loader=yaml.FullLoader)
return data_dict
def update_yaml_state(state: dict, file_path: str) -> None:
with open(file_path, 'w') as outputfile:
yaml.dump(state, outputfile, default_flow_style=False)

@click.command()
def configure():
"""To configure the interface for future calls"""

PATH = '~/.mindmate'
FILE_NAME = 'environment.yaml'

while not os.path.isfile(PATH+'/'+FILE_NAME):
try:
os.makedirs(PATH)
except FileExistsError as f:
pass
data = {
'keys': {
'openai_token':'xxxx'
}
}
with open(PATH+'/'+FILE_NAME, 'w') as outputfile:
yaml.dump(data, outputfile, default_flow_style=False)

file = set_yaml_state(PATH+'/'+FILE_NAME)
openai_value = file['keys']['openai_token']
openai_user_token = click.prompt(f'OPENAI TOKEN [****************{openai_value[-4:]}]', type=str)
file['keys']['openai_token'] = openai_user_token
update_yaml_state(state=file, file_path=PATH+'/'+FILE_NAME)
4 changes: 3 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
click==8.1.3
click==8.1.3
openai>=0.27
PyYAML==6
3 changes: 2 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-r base.txt
wheel
wheel
twine
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
from setuptools import setup, find_packages

GITHUB_REPO = 'https://github.com/yalattas/mindmate'
setup(
name='mindmate',
version='0.0.1',
author='Yasser Alattas',
author_email='y.alattas@gmail.com',
description="MindMate is a command-line tool that leverages the power of AI platforms to offer different use-cases to developers",
long_description="MindMate is a powerful command-line tool that harnesses the capabilities of state-of-the-art artificial intelligence platforms to offer a wide range of use-cases to developers. With MindMate, developers can easily leverage advanced natural language processing (NLP) and machine learning (ML) functionalities to enable various applications",
url='https://github.com/yalattas/mindmate',
download_url='https://github.com/yalattas/mindmate',
url=GITHUB_REPO,
download_url=GITHUB_REPO,
packages=find_packages(),
keywords=['cli', 'ai', 'nlp', 'ml', 'developers', 'productivity', 'openai'],
install_requires=[
'wheel',
'click>=8.1',
'openai>=0.27',
'PyYAML==6',
],
entry_points={
'console_scripts': [
Expand Down

0 comments on commit 02a3781

Please sign in to comment.