Skip to content

Commit 5bcd342

Browse files
authored
Merge pull request #318 from roscisz/develop
R0.3.5
2 parents 5b0b90d + e4138f7 commit 5bcd342

26 files changed

+21
-9
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ include tensorhive/api/*.yml
66
include tensorhive/controllers/responses.yml
77
include tensorhive/*.ini
88
graft tensorhive/app/web/dist
9+
include tensorhive/alembic.ini
10+
graft tensorhive/migrations
911

1012
global-exclude *.py[co]
1113
prune tensorhive/app/web/dev

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TensorHive
22
===
3-
![](https://img.shields.io/badge/release-v0.3.4-brightgreen.svg?style=popout-square)
4-
![](https://img.shields.io/badge/pypi-v0.3.4-brightgreen.svg?style=popout-square)
3+
![](https://img.shields.io/badge/release-v0.3.5-brightgreen.svg?style=popout-square)
4+
![](https://img.shields.io/badge/pypi-v0.3.5-brightgreen.svg?style=popout-square)
55
![](https://img.shields.io/badge/Issues%20and%20PRs-welcome-yellow.svg?style=popout-square)
66
![](https://img.shields.io/badge/platform-Linux-blue.svg?style=popout-square)
77
![](https://img.shields.io/badge/hardware-Nvidia-green.svg?style=popout-square)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ignore = F401,E731
77
# F401 - Module imported but unused
88
# E731 - Do not assign lambda expression, use a def
99
# Source: https://lintlyci.github.io/Flake8Rules/
10-
exclude = tensorhive/snippet.py,tensorhive/app/web/dev/node_modules/
10+
exclude = tensorhive/migrations/,tensorhive/app/web/dev/node_modules/
1111

1212
[mypy]
1313
python_version = 3.6

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
from setuptools import setup, find_packages
22
import tensorhive
3+
import os
4+
5+
this_directory = os.path.abspath(os.path.dirname(__file__))
6+
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
7+
long_description = f.read()
38

49

5-
# TODO Add platform and license
610
setup(
711
name='tensorhive',
812
version=tensorhive.__version__,
@@ -15,11 +19,13 @@
1519
],
1620
},
1721
description='A user-friendly GPU management tool for distributed machine learning workloads',
22+
long_description=long_description,
23+
long_description_content_type='text/markdown',
1824
author='Pawel Rosciszewski, Michal Martyniak, Filip Schodowski',
1925
author_email='pawel.rosciszewski@pg.edu.pl',
2026
url='https://github.com/roscisz/TensorHive',
2127
download_url='https://github.com/roscisz/TensorHive/archive/{}.tar.gz'.format(tensorhive.__version__),
22-
keywords='reservation monitoring machine learning distributed tensorflow pytorch',
28+
keywords='gpu reservation calendar monitoring machine learning distributed tensorflow pytorch',
2329
install_requires=[
2430
'parallel-ssh==1.9.1',
2531
'passlib==1.7.1',

tensorhive/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.3.4'
1+
__version__ = '0.3.5'
File renamed without changes.

tensorhive/app/web/dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tensorhive_web_app",
3-
"version": "0.3.4",
3+
"version": "0.3.5",
44
"description": "Web aplication based on CoPilot admin template",
55
"author": "filschod",
66
"license": "MIT",

tensorhive/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class CONFIG_FILES:
2424
HOSTS_CONFIG_TEMPLATE_PATH = str(tensorhive_package_dir / 'hosts_config.ini')
2525
MAILBOT_TEMPLATE_CONFIG_PATH = str(tensorhive_package_dir / 'mailbot_config.ini')
2626

27+
ALEMBIC_CONFIG_PATH = str(tensorhive_package_dir / 'alembic.ini')
28+
MIGRATIONS_CONFIG_PATH = str(tensorhive_package_dir / 'migrations')
29+
2730

2831
class ConfigInitilizer:
2932
'''Makes sure that all default config files exist'''

tensorhive/database.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from sqlalchemy.orm import scoped_session, sessionmaker
33
from sqlalchemy.ext.declarative import declarative_base
44
from sqlalchemy_utils import database_exists
5-
from tensorhive.config import DB
5+
from tensorhive.config import DB, CONFIG_FILES
66
from alembic import command
77
from alembic.config import Config
88
from alembic.migration import MigrationContext
@@ -71,7 +71,8 @@ def ensure_db_with_current_schema() -> None:
7171
"""Makes sure that there is a DB in proper version and creates or upgrades the DB if needed"""
7272
_import_models()
7373

74-
alembic_config = Config('alembic.ini')
74+
alembic_config = Config(CONFIG_FILES.ALEMBIC_CONFIG_PATH)
75+
alembic_config.set_main_option("script_location", CONFIG_FILES.MIGRATIONS_CONFIG_PATH)
7576

7677
if not check_if_db_exists():
7778
initialize_db(alembic_config)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)