From cfd73d5a81bfa523163c62e7602f91c5c99526f3 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 11:24:31 -0800 Subject: [PATCH 1/6] Add networkx --- packages/decorator/meta.yaml | 7 +++++++ packages/networkx/meta.yaml | 16 ++++++++++++++++ test/packages/test_networkx.py | 26 ++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 packages/decorator/meta.yaml create mode 100644 packages/networkx/meta.yaml create mode 100644 test/packages/test_networkx.py diff --git a/packages/decorator/meta.yaml b/packages/decorator/meta.yaml new file mode 100644 index 000000000..280a295c2 --- /dev/null +++ b/packages/decorator/meta.yaml @@ -0,0 +1,7 @@ +package: + name: decorator + version: 4.3.0 + +source: + url: https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz + sha256: c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c diff --git a/packages/networkx/meta.yaml b/packages/networkx/meta.yaml new file mode 100644 index 000000000..53c0f13d6 --- /dev/null +++ b/packages/networkx/meta.yaml @@ -0,0 +1,16 @@ +package: + name: networkx + version: '2.2' + +source: + url: https://files.pythonhosted.org/packages/f3/f4/7e20ef40b118478191cec0b58c3192f822cace858c19505c7670961b76b2/networkx-2.2.zip + sha256: 45e56f7ab6fe81652fb4bc9f44faddb0e9025f469f602df14e3b2551c2ea5c8b + +requirements: + run: + - decorator + - setuptools + +test: + imports: + - networkx \ No newline at end of file diff --git a/test/packages/test_networkx.py b/test/packages/test_networkx.py new file mode 100644 index 000000000..b209a5ac9 --- /dev/null +++ b/test/packages/test_networkx.py @@ -0,0 +1,26 @@ +from textwrap import dedent + +import pytest + + +def test_networkx_basicgraph(selenium_standalone, request): + selenium = selenium_standalone + + if selenium.browser == 'chrome': + request.applymarker(pytest.mark.xfail( + run=False, reason='chrome not supported')) + + selenium.load_package(['networkx', 'numpy']) + cmd = dedent(r""" + import networkx as nx + from numpy.testing import assert_equal + + G = nx.Graph() + G.add_nodes_from([1,2,3]) + G.add_edges_from([(1,2), (1,3)]) + + assert_equal(3, G.number_of_nodes()) + assert_equal(2, G.number_of_edges()) + """) + + selenium.run(cmd) From 980f97469b0ebc56c690bcfedb37ffef6cfcc86d Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 13:55:40 -0800 Subject: [PATCH 2/6] Update networkx meta.yaml test.imports --- packages/networkx/meta.yaml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/networkx/meta.yaml b/packages/networkx/meta.yaml index 53c0f13d6..4b60cd211 100644 --- a/packages/networkx/meta.yaml +++ b/packages/networkx/meta.yaml @@ -13,4 +13,31 @@ requirements: test: imports: - - networkx \ No newline at end of file + - networkx + - networkx.algorithms + - networkx.algorithms.approximation + - networkx.algorithms.assortativity + - networkx.algorithms.bipartite + - networkx.algorithms.centrality + - networkx.algorithms.chordal + - networkx.algorithms.coloring + - networkx.algorithms.community + - networkx.algorithms.components + - networkx.algorithms.connectivity + - networkx.algorithms.flow + - networkx.algorithms.isomorphism + - networkx.algorithms.link_analysis + - networkx.algorithms.node_classification + - networkx.algorithms.operators + - networkx.algorithms.shortest_paths + - networkx.algorithms.traversal + - networkx.algorithms.tree + - networkx.classes + - networkx.drawing + - networkx.generators + - networkx.linalg + - networkx.readwrite + - networkx.readwrite.json_graph + - networkx.testing + - networkx.tests + - networkx.utils \ No newline at end of file From 0d6cf03eb02305369c97aa30b1aee369c741f8f6 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 14:03:23 -0800 Subject: [PATCH 3/6] Remove chrome shunt from networkx tests, use standard assertions --- test/packages/test_networkx.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/test/packages/test_networkx.py b/test/packages/test_networkx.py index b209a5ac9..457784c2a 100644 --- a/test/packages/test_networkx.py +++ b/test/packages/test_networkx.py @@ -1,26 +1,17 @@ -from textwrap import dedent - import pytest - def test_networkx_basicgraph(selenium_standalone, request): selenium = selenium_standalone - - if selenium.browser == 'chrome': - request.applymarker(pytest.mark.xfail( - run=False, reason='chrome not supported')) - - selenium.load_package(['networkx', 'numpy']) - cmd = dedent(r""" + selenium.load_package(['networkx']) + cmd = """ import networkx as nx - from numpy.testing import assert_equal G = nx.Graph() G.add_nodes_from([1,2,3]) G.add_edges_from([(1,2), (1,3)]) - assert_equal(3, G.number_of_nodes()) - assert_equal(2, G.number_of_edges()) - """) + assert G.number_of_nodes() == 3 + assert G.number_of_edges() == 2 + """ selenium.run(cmd) From 3cfcd33c3237451adc8454fa2060b3e1ce0c5bb1 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 14:06:27 -0800 Subject: [PATCH 4/6] Remove testing imports from networkx --- packages/networkx/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/networkx/meta.yaml b/packages/networkx/meta.yaml index 4b60cd211..ca3e2c20b 100644 --- a/packages/networkx/meta.yaml +++ b/packages/networkx/meta.yaml @@ -38,6 +38,4 @@ test: - networkx.linalg - networkx.readwrite - networkx.readwrite.json_graph - - networkx.testing - - networkx.tests - networkx.utils \ No newline at end of file From 90cdd3010b82e8dfd37b4c829665925fdc376052 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 14:06:42 -0800 Subject: [PATCH 5/6] Remove pytest import --- test/packages/test_networkx.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/packages/test_networkx.py b/test/packages/test_networkx.py index 457784c2a..58859cfc8 100644 --- a/test/packages/test_networkx.py +++ b/test/packages/test_networkx.py @@ -1,5 +1,3 @@ -import pytest - def test_networkx_basicgraph(selenium_standalone, request): selenium = selenium_standalone selenium.load_package(['networkx']) From e6fe702205d271dbad3cf451b3fc83f3ff05b7b9 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 14:19:09 -0800 Subject: [PATCH 6/6] Add test.imports to decorator's meta.yaml --- packages/decorator/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/decorator/meta.yaml b/packages/decorator/meta.yaml index 280a295c2..9007821b2 100644 --- a/packages/decorator/meta.yaml +++ b/packages/decorator/meta.yaml @@ -5,3 +5,7 @@ package: source: url: https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz sha256: c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c + +test: + imports: + - decorator \ No newline at end of file