Skip to content

Apply latest Copier template updates#247

Open
AndrewSazonov wants to merge 8 commits intodevelopfrom
new-templates
Open

Apply latest Copier template updates#247
AndrewSazonov wants to merge 8 commits intodevelopfrom
new-templates

Conversation

@AndrewSazonov
Copy link
Copy Markdown
Member

This PR syncs the project with the latest Copier templates. Main changes include replacing deprecated Node.js 20 usage, migrating docstrings from Google style to NumPy style, and applying related template-driven configuration updates.

@AndrewSazonov AndrewSazonov added the [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) label May 7, 2026
Copy link
Copy Markdown
Member

@henrikjacobsenfys henrikjacobsenfys left a comment

Choose a reason for hiding this comment

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

I looked at a handful of randomly selected files, and they looked fine.

Copy link
Copy Markdown
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

I spent way too much time on this PR :)

Rechecked actions version bump correctness,
Assured client-id is the new version of app-ad in create-github-app-token action
Checked dependency move in pyproject.toml
Got worried about manually copying trstringer/require-label-prefix action
Very useful addition of nodefaults to pixi channels
etc.

One potential issue I have is - do we really, REALLY, need to add the useless docstrings to all the methods?

def __init__(self):
    """Init function."""
def __call__(self, *args, **kwargs):
    """Call function."""

Instead of adding junk, why not just # noqa: DOC comment for those trivial dunder methods?

comments

@damskii9992
Copy link
Copy Markdown
Contributor

Got worried about manually copying trstringer/require-label-prefix action

Yeah, I am not a big fan of that either. But on the other hand, that action is currently not maintained.
Hmm, I remember I saw a PR on the repo which got closed. Looking at the guy who posted the PR, I figured he might have made his own implementation, since trstringer is apparently MIA. And lo an behold, look at what I found:
https://github.com/Rindrics/expect-label-prefix
What do you think @AndrewSazonov ?

@damskii9992
Copy link
Copy Markdown
Contributor

Very useful addition of nodefaults to pixi channels

I believe this was required for us now, right? To make 100% sure we don't accidentally get any commercial conda-packages.

unique_name : Optional[str], default=None
Optional unique name for the list. By default, None.
display_name : Optional[str], default=None
Optional display name for the list. By default, None.
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.

The automatic docstring conversion clearly took some liberties in regards to scanning scanning the code and re-writing the docstrings. We probably need to manually go through the docstrings after this and ammend them.

@@ -25,16 +25,18 @@

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.

We should probably make everything ignore files in the legacy folder. Including coverage, linting, docstrings etc. The legacy folder isn't supported and thus shouldn't be maintained. IMO.

Comment thread pixi.toml

[feature.user.pypi-dependencies]
pip = '*'
easydiffraction = '*'
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.

??? easydiffraction?

Comment thread pyproject.toml

[project.optional-dependencies]
dev = [
'uncertainties', # Propagation of uncertainties in calculations
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.

I think we can remove this dependency completely, also from dev.

Comment thread pyproject.toml

[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports
ban-relative-imports = 'all'
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.

Didn't we discuss that this was a developer preference? I for one prefer relative imports over absolute imports.

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

Labels

[scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants