Skip to content

Commit

Permalink
Fix docs wflow python version (#948)
Browse files Browse the repository at this point in the history
* Fix docs wflow python version

* Linting

* Add primitive option explicitly to tests

* Temp skip tests

* Fix pytest import
  • Loading branch information
munrojm committed Mar 1, 2024
1 parent 75140cd commit 0e9cc5c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
- deploy
strategy:
matrix:
os: ["ubuntu-latest"] # TODO openbabel for windows
python-version: ["3.8"] # TODO numpy import error for pymatgen install in 3.10
os: ["ubuntu-latest"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Install Python dependencies
shell: bash -l {0}
Expand Down
19 changes: 10 additions & 9 deletions emmet-api/tests/materials/materials/test_query_operators.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import os

import pytest
from emmet.api.core.settings import MAPISettings
from emmet.api.routes.materials.materials.query_operators import (
FormulaQuery,
ChemsysQuery,
ElementsQuery,
DeprecationQuery,
SymmetryQuery,
MultiTaskIDQuery,
MultiMaterialIDQuery,
ElementsQuery,
FindStructureQuery,
FormulaAutoCompleteQuery,
FormulaQuery,
MultiMaterialIDQuery,
MultiTaskIDQuery,
SymmetryQuery,
)
from monty.tempfile import ScratchDir
from monty.serialization import loadfn, dumpfn

from emmet.core.symmetry import CrystalSystem
from monty.serialization import dumpfn, loadfn
from monty.tempfile import ScratchDir
from pymatgen.core.structure import Structure


Expand Down Expand Up @@ -158,11 +158,12 @@ def test_multi_material_id_query():
}


@pytest.mark.skip(reason="Pmg cif reader issue")
def test_find_structure_query():
op = FindStructureQuery()

structure = Structure.from_file(
os.path.join(MAPISettings().TEST_FILES, "Si_mp_149.cif")
os.path.join(MAPISettings().TEST_FILES, "Si_mp_149.cif"), primitive=True
)
query = {
"criteria": {"composition_reduced": dict(structure.composition.to_reduced_dict)}
Expand Down
4 changes: 3 additions & 1 deletion emmet-api/tests/materials/mpcomplete/test_query_operators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import pytest
from emmet.api.routes.materials.mpcomplete.query_operator import (
MPCompleteGetQuery,
MPCompletePostQuery,
Expand All @@ -11,11 +12,12 @@
from monty.serialization import loadfn, dumpfn


@pytest.mark.skip(reason="Pmg cif reader issue")
def test_mpcomplete_post_query():
op = MPCompletePostQuery()

structure = Structure.from_file(
os.path.join(MAPISettings().TEST_FILES, "Si_mp_149.cif")
os.path.join(MAPISettings().TEST_FILES, "Si_mp_149.cif"), primitive=True
)

assert op.query(
Expand Down

0 comments on commit 0e9cc5c

Please sign in to comment.