Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
sphinx<8.0
sphinx
sphinx_design
sphinx-copybutton
pydata_sphinx_theme
pydantic<2.0a0
autodoc-pydantic<2.0a0
myst-nb
nglview
-e ../qcportal
Expand Down
20 changes: 4 additions & 16 deletions docs/source/admin_guide/managers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,15 @@ Configuration for different HPC schedulers
HPC cluster schedulers vary in behavior, so you will need to adapt your ``qcfractal-manager-config.yml`` to the scheduler of the HPC cluster you intend to use.
The configuration keys available for each ``type`` of record in the ``executors`` list are referenced here.

----

.. autopydantic_model:: qcfractalcompute.config.SlurmExecutorConfig
:model-show-config-summary: false
:model-show-field-summary: false
.. autoclass:: qcfractalcompute.config.SlurmExecutorConfig

----

.. autopydantic_model:: qcfractalcompute.config.TorqueExecutorConfig
:model-show-config-summary: false
:model-show-field-summary: false
.. autoclass:: qcfractalcompute.config.TorqueExecutorConfig

----

.. autopydantic_model:: qcfractalcompute.config.LSFExecutorConfig
:model-show-config-summary: false
:model-show-field-summary: false
.. autoclass:: qcfractalcompute.config.LSFExecutorConfig

----

.. _compute-manager-local:

Expand Down Expand Up @@ -178,6 +168,4 @@ Using the ``local`` executor type is also recommended for running a compute mana

----

.. autopydantic_model:: qcfractalcompute.config.LocalExecutorConfig
:model-show-config-summary: false
:model-show-field-summary: false
.. autoclass:: qcfractalcompute.config.LocalExecutorConfig
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.extlinks",
"sphinx_design",
"sphinxcontrib.autodoc_pydantic",
# "sphinxcontrib.autodoc_pydantic",
"sphinx_copybutton",
"myst_nb",
]
Expand All @@ -65,8 +65,8 @@
"show-inheritance": True,
"member-order": "bysource",
}
autodoc_pydantic_model_show_json = False
autodoc_pydantic_settings_show_json = False
#autodoc_pydantic_model_show_json = False
#autodoc_pydantic_settings_show_json = False

# Add any paths that contain templates here, relative to this directory.
templates_path = [
Expand Down
1 change: 1 addition & 0 deletions qcarchivetesting/conda-envs/fulltest_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- requests
- pyyaml
- pydantic
- pydantic-settings
- zstandard
- apsw>=3.42
- qcelemental<0.70a0
Expand Down
1 change: 1 addition & 0 deletions qcarchivetesting/conda-envs/fulltest_snowflake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- requests
- pyyaml
- pydantic
- pydantic-settings
- zstandard
- apsw>=3.42
- qcelemental<0.70a0
Expand Down
1 change: 1 addition & 0 deletions qcarchivetesting/conda-envs/fulltest_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- requests
- pyyaml
- pydantic
- pydantic-settings
- zstandard
- apsw>=3.42
- qcelemental<0.70a0
Expand Down
1 change: 1 addition & 0 deletions qcarchivetesting/conda-envs/fulltest_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- requests
- pyyaml
- pydantic
- pydantic-settings
- zstandard
- apsw>=3.42
- qcelemental<0.70a0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ executors:
max_workers: 1
cores_per_worker: 2
memory_per_worker: 2
queue_tags:
compute_tags:
- '*'
11 changes: 4 additions & 7 deletions qcarchivetesting/qcarchivetesting/testing_classes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import logging
from copy import deepcopy

from qcarchivetesting import geoip_path, geoip_filename, ip_tests_enabled
from qcfractal.config import DatabaseConfig
Expand Down Expand Up @@ -78,10 +77,8 @@ def __init__(self, db_path: str):
assert self.harness.is_alive() and not self.harness.can_connect()

def get_new_harness(self, db_name: str) -> QCATestingPostgresHarness:
harness_config = deepcopy(self.harness.config.dict())
harness_config["database_name"] = db_name

new_harness = QCATestingPostgresHarness(DatabaseConfig(**harness_config))
db_config = self.harness.config.model_copy(deep=True, update={"database_name": db_name})
new_harness = QCATestingPostgresHarness(db_config)
new_harness.create_database(create_tables=True)
return new_harness

Expand Down Expand Up @@ -170,7 +167,7 @@ def __init__(
extra_config=qcf_config,
)

self._original_config = self._qcf_config.copy(deep=True)
self._original_config = self._qcf_config.model_copy(deep=True)

if create_users:
self.create_users()
Expand All @@ -192,7 +189,7 @@ def reset(self):
self._stop_job_runner()
self._stop_compute()
self._all_completed = set()
self._qcf_config = self._original_config.copy(deep=True)
self._qcf_config = self._original_config.model_copy(deep=True)

if self._api_thread is None:
self.start_api(wait=True)
Expand Down
2 changes: 1 addition & 1 deletion qcarchivetesting/qcarchivetesting/testing_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _generate_default_config(pg_harness, extra_config=None) -> FractalConfig:
cfg_dict = {}
cfg_dict["base_folder"] = pg_harness.config.base_folder
cfg_dict["loglevel"] = "DEBUG"
cfg_dict["database"] = pg_harness.config.dict()
cfg_dict["database"] = pg_harness.config.model_dump()
cfg_dict["database"]["pool_size"] = 0
cfg_dict["log_access"] = True

Expand Down
4 changes: 2 additions & 2 deletions qcfractal/qcfractal/components/managers/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ def query_active(
stmt = stmt.where(ComputeManagerORM.programs.op("?&")(program_names)) # ?& = JSONB contains the keys of ...

# Handle *
# If the server doesn't have strict_queue_tags and there is a * in the tags, then
# If the server doesn't have strict_compute_tags and there is a * in the tags, then
# don't limit the query
if "*" not in compute_tag or ("*" in compute_tag and self.root_socket.qcf_config.strict_queue_tags):
if "*" not in compute_tag or ("*" in compute_tag and self.root_socket.qcf_config.strict_compute_tags):
stmt = stmt.where(ComputeManagerORM.compute_tags.op("&&")(compute_tag)) # && = overlaps between two arrays

with self.root_socket.optional_session(session, True) as session:
Expand Down
8 changes: 4 additions & 4 deletions qcfractal/qcfractal/components/tasks/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, root_socket: SQLAlchemySocket):
self._logger = logging.getLogger(__name__)

self._tasks_claim_limit = root_socket.qcf_config.api_limits.manager_tasks_claim
self._strict_queue_tags = root_socket.qcf_config.strict_queue_tags
self._strict_compute_tags = root_socket.qcf_config.strict_compute_tags

def update_finished(
self, manager_name: str, results_compressed: Dict[int, bytes], *, session: Optional[Session] = None
Expand Down Expand Up @@ -331,9 +331,9 @@ def claim_tasks(
TaskQueueORM.compute_priority.desc(), TaskQueueORM.sort_date.asc(), TaskQueueORM.id.asc()
)

# If tag is "*" (and strict_queue_tags is False), then the manager can pull anything
# If tag is "*" and strict_queue_tags is enabled, only pull tasks with tag == '*'
if tag != "*" or self._strict_queue_tags:
# If tag is "*" (and strict_compute_tags is False), then the manager can pull anything
# If tag is "*" and strict_compute_tags is enabled, only pull tasks with tag == '*'
if tag != "*" or self._strict_compute_tags:
stmt = stmt.filter(TaskQueueORM.compute_tag == tag)

# Skip locked rows - They may be in the process of being claimed by someone else
Expand Down
2 changes: 1 addition & 1 deletion qcfractal/qcfractal/components/tasks/test_socket_claim.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def test_task_socket_claim_tag_wildcard_strict(postgres_server, pytestconfig):

pg_harness = postgres_server.get_new_harness("claim_tag_wildcard_strict")
encoding = pytestconfig.getoption("--client-encoding")
with QCATestingSnowflake(pg_harness, encoding=encoding, extra_config={"strict_queue_tags": True}) as snowflake:
with QCATestingSnowflake(pg_harness, encoding=encoding, extra_config={"strict_compute_tags": True}) as snowflake:
storage_socket = snowflake.get_storage_socket()

mname1 = ManagerName(cluster="test_cluster", hostname="a_host1", uuid="1234-5678-1234-5678")
Expand Down
Loading
Loading