Skip to content

Commit

Permalink
updated distribution script, functional pip installation
Browse files Browse the repository at this point in the history
  • Loading branch information
achillesrasquinha committed Nov 25, 2017
1 parent d9b174e commit 7cb94d8
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 29 deletions.
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@

language: python
python:
# - "2.6" # no longer supported.
- "2.7"
# - "3.2" # coverage seems to fail.
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev"
- "3.6"
- "3.6-dev"
- "3.7-dev"
install:
- make install
script:
- make test
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ VIRTUALENV = virtualenv
PYTHON = $(PYBINARIES)/python
PIP = $(PYBINARIES)/pip
HONCHO = $(PYBINARIES)/honcho
TWINE = $(PYBINARIES)/twine

NPM ?= npm
BUNDLER ?= bundler
Expand Down Expand Up @@ -68,4 +69,11 @@ ifeq ($(ENVIRONMENT), development)
$(HONCHO) start --procfile $(BASEDIR)/Procfile.dev
else
$(HONCHO) start
endif
endif

publish:
$(PYTHON) setup.py sdist bdist_wheel

$(TWINE) upload -r $(repo) $(BASEDIR)/dist/*

make clean
46 changes: 23 additions & 23 deletions candis/app/client/app/config.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"port": 5000,
"debug": true,
"host": "0.0.0.0",
"port": 5000,
"lang": "en",
"encoding": "utf-8",
"title": "candis v0.1.0",
"color": {
"primary": "#E91E63"
},
"urls": {
"docs": "https://candis.readthedocs.io"
},
"routes": {
"api": {
"base": "/",
"assets": "/assets",
"images": "/assets/img",
"icons": "/assets/img/icons",
"signin": "/SignIn",
"API": {
"data": {
"write": "/api/data/write",
"resource": "/api/data/resource",
"read": "/api/data/read",
"resource": "/api/data/resource"
"write": "/api/data/write"
},
"preprocess": {
"methods": "/api/preprocess/methods"
},
"pipeline": {
"run": "/api/run"
},
"featselect": {
"methods": "/api/featselect/methods"
},
"model": {
"methods": "/api/model/methods"
},
"pipeline": {
"run": "/api/run"
}
},
"signin": "/SignIn",
"assets": "/assets",
"icons": "/assets/img/icons",
"images": "/assets/img",
"base": "/"
}
},
"urls": {
"docs": "https://candis.readthedocs.io"
},
"host": "0.0.0.0",
"color": {
"primary": "#E91E63"
},
"lang": "en",
"container": "app",
"encoding": "utf-8",
"startdir": "CRES"
}
}
13 changes: 11 additions & 2 deletions get-candis
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,16 @@ def get_candis():
popen(pip3, 'install', '-r', osp.join(appdir, 'requirements.txt'))

with open(osp.join(osp.expanduser('~'), '.matplotlib', 'matplotlibrc'), mode = 'a') as f:
f.write('\nbackend: TkAgg')
config = 'backend: TkAgg'

if config not in f.readlines():
f.write('\nbackend: TkAgg')

popen(python3, 'setup.py', 'install', cwd = appdir)

candis = which('candis', raise_err = True)

return candis

def setup_candis(args = None):
code = os.EX_OK
Expand Down Expand Up @@ -178,7 +187,7 @@ def get_argument_parser():
)

parser.add_argument('-t', '--tag', default = 'dev',
help = 'gitHub tag/branch to checkout from'
help = 'github tag/branch to checkout from'
)
parser.add_argument('-d', '--data', default = False,
help = 'fetch sample data'
Expand Down
4 changes: 2 additions & 2 deletions package.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from setuptools import find_packages

name = 'candis'
version = '0.1.0'
release = '0.1.0'
version = '0.0.1'
release = '0.0.1'
description = 'A Flask + ReactJS boilerplate'
long_description = ['README.md']
keywords = [
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
honcho
jupyter
pylint
twine
sphinx
addict
pyyaml
Expand Down
1 change: 1 addition & 0 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
honcho
jupyter
pylint
twine
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def main(argv = None):
clean = CleanCommand, test = TestCommand
),
include_package_data = True,
entry_points = dict(
console_scripts = [
'candis = candis:main'
]
),
**args_setuptools
)

Expand Down

0 comments on commit 7cb94d8

Please sign in to comment.