The template for `pyproject.toml` has been updated

Ouverte Adaptée aux débutants
#427 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
70/100
Type d'issue
Refactorisation
Clarté
Clairement spécifiée
Activité
Calme
Stack technique
python

Piste de recherche

Commencez par comparer pyproject.toml de ce dépôt avec templates/pyproject.toml du dépôt SciTools/.github, en utilisant le diff lié comme périmètre initial. Examinez les paramètres existants du projet pour Packaging, pytest, repo-review et Ruff avant d’appliquer les modifications appropriées. Le travail est considéré comme terminé lorsque les conventions applicables sont mises à jour dans pyproject.toml, ou lorsque l’issue est fermée si aucune ne s’applique.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Templating

The template for pyproject.toml has been updated; see the diff below. Please either:

  • Action this issue with a pull request applying some/all of these changes to pyproject.toml[^1].
  • Close this issue if none of these changes are appropriate for this repo.

Also consider reviewing a full diff between the template and pyproject.toml, in case other valuable shared conventions have previously been missed.

File Links

Diff

diff --git a/templates/pyproject.toml b/templates/pyproject.toml
index 5eedf89..be8dc70 100644
--- a/templates/pyproject.toml
+++ b/templates/pyproject.toml
@@ -36,7 +36,7 @@ keywords = [
 ]
 license = "BSD-3-Clause"
 license-files = ["LICENSE"]
-name = "scitools-<PACKAGE_NAME>" #e.g "scitools-iris"
+name = "<PACKAGE_NAME>" # e.g "scitools-iris", "cf-units"
 requires-python = "<MIN_PYTHON_VERSION>"
 
 [project.urls]
@@ -117,6 +117,7 @@ checks = [
     # -> No Yields section found
     "YD01",  # Not all docstrings require a "Yields" section.
 
+    # TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):
 ]
 exclude = [
     '\.__eq__$',
@@ -126,17 +127,22 @@ exclude = [
 
 [tool.pytest.ini_options] # The list of keys vary by repository
 addopts = ["-ra", "-v", "--strict-config", "--strict-markers", "--doctest-modules"] # This addopts list varies by repository
-testpaths = "<PATH_TO_MAIN_CODE>" # e.g "cf_units" or "lib/iris"
+filterwarnings = ["default"]
 log_level = "INFO"
+minversion = "6.0"
+testpaths = "<PATH_TO_MAIN_CODE>" # e.g "cf_units" or "lib/iris"
+xfail_strict = "True"
 
 [tool.repo-review]
-# A list of the currently failing repo-review checks, to be fixed later, different for every repository.
+# We have agreed that we will permanently ignore the repo-review rules in the first half of this ignore list.
 ignore = [
     # https://learn.scientific-python.org/development/guides/style/#PC180
     # Not possible to run on the hardware used by the majority of our developers. Might change in future!
     "PC180", # Uses prettier.
     # https://learn.scientific-python.org/development/guides/packaging-simple#PP006
     "PP006",  # Uses dev dependency group
+
+    # TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):
 ]
 
 [tool.ruff]
@@ -146,10 +152,8 @@ line-length = 88
 preview = false
 
 [tool.ruff.lint]
-# We have agreed that we will permanently ignore the ruff rules in this ignore list.
+# We have agreed that we will permanently ignore the ruff rules in the first half of this ignore list.
 ignore = [
-    # NOTE: Non-permanent exclusions should be added to the ".ruff.toml" file.
-
     # flake8-commas (COM)
     # https://docs.astral.sh/ruff/rules/#flake8-commas-com
     "COM812",  # Trailing comma missing.
@@ -159,6 +163,8 @@ ignore = [
     # https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
     # NOTE: This rule may cause conflicts when used with "ruff format".
     "ISC001",  # Implicitly concatenate string literals on one line.
+
+    # TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):
 ]
 preview = false
 select = [

[^1]: Include this text in the PR body to avoid any prompts about applying your changes back to the template!
@scitools-templating: please no share prompt

Langage dominant
Jupyter Notebook
Étoiles
30
Forks
19
Merge moyen
9 j 1 h
PR mergées (30 j)
2

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de SciTools/python-stratify

Toutes les issues de SciTools/python-stratify

Issues similaires

Plus d'issues Build System

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.