Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing dependency on pyyaml #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

missing dependency on pyyaml #10

wants to merge 3 commits into from

Conversation

AlexandreMary
Copy link
Collaborator

@AlexandreMary AlexandreMary commented Dec 13, 2024

And:

@AlexandreMary AlexandreMary linked an issue Dec 13, 2024 that may be closed by this pull request
@AlexandreMary AlexandreMary requested a review from tlestang January 6, 2025 14:43
self._actual_init()
return mtd(self, *args, **kwargs)
return initialized

Copy link

Choose a reason for hiding this comment

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

Ce décorateur est-t-il utilisé pour des méthodes de classes définies dans bronx?

J'ai du mal à comprendre le besoin d'utiliser une autre fonction d'initialisation _actual_init plutot que __init__ -- ça me parait étrange. En tous cas, si ce décorateur reste dans bronx, il faudrait à mon avis que la docstring donne un exemple, ou a minima explique pourquoi il est utile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

L'idée c'est de faire une "delayed init", en n'initialisant certaines choses (typiquement, lire un fichier de définitions GRIB) que lorsqu'on en a réellement besoin.
En fait je n'en ai réellement besoin que dans certaines classes d'epygram, donc je peux l'y garder, mais je pensais que ça pouvait être utile par ailleurs (et que la docstring était assez explicite).

@@ -17,6 +17,7 @@ classifiers = [
"License :: CeCILL-C Free Software License Agreement (CECILL-C)",
]
dependencies = [
"pyyaml",
Copy link

Choose a reason for hiding this comment

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

Du coup matplotlib aussi non?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

De manière optionnelle oui. Mais tout code qui ferait appel à bronx pour ces fonctions matplotlib utiliserait déjà matplotlib, donc c'est moins indispensable.
Pour pyyaml c'est simplement qu'un
from bronx.datagrip.misc import read_dict_in_CSV
dans epygram lève une ModuleNotFoundError: No module named 'yaml'

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.

matplotlib.pyplot needs to be imported in axes.py for set_figax
2 participants