Skip to content

Commit

Permalink
refactoring to release version 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
birnbaum committed Dec 12, 2018
1 parent b047005 commit e3813b4
Show file tree
Hide file tree
Showing 42 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ yarn-error.log*
rfvis.egg-info
dist
build
client/**/*.css
*.css

# misc
.DS_Store
Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ actually see the application working on `http://localhost:8080`.

To build the frontend you need Node.js installed. First install all
dev-dependencies by running the following
from within the `./client` directory:
from within the `./rfvis/client` directory:

```
$ npm install
Expand Down
2 changes: 1 addition & 1 deletion rfvis/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.0"
__version__ = "0.2.1"
4 changes: 2 additions & 2 deletions rfvis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def cli(forest_json, out, width, height, trunk_length, display_depth, branch_col
})

try:
abs_path = os.path.normpath(os.path.join(__file__, "../../client/build/render_tree_script.js"))
process = subprocess.Popen(["node", abs_path, config, out],
script_path = os.path.join(os.path.dirname(__file__), "client", "build", "render_tree_script.js")
process = subprocess.Popen(["node", script_path, config, out],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
output = process.communicate(json.dumps(data).encode("utf8"))
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.
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.
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.
7 changes: 4 additions & 3 deletions rfvis/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ def start_server(data, port=8080, debug=False, use_reloader=False, **kwargs):
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def serve_app(path):
if path != "" and os.path.exists("client/build/" + path):
return send_from_directory('../client/build', path)
build_path = os.path.join(os.path.dirname(__file__), "client", "build")
if path != "" and os.path.exists(os.path.join(build_path, path)):
return send_from_directory(build_path, path)
else:
return send_from_directory('../client/build', 'index.html')
return send_from_directory(build_path, 'index.html')

@app.route('/data')
def serve_data():
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"Bug Tracker": "https://github.com/birnbaum/rfvis/issues",
},
packages=["rfvis"],
package_data={"rfvis": ["client/build/*", "client/build/static/**/*"]},
license="MIT",
install_requires=[
"click",
Expand Down

0 comments on commit e3813b4

Please sign in to comment.