Skip to content

Commit e0b1bcf

Browse files
authored
#339 : Remove separate pandas installations in nox tests (#368)
* remove pins Signed-off-by: kalyanr <[email protected]> * fix Signed-off-by: kalyanr <[email protected]> * add changelog Signed-off-by: kalyanr <[email protected]> * fix Signed-off-by: kalyanr <[email protected]> * revert Signed-off-by: kalyanr <[email protected]> * remove Signed-off-by: kalyanr <[email protected]> * lint fixes Signed-off-by: kalyanr <[email protected]> --------- Signed-off-by: kalyanr <[email protected]>
1 parent 3cfcc23 commit e0b1bcf

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.ci/run-repository.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if [[ "$TASK_TYPE" == "test" ]]; then
4545
--env "TEST_TYPE=server" \
4646
--name opensearch-py-ml-test-runner \
4747
opensearch-project/opensearch-py-ml \
48-
nox -s "test-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')"
48+
nox -s "test-${PYTHON_VERSION}"
4949

5050
docker cp opensearch-py-ml-test-runner:/code/opensearch-py-ml/junit/ ./junit/
5151
docker rm opensearch-py-ml-test-runner
@@ -61,7 +61,7 @@ elif [[ "$TASK_TYPE" == "doc" ]]; then
6161
--env "TEST_TYPE=server" \
6262
--name opensearch-py-ml-doc-runner \
6363
opensearch-project/opensearch-py-ml \
64-
nox -s "docs-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')"
64+
nox -s "docs-${PYTHON_VERSION}"
6565

6666
docker cp opensearch-py-ml-doc-runner:/code/opensearch-py-ml/docs/build/ ./docs/
6767
docker rm opensearch-py-ml-doc-runner
@@ -84,7 +84,7 @@ elif [[ "$TASK_TYPE" == "trace" ]]; then
8484
--env "TEST_TYPE=server" \
8585
--name opensearch-py-ml-trace-runner \
8686
opensearch-project/opensearch-py-ml \
87-
nox -s "trace-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')" -- ${MODEL_ID} ${MODEL_VERSION} ${TRACING_FORMAT} -ed ${EMBEDDING_DIMENSION} -pm ${POOLING_MODE} -md ${MODEL_DESCRIPTION:+"$MODEL_DESCRIPTION"}
87+
nox -s "trace-${PYTHON_VERSION}" -- ${MODEL_ID} ${MODEL_VERSION} ${TRACING_FORMAT} -ed ${EMBEDDING_DIMENSION} -pm ${POOLING_MODE} -md ${MODEL_DESCRIPTION:+"$MODEL_DESCRIPTION"}
8888

8989
docker cp opensearch-py-ml-trace-runner:/code/opensearch-py-ml/upload/ ./upload/
9090
docker cp opensearch-py-ml-trace-runner:/code/opensearch-py-ml/trace_output/ ./trace_output/

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3333
- Enable the model upload workflow to add model_content_size_in_bytes & model_content_hash_value to model config automatically @thanawan-atc ([#291](https://github.com/opensearch-project/opensearch-py-ml/pull/291))
3434
- Update pretrained_models_all_versions.json (2023-10-18 18:11:34) by @dhrubo-os ([#322](https://github.com/opensearch-project/opensearch-py-ml/pull/322))
3535
- Update model upload history - sentence-transformers/paraphrase-mpnet-base-v2 (v.1.0.0)(BOTH) by @dhrubo-os ([#321](https://github.com/opensearch-project/opensearch-py-ml/pull/321))
36-
- Replaced usage of `is_datetime_or_timedelta_dtype` with `is_timedelta64_dtype` and `is_datetime64_any_dtype`([#316](https://github.com/opensearch-project/opensearch-py-ml/pull/316))
36+
- Replaced usage of `is_datetime_or_timedelta_dtype` with `is_timedelta64_dtype` and `is_datetime64_any_dtype` by @rawwar ([#316](https://github.com/opensearch-project/opensearch-py-ml/pull/316))
3737
- use try-except-else block for handling unexpected exceptions during integration tests by @rawwar([#370](https://github.com/opensearch-project/opensearch-py-ml/pull/370))
38+
- Removed pandas version pin in nox tests by @rawwar ([#368](https://github.com/opensearch-project/opensearch-py-ml/pull/368))
3839

3940
### Fixed
4041
- Enable make_model_config_json to add model description to model config file by @thanawan-atc in ([#203](https://github.com/opensearch-project/opensearch-py-ml/pull/203))

noxfile.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,14 @@ def lint(session):
103103

104104

105105
@nox.session(python=["3.8", "3.9", "3.10"])
106-
@nox.parametrize("pandas_version", ["1.5.0"])
107-
def test(session, pandas_version: str):
106+
def test(session):
108107
session.install(
109108
"-r",
110109
"requirements-dev.txt",
111110
"--timeout",
112111
"1500",
113112
)
114113
session.install(".")
115-
session.run("python", "-m", "pip", "install", f"pandas~={pandas_version}")
116114
session.run("python", "-m", "setup_tests")
117115

118116
junit_xml = join(abspath(dirname(__file__)), "junit", "opensearch-py-ml-junit.xml")
@@ -140,12 +138,10 @@ def test(session, pandas_version: str):
140138

141139

142140
@nox.session(python=["3.9"])
143-
@nox.parametrize("pandas_version", ["1.5.0"])
144-
def docs(session, pandas_version: str):
141+
def docs(session):
145142
# Run this so users get an error if they don't have Pandoc installed.
146143
session.install("-r", "docs/requirements-docs.txt")
147144
session.install(".")
148-
session.run("python", "-m", "pip", "install", f"pandas~={pandas_version}")
149145

150146
session.cd("docs")
151147
session.run("make", "clean", external=True)
@@ -156,16 +152,14 @@ def docs(session, pandas_version: str):
156152
# to automate the action workflow, leveraging its ability to set up the environment
157153
# required for model autotracing.
158154
@nox.session(python=["3.9"])
159-
@nox.parametrize("pandas_version", ["1.5.0"])
160-
def trace(session, pandas_version: str):
155+
def trace(session):
161156
session.install(
162157
"-r",
163158
"requirements-dev.txt",
164159
"--timeout",
165160
"1500",
166161
)
167162
session.install(".")
168-
session.run("python", "-m", "pip", "install", f"pandas~={pandas_version}")
169163

170164
session.run(
171165
"python",

0 commit comments

Comments
 (0)