From 403a3f9832f7f7f3c49db35e2b8a390ef177c1ed Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 8 Apr 2024 15:04:18 +0200 Subject: [PATCH 1/4] bump pymongo to v4.0.0 in requirements.txt and setup.py --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4c45ea8da..66f62c17b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ ruamel.yaml==0.16.5 -pymongo==3.10.0 +pymongo==4.0.0 Jinja2 monty==3.0.2 python-dateutil==2.8.1 diff --git a/setup.py b/setup.py index 02e228c4d..cb1398be0 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ python_requires=">=3.8", install_requires=[ "ruamel.yaml>=0.15.35", - "pymongo>=3.3.0", + "pymongo>=4.0.0", "Jinja2>=2.8.0", "monty>=1.0.1", "python-dateutil>=2.5.3", From 41a2d2f54e1adaa0adfe4a6088c9f784f5d97c94 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 8 Apr 2024 15:04:55 +0200 Subject: [PATCH 2/4] Update CircleCI configuration to only run pytest with pymongo 4, drop pytest_pymongo4 --- .circleci/config.yml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60e7b0264..a53874990 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,35 +26,7 @@ jobs: pip install .[workflow-checks,graph-plotting,flask-plotting] pytest fireworks - pytest_pymongo4: - working_directory: ~/fireworks - docker: - - image: continuumio/miniconda3:4.6.14 - - image: circleci/mongo:latest - steps: - - checkout - - run: - command: | - export PATH=$HOME/miniconda3/bin:$PATH - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda info -a - conda create -q -n test-environment python=3.8 - source activate test-environment - conda update --quiet --all - pip install --quiet --ignore-installed -r requirements.txt -r requirements-ci.txt - - run: - name: Run fireworks tests - command: | - export PATH=$HOME/miniconda3/bin:$PATH - source activate test-environment - pip install --quiet -e . - pip install --quiet --upgrade pymongo - pytest fireworks - workflows: version: 2 build_and_test: - jobs: - - pytest - - pytest_pymongo4 + jobs: [pytest] From f4cf16355162928194dac80356fa7f8eb98f65c7 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 8 Apr 2024 15:12:25 +0200 Subject: [PATCH 3/4] add GitHub Actions pytest workflow --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..b368dd3b2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Build and Test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + pytest: + runs-on: ubuntu-latest + + services: + mongodb: + image: mongo + ports: + - 27017:27017 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: 3.8 + activate-environment: test-environment + + - name: Install dependencies + shell: bash -l {0} + run: | + conda info -a + pip install --ignore-installed -r requirements.txt -r requirements-ci.txt + + - name: Run fireworks tests + shell: bash -l {0} + run: | + pip install .[workflow-checks,graph-plotting,flask-plotting] + pytest fireworks From 36c8d8251e930c06458f18734592a7ffbda76e3c Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 8 Apr 2024 15:17:09 +0200 Subject: [PATCH 4/4] drop conda-incubator/setup-miniconda@v3 for actions/setup-python@v5 --- .github/workflows/test.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b368dd3b2..1326ed539 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Build and Test +name: Test on: push: @@ -17,20 +17,17 @@ jobs: - 27017:27017 steps: - - uses: actions/checkout@v4 + - name: Checkout repo + uses: actions/checkout@v4 - - name: Set up Miniconda - uses: conda-incubator/setup-miniconda@v3 + - name: Set up Python + uses: actions/setup-python@v5 with: - auto-update-conda: true python-version: 3.8 - activate-environment: test-environment - name: Install dependencies - shell: bash -l {0} run: | - conda info -a - pip install --ignore-installed -r requirements.txt -r requirements-ci.txt + pip install -r requirements.txt -r requirements-ci.txt - name: Run fireworks tests shell: bash -l {0}