Skip to content

Commit

Permalink
Merge pull request #318 from roscisz/develop
Browse files Browse the repository at this point in the history
R0.3.5
  • Loading branch information
roscisz authored Dec 14, 2020
2 parents 5b0b90d + e4138f7 commit 5bcd342
Show file tree
Hide file tree
Showing 26 changed files with 21 additions and 9 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ include tensorhive/api/*.yml
include tensorhive/controllers/responses.yml
include tensorhive/*.ini
graft tensorhive/app/web/dist
include tensorhive/alembic.ini
graft tensorhive/migrations

global-exclude *.py[co]
prune tensorhive/app/web/dev
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TensorHive
===
![](https://img.shields.io/badge/release-v0.3.4-brightgreen.svg?style=popout-square)
![](https://img.shields.io/badge/pypi-v0.3.4-brightgreen.svg?style=popout-square)
![](https://img.shields.io/badge/release-v0.3.5-brightgreen.svg?style=popout-square)
![](https://img.shields.io/badge/pypi-v0.3.5-brightgreen.svg?style=popout-square)
![](https://img.shields.io/badge/Issues%20and%20PRs-welcome-yellow.svg?style=popout-square)
![](https://img.shields.io/badge/platform-Linux-blue.svg?style=popout-square)
![](https://img.shields.io/badge/hardware-Nvidia-green.svg?style=popout-square)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ignore = F401,E731
# F401 - Module imported but unused
# E731 - Do not assign lambda expression, use a def
# Source: https://lintlyci.github.io/Flake8Rules/
exclude = tensorhive/snippet.py,tensorhive/app/web/dev/node_modules/
exclude = tensorhive/migrations/,tensorhive/app/web/dev/node_modules/

[mypy]
python_version = 3.6
Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from setuptools import setup, find_packages
import tensorhive
import os

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()


# TODO Add platform and license
setup(
name='tensorhive',
version=tensorhive.__version__,
Expand All @@ -15,11 +19,13 @@
],
},
description='A user-friendly GPU management tool for distributed machine learning workloads',
long_description=long_description,
long_description_content_type='text/markdown',
author='Pawel Rosciszewski, Michal Martyniak, Filip Schodowski',
author_email='[email protected]',
url='https://github.com/roscisz/TensorHive',
download_url='https://github.com/roscisz/TensorHive/archive/{}.tar.gz'.format(tensorhive.__version__),
keywords='reservation monitoring machine learning distributed tensorflow pytorch',
keywords='gpu reservation calendar monitoring machine learning distributed tensorflow pytorch',
install_requires=[
'parallel-ssh==1.9.1',
'passlib==1.7.1',
Expand Down
2 changes: 1 addition & 1 deletion tensorhive/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.4'
__version__ = '0.3.5'
File renamed without changes.
2 changes: 1 addition & 1 deletion tensorhive/app/web/dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tensorhive_web_app",
"version": "0.3.4",
"version": "0.3.5",
"description": "Web aplication based on CoPilot admin template",
"author": "filschod",
"license": "MIT",
Expand Down
3 changes: 3 additions & 0 deletions tensorhive/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class CONFIG_FILES:
HOSTS_CONFIG_TEMPLATE_PATH = str(tensorhive_package_dir / 'hosts_config.ini')
MAILBOT_TEMPLATE_CONFIG_PATH = str(tensorhive_package_dir / 'mailbot_config.ini')

ALEMBIC_CONFIG_PATH = str(tensorhive_package_dir / 'alembic.ini')
MIGRATIONS_CONFIG_PATH = str(tensorhive_package_dir / 'migrations')


class ConfigInitilizer:
'''Makes sure that all default config files exist'''
Expand Down
5 changes: 3 additions & 2 deletions tensorhive/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy_utils import database_exists
from tensorhive.config import DB
from tensorhive.config import DB, CONFIG_FILES
from alembic import command
from alembic.config import Config
from alembic.migration import MigrationContext
Expand Down Expand Up @@ -71,7 +71,8 @@ def ensure_db_with_current_schema() -> None:
"""Makes sure that there is a DB in proper version and creates or upgrades the DB if needed"""
_import_models()

alembic_config = Config('alembic.ini')
alembic_config = Config(CONFIG_FILES.ALEMBIC_CONFIG_PATH)
alembic_config.set_main_option("script_location", CONFIG_FILES.MIGRATIONS_CONFIG_PATH)

if not check_if_db_exists():
initialize_db(alembic_config)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5bcd342

Please sign in to comment.