Skip to content

Update sphinx_parser to 0.0.2#492

Merged
jan-janssen merged 4 commits intomainfrom
sphinx_parser
Jul 7, 2025
Merged

Update sphinx_parser to 0.0.2#492
jan-janssen merged 4 commits intomainfrom
sphinx_parser

Conversation

@jan-janssen
Copy link
Copy Markdown
Member

@jan-janssen jan-janssen commented Jul 7, 2025

Summary by CodeRabbit

  • Chores
    • Updated the version of the sphinx-parser dependency from 0.0.1 to 0.0.2.
    • Adjusted testing workflows to remove Python 3.10 on Ubuntu from the test matrix.
    • Relaxed validation criteria for volume equilibrium to allow slightly smaller values.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 7, 2025

Walkthrough

The updates increase the version of the sphinx_parser dependency from 0.0.1 to 0.0.2 in both the .ci_support/environment.yml and the pyproject.toml file under the "sphinxdft" extra requirements. Additionally, the GitHub Actions workflow matrix was modified to remove Python 3.10 on Ubuntu from the unittest job, retaining tests on macOS, Ubuntu, and Windows with Python 3.11 and 3.12. A minor adjustment was made to the lower bound check for the "volume_eq" key in a test validation function.

Changes

File(s) Change Summary
.ci_support/environment.yml, pyproject.toml Updated sphinx_parser version from 0.0.1 to 0.0.2.
.github/workflows/pipeline.yml Removed Python 3.10 on Ubuntu from unittest_matrix job matrix.
tests/test_evcurve_sphinxdft.py Relaxed lower bound check for "volume_eq" from >70.92 to >70.91.

Suggested reviewers

  • samwaseda

Poem

A hop and a skip, a version anew,
Sphinx_parser’s number just grew!
From one to two, a gentle leap,
In yml and toml, the change runs deep.
The codebase smiles, dependencies align,
Tests trimmed neat, the matrix refined! 🐇✨


📜 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 18216f4 and a163937.

📒 Files selected for processing (1)
  • tests/test_evcurve_sphinxdft.py (1 hunks)
⏰ 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). (13)
  • GitHub Check: unittest_mace
  • GitHub Check: unittest_matrix (ubuntu-latest, 3.11)
  • GitHub Check: unittest_abinit
  • GitHub Check: unittest_siesta
  • GitHub Check: unittest_old
  • GitHub Check: unittest_qe
  • GitHub Check: unittest_grace
  • GitHub Check: unittest_matgl
  • GitHub Check: unittest_orb
  • GitHub Check: unittest_sphinxdft
  • GitHub Check: minimal
  • GitHub Check: coverage
  • GitHub Check: notebooks
🔇 Additional comments (1)
tests/test_evcurve_sphinxdft.py (1)

24-24: LGTM! Reasonable test threshold adjustment for updated dependency.

The minor adjustment to the lower bound (70.92 → 70.91) is appropriate for accommodating the updated sphinx_parser version. Small numerical differences are expected when updating scientific computing dependencies, and this conservative change maintains test integrity while ensuring compatibility.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (1)
pyproject.toml (1)

68-68: Minor naming inconsistency: “sphinx-parser” vs “sphinx_parser”

The PyPI canonical name uses a hyphen, while the Conda recipe typically mirrors it (sphinx-parser).
Although pip/Conda normalise hyphens and underscores, using the same spelling across files avoids confusion when troubleshooting dependency issues. Consider switching the Conda pin to sphinx-parser for consistency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 759a224 and 22810ce.

📒 Files selected for processing (2)
  • .ci_support/environment.yml (1 hunks)
  • pyproject.toml (1 hunks)
⏰ 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). (1)
  • GitHub Check: unittest_old

- spglib =2.6.0
- structuretoolkit =0.0.32
- sphinx_parser =0.0.1
- sphinx_parser =0.0.2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Verify that 0.0.2 is actually on conda‐forge before merging

CI will fail early if the new pin isn’t published yet.
You can check availability quickly via the repodata API:


🏁 Script executed:

#!/bin/bash
# Search conda-forge repodata for the exact 0.0.2 build
curl -s https://conda.anaconda.org/conda-forge/noarch/repodata.json |
  jq -r '.packages | keys[]' | grep -E '^sphinx-parser-0\.0\.2'

Length of output: 133


To ensure we’re matching the actual filenames in repodata (which include the build string), let’s retry with a pattern that covers the full file key:


🏁 Script executed:

#!/bin/bash
curl -s https://conda.anaconda.org/conda-forge/noarch/repodata.json \
  | jq -r '.packages | keys[]' \
  | grep -E '^sphinx[-_]parser-0\.0\.2-'

Length of output: 137


Let’s check via the Anaconda.org API for sphinx-parser releases:


🏁 Script executed:

#!/bin/bash
# Query conda-forge’s Anaconda.org package metadata for sphinx-parser
curl -s https://api.anaconda.org/package/conda-forge/sphinx-parser \
  | jq -r '.releases[].version' \
  | sort -u \
  | grep -x '0\.0\.2'

Length of output: 186


Hold merge – sphinx-parser 0.0.2 isn’t on conda-forge yet
I checked both the conda-forge repodata and the Anaconda.org API and found no 0.0.2 release. Merging this pin now will break CI.

• File: .ci_support/environment.yml, line 16
• Action: either pin a version that exists (e.g. 0.0.1) or wait until 0.0.2 is published before merging.

🤖 Prompt for AI Agents
In .ci_support/environment.yml at line 16, the package sphinx_parser is pinned
to version 0.0.2, which is not yet available on conda-forge and will break CI.
To fix this, change the version pin to an existing release such as 0.0.1 or
remove the version pin temporarily until 0.0.2 is officially published on
conda-forge.

@jan-janssen jan-janssen closed this Jul 7, 2025
@jan-janssen jan-janssen reopened this Jul 7, 2025
@jan-janssen jan-janssen closed this Jul 7, 2025
@jan-janssen jan-janssen reopened this Jul 7, 2025
@jan-janssen
Copy link
Copy Markdown
Member Author

@samwaseda It seems Python 3.10 is no longer supported:

======================================================================
ERROR: test_vasp_parser (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_vasp_parser
Traceback (most recent call last):
  File "/home/runner/miniconda3/envs/test/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/runner/miniconda3/envs/test/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/runner/work/atomistics/atomistics/tests/test_vasp_parser.py", line 7, in <module>
    from atomistics.calculators import (
  File "/home/runner/work/atomistics/atomistics/atomistics/calculators/__init__.py", line 100, in <module>
    from atomistics.calculators.sphinxdft import (
  File "/home/runner/work/atomistics/atomistics/atomistics/calculators/sphinxdft.py", line 6, in <module>
    from sphinx_parser.ase import get_structure_group, id_spx_to_ase
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/sphinx_parser/ase.py", line 5, in <module>
    from sphinx_parser.input import sphinx
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/sphinx_parser/input.py", line 10, in <module>
    class sphinx:
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/sphinx_parser/input.py", line 13, in sphinx
    def create(
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/semantikon/converter.py", line 375, in units
    converter = _get_converter(func)
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/semantikon/converter.py", line 323, in _get_converter
    for value in parse_input_args(func).values():
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/semantikon/converter.py", line 294, in parse_input_args
    type_hints = get_annotated_type_hints(func)
  File "/home/runner/miniconda3/envs/test/lib/python3.10/site-packages/semantikon/converter.py", line 266, in get_annotated_type_hints
    hints[name] = _resolve_annotation(param.annotation, func.__globals__)
AttributeError: 'staticmethod' object has no attribute '__globals__'


----------------------------------------------------------------------

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.27%. Comparing base (759a224) to head (a163937).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #492   +/-   ##
=======================================
  Coverage   85.27%   85.27%           
=======================================
  Files          43       43           
  Lines        2581     2581           
=======================================
  Hits         2201     2201           
  Misses        380      380           

☔ 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.

@jan-janssen jan-janssen merged commit f3d225b into main Jul 7, 2025
28 checks passed
@jan-janssen jan-janssen deleted the sphinx_parser branch July 7, 2025 10:19
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