MSS icon indicating copy to clipboard operation
MSS copied to clipboard

Fixed issues with call to Super class

Open levi178u opened this issue 8 months ago • 8 comments

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).

levi178u avatar Apr 02 '25 18:04 levi178u

@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 ?

levi178u avatar Apr 02 '25 20:04 levi178u

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

levi178u avatar Apr 03 '25 08:04 levi178u

@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

levi178u avatar Apr 12 '25 01:04 levi178u

@matrss and @ReimarBauer pls review this PR , i have done some changes

levi178u avatar Apr 15 '25 17:04 levi178u

@matrss can i know why is this error occurring ? i think it's not related to the issue image

levi178u avatar Apr 24 '25 11:04 levi178u

Well, it doesn't happen without your changeset, so it must be related somehow.

matrss avatar Apr 24 '25 12:04 matrss

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

levi178u avatar Apr 29 '25 12:04 levi178u

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.

matrss avatar Apr 29 '25 13:04 matrss