Skip to content

Commit

Permalink
Merge pull request #789 from Zhuoying/fix-ld-wf
Browse files Browse the repository at this point in the history
Initiate rebased branch for lattice dynamics
  • Loading branch information
Zhuoying committed Mar 12, 2024
2 parents 6327b07 + a291b5d commit 2e541f2
Show file tree
Hide file tree
Showing 26 changed files with 6,303 additions and 41 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
sudo apt-get install libopenbabel-dev
# https://github.com/openbabel/openbabel/issues/2408#issuecomment-1014466193
sudo ln -s /usr/include/openbabel3 /usr/local/include/openbabel3
- name: Install phono3py
run: |
conda install -c conda-forge phono3py
- name: Install dependencies
run: |
Expand Down
3 changes: 2 additions & 1 deletion atomate/common/firetasks/tests/test_parse_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@


class TestDrone(AbstractDrone):
def __init__(self):
@classmethod
def setUpClass(cls):
pass

def assimilate(self, path):
Expand Down
1 change: 0 additions & 1 deletion atomate/common/tests/__init__.py

This file was deleted.

19 changes: 13 additions & 6 deletions atomate/utils/tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
"""
import os
import unittest

import boto3
from maggma.stores import MemoryStore
from moto import mock_s3
from moto import mock_aws

__author__ = "Jimmy Shen <[email protected]>"

Expand All @@ -19,7 +18,15 @@
logger = get_logger(__name__)




class TestToDb(CalcDb):
def setup_method(self,method):
self.reset()

def teardown_method(self,method):
pass

def build_indexes(self, indexes=None, background=True):
pass

Expand All @@ -37,7 +44,7 @@ def tearDownClass(cls):
cls.testdb.connection.drop_database(cls.testdb.db_name)

def test_s3_valid(self):
with mock_s3():
with mock_aws():
conn = boto3.resource("s3", region_name="us-east-1")
conn.create_bucket(Bucket="test_bucket")
index_store = MemoryStore()
Expand All @@ -50,7 +57,7 @@ def test_s3_valid(self):
self.assertEqual(res["data"], "111111111110111111")

def test_s3_not_valid(self):
with mock_s3():
with mock_aws():
conn = boto3.resource("s3", region_name="us-east-1")
conn.create_bucket(Bucket="test_bucket_2")
index_store = MemoryStore()
Expand All @@ -61,7 +68,7 @@ def test_s3_not_valid(self):
store.connect()

def test_maggma_store_names(self):
with mock_s3():
with mock_aws():
conn = boto3.resource("s3", region_name="us-east-1")
conn.create_bucket(Bucket="test_bucket")
index_store = MemoryStore()
Expand All @@ -84,7 +91,7 @@ def test_uri(self):
calc_db.collection.insert_one({"task_id": "mp-1", "data": "12345"})
self.assertEqual(calc_db.collection.find_one()["data"], "12345")

with mock_s3():
with mock_aws():
conn = boto3.resource("s3", region_name="us-east-1")
conn.create_bucket(Bucket="test_bucket")
uri_db = TestToDb.from_db_file(db_dir + "/db_aws_uri.json")
Expand Down
Loading

0 comments on commit 2e541f2

Please sign in to comment.