Skip to content

Tweaks for management and docs#5

Draft
ggalloni wants to merge 7 commits intomainfrom
tweaks
Draft

Tweaks for management and docs#5
ggalloni wants to merge 7 commits intomainfrom
tweaks

Conversation

@ggalloni
Copy link
Copy Markdown
Collaborator

@ggalloni ggalloni commented Dec 2, 2025

This PR adds a bunch of stuff from the point of view of package management.

Also, it adds AI generated documentation.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment thread docs/references.rst
@SOFTWARE{qp_planck,
author = {{qp-planck Contributors}},
title = "{qp-planck: QuickPol beam windows for Planck NPIPE}",
howpublished = {\\url{https://github.com/paganol/qp_planck}},
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The URL in the howpublished field should not be wrapped in \\url{}. In BibTeX, when using the howpublished field, the URL should be plain text or use \url{} (with single backslash). The double backslash will cause a rendering issue. Change to howpublished = {\url{https://github.com/paganol/qp_planck}},

Suggested change
howpublished = {\\url{https://github.com/paganol/qp_planck}},
howpublished = {\url{https://github.com/paganol/qp_planck}},

Copilot uses AI. Check for mistakes.
Comment thread docs/contributing.rst
Comment on lines +198 to +218
Parameters
----------
param1 : int
Description of param1.
param2 : str
Description of param2.

Returns
-------
bool
Description of return value.

Raises
------
ValueError
When invalid input is provided.

Examples
--------
>>> my_function(42, "test")
True
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

Inconsistent docstring style mentioned in contributing guide. The example shows "Parameters" and "Returns" section headers (lines 198-207), which is NumPy-style, but line 122 states "Google-style docstrings". Google-style uses "Args:" and "Returns:" instead. Either update the example to use Google-style format, or clarify that NumPy-style is preferred.

Suggested change
Parameters
----------
param1 : int
Description of param1.
param2 : str
Description of param2.
Returns
-------
bool
Description of return value.
Raises
------
ValueError
When invalid input is provided.
Examples
--------
>>> my_function(42, "test")
True
Args:
param1 (int): Description of param1.
param2 (str): Description of param2.
Returns:
bool: Description of return value.
Raises:
ValueError: When invalid input is provided.
Examples:
>>> my_function(42, "test")
True

Copilot uses AI. Check for mistakes.
Comment thread .pre-commit-config.yaml
Comment on lines +1 to +22
# repos:
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.21.2
# hooks:
# - id: pyupgrade
# args: [--py310-plus]
# files: '\.py$'
# - repo: https://github.com/astral-sh/uv-pre-commit
# rev: 0.9.14
# hooks:
# - id: uv-lock
# - repo: https://github.com/astral-sh/ruff-pre-commit
# # Ruff version.
# rev: v0.14.7
# hooks:
# # Run the linter.
# - id: ruff
# types_or: [ python, pyi, jupyter ]
# args: [ --fix ]
# # Run the formatter.
# - id: ruff-format
# types_or: [ python, pyi, jupyter ] No newline at end of file
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The .pre-commit-config.yaml file has all hooks commented out, making it non-functional. If pre-commit hooks are intended to be used (as mentioned in the dev dependencies and documentation), uncomment these hooks. Otherwise, remove this file to avoid confusion.

Suggested change
# repos:
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.21.2
# hooks:
# - id: pyupgrade
# args: [--py310-plus]
# files: '\.py$'
# - repo: https://github.com/astral-sh/uv-pre-commit
# rev: 0.9.14
# hooks:
# - id: uv-lock
# - repo: https://github.com/astral-sh/ruff-pre-commit
# # Ruff version.
# rev: v0.14.7
# hooks:
# # Run the linter.
# - id: ruff
# types_or: [ python, pyi, jupyter ]
# args: [ --fix ]
# # Run the formatter.
# - id: ruff-format
# types_or: [ python, pyi, jupyter ]
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py310-plus]
files: '\.py$'
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.14
hooks:
- id: uv-lock
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.7
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]

Copilot uses AI. Check for mistakes.
Comment thread docs/contributing.rst
"""Test listing 143 GHz detectors."""
dets = list_planck("143GHz")

assert len(dets) == 11 # 4 PSBs + 3 SWBs
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The test example has an incorrect assertion. The comment on line 282 states "4 PSBs + 3 SWBs" totaling 7 detectors, but the assertion on line 282 checks for len(dets) == 11. The 143 GHz channel actually has 11 detectors (4 PSB pairs = 8 detectors, plus 3 SWBs = 11 total), so the code is correct but the comment is misleading. Update the comment to accurately reflect "4 PSB pairs (8 detectors) + 3 SWBs".

Suggested change
assert len(dets) == 11 # 4 PSBs + 3 SWBs
assert len(dets) == 11 # 4 PSB pairs (8 detectors) + 3 SWBs

Copilot uses AI. Check for mistakes.
- name: Install dev dependencies
run: |
EXTRAS="--extra dev"
uv sync --locked ${EXTRAS}
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

Line 31 in the codestyle workflow uses --locked flag with uv sync, but there's no uv.lock file visible in this PR. If the lock file doesn't exist, this will fail. Either ensure the lock file is committed to the repository, or remove the --locked flag to allow uv to create a lock file during CI runs.

Suggested change
uv sync --locked ${EXTRAS}
uv sync ${EXTRAS}

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
Comment on lines +72 to +73
[tool.setuptools_scm]
version_file = "qp_planck/_version.py"
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The [tool.setuptools_scm] configuration is present, but setuptools_scm is not listed as a build dependency in the project. If you're using setuptools_scm for version management, add it to the build-system.requires in pyproject.toml: "setuptools-scm>=8.0".

Copilot uses AI. Check for mistakes.
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