Skip to content

Commit 473db45

Browse files
authored
Move tests directory outside of eland namespace
1 parent 56f6ba6 commit 473db45

File tree

91 files changed

+321
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+321
-297
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Compiled python modules.
22
*.pyc
3+
__pycache__/
34

45
# Setuptools distribution folder.
56
dist/
@@ -11,18 +12,19 @@ build/
1112
docs/build/
1213

1314
# pytest results
14-
eland/tests/dataframe/results/
15+
tests/dataframe/results/*csv
1516
result_images/
1617

1718

1819
# Python egg metadata, regenerated from source files by setuptools.
1920
/*.egg-info
21+
eland.egg-info/
2022

2123
# PyCharm files
2224
.idea/
2325

2426
# vscode files
25-
.vscode/*
27+
.vscode/
2628

2729
# pytest files
2830
.pytest_cache/

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ Once your changes and tests are ready to submit for review:
7979
$ nox -s format
8080

8181
# Run the test suite
82-
$ pytest --doctest-modules eland/tests/
83-
$ pytest --nbval eland/tests/tests_notebook/
82+
$ pytest --doctest-modules tests/
83+
$ pytest --nbval tests/notebook/
8484

8585
```
8686

@@ -182,7 +182,7 @@ currently using a minimum version of PyCharm 2019.2.4.
182182
* To setup test environment:
183183

184184
``` bash
185-
> python -m eland.tests.setup_tests
185+
> python -m tests.setup_tests
186186
```
187187

188188
(Note this modifies Elasticsearch indices)

docs/sphinx/development/contributing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Once your changes and tests are ready to submit for review:
8787
8888
# Run the test suite
8989
$ pytest --doctest-modules eland/tests/
90-
$ pytest --nbval eland/tests/tests_notebook/
90+
$ pytest --nbval eland/tests/notebook/
9191
9292
2. Sign the Contributor License Agreement
9393

@@ -184,13 +184,13 @@ Configuring PyCharm And Running Tests
184184
- To setup test environment -*note this modifies Elasticsearch indices* run
185185
.. code-block:: bash
186186
187-
python -m eland.tests.setup_tests
187+
python -m tests.setup_tests
188188
189189
- To validate installation, open python console and run
190190
.. code-block:: bash
191191
192-
import eland as ed
193-
ed_df = ed.DataFrame('localhost', 'flights')
192+
import eland as ed
193+
ed_df = ed.DataFrame('localhost', 'flights')
194194
195195
- To run the automatic formatter and check for lint issues
196196
.. code-block:: bash

noxfile.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@
2222
import nox
2323

2424
BASE_DIR = Path(__file__).parent
25-
SOURCE_FILES = (
26-
"setup.py",
27-
"noxfile.py",
28-
"eland/",
29-
"docs/",
30-
"utils/",
31-
)
25+
SOURCE_FILES = ("setup.py", "noxfile.py", "eland/", "docs/", "utils/", "tests/")
3226

3327
# Whenever type-hints are completed on a file it should
3428
# be added here so that this file will continue to be checked
@@ -98,15 +92,18 @@ def lint(session):
9892
@nox.session(python=["3.6", "3.7", "3.8"])
9993
def test(session):
10094
session.install("-r", "requirements-dev.txt")
101-
session.run("python", "-m", "eland.tests.setup_tests")
95+
session.run("python", "-m", "tests.setup_tests")
10296
session.install(".")
10397
session.run(
98+
"python",
99+
"-m",
104100
"pytest",
105-
"--cov=eland",
101+
"--cov-report",
102+
"term-missing",
103+
"--cov=eland/",
106104
"--doctest-modules",
107-
*(session.posargs or ("eland/",)),
108105
"--nbval",
109-
"eland/tests/tests_notebook/",
106+
*(session.posargs or ("eland/", "tests/")),
110107
)
111108

112109
session.run(
@@ -119,7 +116,7 @@ def test(session):
119116
"xgboost",
120117
"lightgbm",
121118
)
122-
session.run("pytest", "eland/tests/ml/")
119+
session.run("pytest", "tests/ml/")
123120

124121

125122
@nox.session(reuse_venv=True)
@@ -138,7 +135,7 @@ def docs(session):
138135
es = elasticsearch.Elasticsearch("localhost:9200")
139136
es.info()
140137
if not es.indices.exists("flights"):
141-
session.run("python", "-m", "eland.tests.setup_tests")
138+
session.run("python", "-m", "tests.setup_tests")
142139
es_active = True
143140
except Exception:
144141
es_active = False
File renamed without changes.
File renamed without changes.

eland/tests/common.py renamed to tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
2626

2727
# Create pandas and eland data frames
28-
from eland.tests import (
28+
from tests import (
2929
ECOMMERCE_DF_FILE_NAME,
3030
ECOMMERCE_INDEX_NAME,
3131
ES_TEST_CLIENT,
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)