Skip to content

Conversation

LecrisUT
Copy link
Collaborator

Trying to revisit #420

In principle we can use autodoc_type_aliases to simplify the documentation

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.30%. Comparing base (1624219) to head (c959016).
Report is 39 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #466   +/-   ##
========================================
  Coverage    73.30%   73.30%           
========================================
  Files           26       26           
  Lines         8068     8068           
  Branches      1691     1696    +5     
========================================
  Hits          5914     5914           
  Misses        1627     1627           
  Partials       527      527           
Flag Coverage Δ
c_api 68.68% <ø> (ø)
fortran_api 50.70% <ø> (ø)
python_api 64.14% <ø> (ø)
unit_tests 11.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT requested a review from lan496 January 30, 2025 11:03
@LecrisUT LecrisUT marked this pull request as ready for review January 30, 2025 11:03
@LecrisUT
Copy link
Collaborator Author

@lan496 After #520 refactoring I would have a way to skip the CMake step when building the documentation. Basically it would look like

$ BUILD_DOCS=true pip install -e .[docs]
$ sphinx-build docs docs/_build
...

Signed-off-by: Cristian Le <git@lecris.dev>
Copy link
Member

@lan496 lan496 left a comment

Choose a reason for hiding this comment

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

LGTM for generated docs

@lan496
Copy link
Member

lan496 commented Jan 30, 2025

Where BUILD_DOCS come from? Is it used in sphinx?

@LecrisUT
Copy link
Collaborator Author

LecrisUT commented Jan 30, 2025

Where BUILD_DOCS come from? Is it used in sphinx?

That will be a setting in pyproject.toml

# Do not build spglib C library on documentation builders
[[tool.scikit-build.overrides]]
if.any.env.READTHEDOCS = true
if.any.env.BUILD_DOCS = true
wheel.cmake = false

If you add that it already works, but the sphinx builder will fail at build step. I'll see if this is a feature that would be added to scikit-build-core 1

WARNING: autodoc: failed to import function 'spglib.get_pointgroup' from module 'spglib'; the following exception was raised:
cannot import name '_spglib' from partially initialized module 'spglib' (most likely due to a circular import) (/home/lecris/CLionProjects/spglib/python/spglib/__init__.py) [autodoc.import_object]

Footnotes

  1. https://github.com/scikit-build/scikit-build-core/issues/978

@lan496 lan496 merged commit dc75238 into spglib:develop Jan 30, 2025
57 checks passed
@LecrisUT LecrisUT deleted the feat/autodoc branch January 30, 2025 14:26
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.

2 participants