Skip to content

Add sqs extra (icet) and fail at SQS job creation if icet is missing - #1657

Open
ardunn wants to merge 1 commit into
materialsproject:mainfrom
ardunn:sqs-icet-extra
Open

ardunn wants to merge 1 commit into
materialsproject:mainfrom
ardunn:sqs-icet-extra

Conversation

@ardunn

@ardunn ardunn commented Nov 16, 2026 •

Copy link
Copy Markdown

Running the SQS job requires external software, one option of which is icet which is pip installable. This should be included as an optional dependency/extra in atomate2, otherwise the job will only fail at runtime if it is not installed.

Warning

below text authored by claude, not human ardunn

Problem

An SQS maker with an icet-* sqs_method builds and make()s a job with no error. If icet isn't installed, the job only fails once it runs on the worker, with ImportError: IcetSQS requires the icet package from pymatgen.io.icet. atomate2 never declares icet as a dependency, so test_sqs is also always skipped in CI.

Changes (7 lines)

  • pyproject.toml: new sqs = ["icet>=3.0"] extra.
  • SQS.__post_init__: raises ImportError("pip install atomate2[sqs] to use icet SQS methods") when the maker is constructed with an icet-* method and icet is missing. mcsqs makers are unaffected.
  • testing.yml: the non-forcefield test job installs sqs, so test_sqs runs instead of being skipped.

Testing

  • tests/common/jobs/test_transform.py passes with icet 4.0 and with icet 3.0 (the floor).
  • Without icet, an icet maker raises at construction and an mcsqs maker still constructs.
  • ruff 0.17.3 and mypy 2.4.1 (the pre-commit pins) pass.

Not addressed here

  • SQS() with no arguments raises TypeError: 'SQSTransformation' object is not callable: default_factory is given an instance instead of a callable.
  • The mcsqs method still fails only at runtime if the ATAT mcsqs binary isn't on PATH. It isn't pip-installable, so an extra doesn't help there.

The SQS maker with an icet-* sqs_method built jobs without error and only
raised ImportError on the worker. icet is now the sqs extra, the maker
checks for it at construction, and CI installs it so test_sqs runs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant