isodatetime icon indicating copy to clipboard operation
isodatetime copied to clipboard

Cyclic dependency within isodatetime

Open kinow opened this issue 6 years ago • 1 comments

Running pydeps against Cylc master, without filtering out dependencies, I noticed that it reported zero cyclic dependency for Cylc, but one for isodatetime.

Executing pydeps --show-cycles isodatetime against latest version in master for isodatetime reports:

isodatetime

This is because (1) isodatetime.data depends on the (2) cylc.dumpers. (2) isodatetime.dumper's depends on the (3) isodatetime.parsers (this dependency is imported only in get_time_zone). And (3) isodatetime.parsers depends on (1) isodatetime.data.

This normally indicates that the design of the dependency between classes/categories can be simplified. Allowing easier maintenance (e.g. refactor, move classes to different packages, and so on).

kinow avatar Apr 05 '19 01:04 kinow

Yes. We can do with a good refactor here. I believe we should rearrange the modules so we have a module for each of:

  • Duration (and its parser and dumper).
  • Calendar.
  • TimePoint (and its parser and dumper).
  • TimeRecurrence (and its parser and dumper).

matthewrmshin avatar Apr 05 '19 10:04 matthewrmshin