Skip to content

Commit

Permalink
Merge pull request #17 from aclowes/distribute
Browse files Browse the repository at this point in the history
fix setup.py
  • Loading branch information
aclowes authored Jun 30, 2017
2 parents 4deb5fb + faa6dd2 commit 7b528c5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ Load some examples and run the worker to process them::
yawn examples
yawn worker

Release the built version, test installing it::

(cd frontend/ && yarn build)
./setup.py sdist upload -r https://test.pypi.org/legacy/
pip install -i https://testpypi.python.org/pypi yawns

.. _create-react-app: https://github.com/facebookincubator/create-react-app
.. _Django: https://airflow.incubator.apache.org/

Expand Down
5 changes: 2 additions & 3 deletions frontend/src/QueueList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import {Table, Alert, Button} from 'react-bootstrap';
import {Link} from 'react-router';

import API from "./API";

Expand Down Expand Up @@ -43,7 +42,7 @@ export default class QueueList extends React.Component {
const terminate = () => this.purgeQueue(queue.id);
return (
<tr key={queue.id}>
<td><Link to={`/queues/${queue.id}`}>{queue.name}</Link></td>
<td>{queue.name}</td>
<td>{queue.message_count}</td>
<td>
<Button bsSize="small" onClick={terminate}>
Expand Down Expand Up @@ -75,4 +74,4 @@ export default class QueueList extends React.Component {
</div>
)
}
}
}
7 changes: 1 addition & 6 deletions frontend/src/tests/__snapshots__/QueueList.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,7 @@ exports[`QueueList success 1`] = `
<tbody>
<tr>
<td>
<a
onClick={[Function]}
style={Object {}}
>
default
</a>
default
</td>
<td>
0
Expand Down
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

# Always prefer setuptools over distutils
from setuptools import setup
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
Expand All @@ -22,7 +22,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='0.1.0',
version='0.1.2',

description='Yet Another Workflow Engine, a subprocess-based DAG execution system',
long_description=long_description,
Expand Down Expand Up @@ -63,11 +63,11 @@

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
# packages=find_packages(exclude=['contrib', 'docs', 'tests']),
packages=find_packages(exclude=[]),

# Alternatively, if you want to distribute just a my_module.py, uncomment
# this:
py_modules=["yawn"],
# py_modules=["yawn"],

# List run-time dependencies here. These will be installed by pip when
# your project is installed. For an analysis of "install_requires" vs pip's
Expand Down Expand Up @@ -100,7 +100,12 @@
# installed, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
package_data={
'sample': ['package_data.dat'],
'yawn': [
'staticfiles/static/css/*',
'staticfiles/static/js/*',
'staticfiles/static/media/*',
'staticfiles/*',
],
},

# Although 'package_data' is the preferred approach, in some case you may
Expand Down
5 changes: 4 additions & 1 deletion yawn/worker/tests/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def test_timeout(manager):
assert results == []

results = manager.read_output(timeout=1)

if not results:
# sometimes its not quite ready?
results = manager.read_output(timeout=1)
Expand All @@ -70,6 +69,10 @@ def test_timeout_already_exited(mock_kill, manager):
manager.start_subprocess(1, command, environment={}, timeout=-1)

results = manager.read_output(timeout=1)
if not results:
# sometimes its not quite ready?
results = manager.read_output(timeout=1)

assert len(results) == 1
assert results[0].stdout is None
assert results[0].stderr is None
Expand Down

0 comments on commit 7b528c5

Please sign in to comment.