File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ concurrency:
1414jobs :
1515 test :
1616 strategy :
17- max-parallel : 3
17+ max-parallel : 2
1818 matrix :
19- os : [ubuntu-latest, macos-latest, windows-latest]
19+ os : [ubuntu-latest, windows-latest]
2020 python-version : ["3.9", "3.10", "3.11"]
2121
2222 runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change 99from mp_api .client import __file__ as root_dir
1010
1111PMG_SETTINGS = _load_pmg_settings ()
12- _NUM_PARALLEL_REQUESTS = min (PMG_SETTINGS .get ("MPRESTER_NUM_PARALLEL_REQUESTS" , 8 ), 8 )
12+ _NUM_PARALLEL_REQUESTS = min (PMG_SETTINGS .get ("MPRESTER_NUM_PARALLEL_REQUESTS" , 4 ), 4 )
1313_MAX_RETRIES = min (PMG_SETTINGS .get ("MPRESTER_MAX_RETRIES" , 3 ), 3 )
1414_MUTE_PROGRESS_BAR = PMG_SETTINGS .get ("MPRESTER_MUTE_PROGRESS_BARS" , False )
1515_MAX_HTTP_URL_LENGTH = PMG_SETTINGS .get ("MPRESTER_MAX_HTTP_URL_LENGTH" , 2000 )
16- _MAX_LIST_LENGTH = min (PMG_SETTINGS .get ("MPRESTER_MAX_LIST_LENGTH" , 40000 ), 40000 )
16+ _MAX_LIST_LENGTH = min (PMG_SETTINGS .get ("MPRESTER_MAX_LIST_LENGTH" , 10000 ), 10000 )
1717
1818try :
1919 CPU_COUNT = cpu_count ()
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def validate_ids(id_list: list[str]):
2525 Returns:
2626 id_list: Returns original ID list if everything is formatted correctly.
2727 """
28- if len (id_list ) >= MAPIClientSettings ().MAX_LIST_LENGTH :
28+ if len (id_list ) > MAPIClientSettings ().MAX_LIST_LENGTH :
2929 raise ValueError (
3030 "List of material/molecule IDs provided is too long. Consider removing the ID filter to automatically pull"
3131 " data for all IDs and filter locally."
Original file line number Diff line number Diff line change @@ -316,11 +316,11 @@ def test_large_list(self, mpr):
316316 mpids = [
317317 str (doc .material_id )
318318 for doc in mpr .summary .search (
319- chunk_size = 1000 , num_chunks = 15 , fields = ["material_id" ]
319+ chunk_size = 1000 , num_chunks = 10 , fields = ["material_id" ]
320320 )
321321 ]
322322 docs = mpr .summary .search (material_ids = mpids , fields = ["material_ids" ])
323- assert len (docs ) == 15000
323+ assert len (docs ) == 10000
324324
325325
326326def test_pmg_api_key (monkeypatch : pytest .MonkeyPatch ):
You can’t perform that action at this time.
0 commit comments