Fixed issues with call to Super class
Purpose of PR?:
Fixes #2750
fix: add missing super().init() calls
This PR adds the missing super().__init__() calls in MFDatasetCommonDims and
WebMapService to ensure proper parent class initialization.
Ensured proper initialization of the parent class netCDF4.MFDataset, improving compatibility
and following rules of OOPs (object-oriented principles).
@ReimarBauer and @matrss , Here basically I have done changes such as initialized object states with certain conditions (like In case of unlimited dimensions of NetCDF file, ) superclass or made added prefix '_' to make sure it follows the calling principle of inheritance. pls review the PR and what changes shud I make more as it failed on create Gallery tc ?
Both classes seem to have at least parts of their constructors copied over from the classes they inherit, so just calling the super classes constructor is not enough, it has to be checked what that constructor does and what ours do so far, what the differences are, and how to achieve the same result with a cleaner refactoring of these classes.
@matrss thanks for the detailed review I'll make the mentioned changes and additions with a fresh commit in the PR very soon and also refractor the parent class constructor with updated calling
@matrss pls review this PR and the changes ,
- I have written the
super().__int__() part below the docstrings - double
super().__init__()call in MFDatasetCommonDims constructor - Use conditional initialization based on presence of unlimited dimensions.
Also, what should I do the fix other issues occurring here
@matrss and @ReimarBauer pls review this PR , i have done some changes
@matrss can i know why is this error occurring ? i think it's not related to the issue
Well, it doesn't happen without your changeset, so it must be related somehow.
Well, it doesn't happen without your changeset, so it must be related somehow.
May I know what changes must be done to fix the same , as I'm unable to get this error
I was able to reproduce the error by following what the failing workflow does: https://github.com/Open-MSS/MSS/actions/runs/14640654490/workflow?pr=2781.
On the stable branch this error doesn't happen.