Skip to content

Conversation

@pmrv
Copy link
Contributor

@pmrv pmrv commented Oct 14, 2025

This lives now directly in the assyst package >0.8.1

Summary by CodeRabbit

  • Refactor
    • Removed the PyXtal-based random crystal structure generator from the build module; it is no longer part of the public API.
  • Documentation
    • README updated to remove references to the PyXtal builder.
  • Chores
    • Dropped the optional PyXtal dependency from project and CI environments.
  • Tests
    • Removed tests covering the PyXtal builder functionality.

This lives now directly in the assyst package >0.8.1
@pmrv pmrv requested a review from jan-janssen as a code owner October 14, 2025 10:10
@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

Removed PyXtal-based random structure generation code and its tests, eliminated pyxtal from docs, packaging, and CI environment files, and added hatch-vcs to .ci_support/environment-old.yml. Export lists and imports for the removed functionality were updated.

Changes

Cohort / File(s) Summary
CI environment updates
.ci_support/environment-old.yml, .ci_support/environment.yml
Removed pyxtal from both environment files; added hatch-vcs =0.4.0 only to .ci_support/environment-old.yml.
Packaging metadata
pyproject.toml
Removed optional-dependency entry pyxtal = ["pyxtal==1.1.1"] from [project.optional-dependencies].
Build module cleanup
structuretoolkit/build
structuretoolkit/build/__init__.py, structuretoolkit/build/random.py
Deleted structuretoolkit/build/random.py (PyXtal random generator). Removed the pyxtal import and its export from structuretoolkit/build/__init__.py.
Documentation
README.md
Removed the stk.build.pyxtal() entry from the Build section of the README.
Tests
tests/test_pyxtal.py
Deleted all tests covering stk.build.pyxtal.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant stk.build as stk.build API
    participant PyXtal as PyXtal lib
    Note over User,PyXtal: Previous behavior (before this PR)
    User->>stk.build: call stk.build.pyxtal(...)
    stk.build->>PyXtal: import and invoke PyXtal.from_random(...)
    PyXtal-->>stk.build: Atoms / errors
    stk.build-->>User: return Atoms / warnings / errors

    rect rgb(235,245,255)
      Note right of stk.build: After this PR
    end

    Note over User,stk.build: New behavior (after this PR)
    User->>stk.build: call stk.build.pyxtal(...) (removed)
    stk.build-->>User: NameError / missing symbol (function removed from API)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

dependencies, major

Poem

I nibbled at deps with tiny paws,
PyXtal trimmed from build and docs because,
Tests tucked down, imports set free—
Lighter hops across the tree.
Hatch a seed, a new branch gleams; I nibble on fresh dreams. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Remove pyxtal wrapper” succinctly captures the primary change of deleting the PyXtal wrapper functionality and related artifacts without extraneous detail or vagueness. It aligns directly with the pull request’s intent to remove the wrapper now provided by the assyst package.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pyxtal

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a68d0b1 and e203561.

📒 Files selected for processing (2)
  • .ci_support/environment.yml (0 hunks)
  • pyproject.toml (0 hunks)
💤 Files with no reviewable changes (2)
  • .ci_support/environment.yml
  • pyproject.toml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.89%. Comparing base (c2a55eb) to head (e203561).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
- Coverage   83.13%   82.89%   -0.25%     
==========================================
  Files          25       24       -1     
  Lines        1862     1818      -44     
==========================================
- Hits         1548     1507      -41     
+ Misses        314      311       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b93085c and a68d0b1.

📒 Files selected for processing (7)
  • .ci_support/environment-old.yml (1 hunks)
  • .ci_support/environment.yml (0 hunks)
  • README.md (0 hunks)
  • pyproject.toml (0 hunks)
  • structuretoolkit/build/__init__.py (0 hunks)
  • structuretoolkit/build/random.py (0 hunks)
  • tests/test_pyxtal.py (0 hunks)
💤 Files with no reviewable changes (6)
  • .ci_support/environment.yml
  • pyproject.toml
  • structuretoolkit/build/random.py
  • structuretoolkit/build/init.py
  • README.md
  • tests/test_pyxtal.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: unittest_matrix (macos-latest, 3.13, osx-64-py-3-13)
  • GitHub Check: unittest_matrix (windows-latest, 3.13, win-64-py-3-13)

- sqsgenerator =0.2
- hatchling =1.27.0
- hatch-vcs =0.4.0
- hatch-vcs =0.4.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Validate need and compatibility of hatch-vcs here

  • Is hatch-vcs required in this runtime CI env, or only via pyproject [build-system] during build? If the latter, consider dropping it from this env to reduce solve surface.
  • Please verify hatch-vcs 0.4.0 is available on conda-forge for all CI OS/Python combos and is compatible with hatchling 1.27.0.

🌐 Web query:

Is hatch-vcs version 0.4.0 available on conda-forge and which Python versions does it support? Also, what hatchling version range does hatch-vcs 0.4.0 require?

💡 Result:

Short answer:

  • Is 0.4.0 on conda-forge? No — conda-forge currently shows 0.5.0; version 0.4.0 is available on the Anaconda/main channel (anaconda.org). [1][2]

  • Python versions supported by hatch-vcs (per PyPI): Requires Python >= 3.9 (classifiers list support for 3.9, 3.10, 3.11, 3.12, 3.13). [1]

  • hatchling requirement for hatch-vcs 0.4.0: I don't yet have a definitive packaged metadata line for the hatchling version range for the 0.4.0 release — would you like me to fetch the 0.4.0 release metadata (pyproject/setup metadata) and return the exact hatchling version requirement?

Sources: PyPI project page for hatch-vcs; Anaconda / conda-forge package listings. [1] PyPI hatch-vcs page. [2] Anaconda / conda-forge package pages.


🏁 Script executed:

#!/bin/bash
curl -s https://pypi.org/pypi/hatch-vcs/0.4.0/json | jq '.info.requires_dist'

Length of output: 51


Update or remove hatch-vcs in environment-old.yml

  • hatch-vcs 0.4.0 isn’t on conda-forge (only 0.5.0); pinning 0.4.0 forces use of the default channel.
  • If this env only needs hatch-vcs at build time (via pyproject[build-system]), drop it here; otherwise bump to 0.5.0 (requires Python ≥ 3.9 and hatchling ≥ 1.1.0, satisfied by hatchling 1.27.0).
🤖 Prompt for AI Agents
In .ci_support/environment-old.yml around line 18, the pinned package "hatch-vcs
=0.4.0" is not available on conda-forge and forces use of the default channel;
either remove the entry if hatch-vcs is only required at build time (declared in
pyproject[build-system]), or update the version to "hatch-vcs =0.5.0" and ensure
the environment specifies Python >=3.9 and hatchling >=1.1.0 (e.g., hatchling
1.27.0) so the newer hatch-vcs can be installed from conda-forge instead of
falling back to the default channel.

@jan-janssen jan-janssen merged commit 68997d8 into main Oct 14, 2025
17 of 18 checks passed
@jan-janssen jan-janssen deleted the pyxtal branch October 14, 2025 12:12
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.

3 participants