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

Suggest to loosen the dependency on schedule #15

Open
Agnes-U opened this issue Jul 10, 2022 · 0 comments
Open

Suggest to loosen the dependency on schedule #15

Agnes-U opened this issue Jul 10, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Jul 10, 2022

Hi, your project etrv2mqtt requires "schedule==0.6.0" in its dependency. After analyzing the source code, we found that the following versions of schedule can also be suitable without affecting your project, i.e., schedule 0.4.3, 0.5.0, 1.0.0. Therefore, we suggest to loosen the dependency on schedule from "schedule==0.6.0" to "schedule>=0.4.3,<=1.0.0" to avoid any possible conflict for importing more packages or for downstream projects that may use etrv2mqtt.

May I pull a request to further loosen the dependency on schedule?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



We also give our detailed analysis as follows for your reference:

Your project etrv2mqtt directly uses 5 APIs from package schedule.

schedule.__init__.clear, schedule.__init__.CancelJob.__init__, schedule.__init__.run_pending, schedule.__init__.every, schedule.__init__.run_all

Beginning from the 5 APIs above, 4 functions are then indirectly called, including 3 schedule's internal APIs and 1 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).

[/keton/etrv2mqtt]
+--schedule.__init__.clear
+--schedule.__init__.CancelJob.__init__
+--schedule.__init__.run_pending
+--schedule.__init__.every
+--schedule.__init__.run_all

We scan schedule's versions and observe that during its evolution between any version from [0.4.3, 0.5.0, 1.0.0] and 0.6.0, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 0.6.0(original) 0.4.3
['schedule.__init__.ScheduleValueError', 'schedule.__init__.Job.tuesday', 'schedule.__init__.Job.to', 'schedule.__init__.Job.tag', 'schedule.__init__.Job.__repr__', 'schedule.__init__.ScheduleError', 'schedule.__init__.IntervalError', 'schedule.__init__.Job.hour', 'schedule.__init__.Scheduler', 'schedule.__init__.Job.do', 'schedule.__init__.Scheduler.every', 'schedule.__init__.Job.thursday', 'schedule.__init__.Job.sunday', 'schedule.__init__.Job.week', 'schedule.__init__.Job.minute', 'schedule.__init__.Job.day', 'schedule.__init__.Job.at', 'schedule.__init__.Job.friday', 'schedule.__init__.Job', 'schedule.__init__.Job._schedule_next_run', 'schedule.__init__.CancelJob', 'schedule.__init__.Job.__init__', 'schedule.__init__.Job.second', 'schedule.__init__.Job.monday', 'schedule.__init__.Job.saturday', 'schedule.__init__.Job.wednesday']

diff: 0.6.0(original) 0.5.0
['schedule.__init__.ScheduleValueError', 'schedule.__init__.Job.tuesday', 'schedule.__init__.Job.tag', 'schedule.__init__.ScheduleError', 'schedule.__init__.IntervalError', 'schedule.__init__.Job.hour', 'schedule.__init__.Job.thursday', 'schedule.__init__.Job.sunday', 'schedule.__init__.Job.week', 'schedule.__init__.Job.minute', 'schedule.__init__.Job.day', 'schedule.__init__.Job.at', 'schedule.__init__.Job.friday', 'schedule.__init__.Job', 'schedule.__init__.Job._schedule_next_run', 'schedule.__init__.Job.second', 'schedule.__init__.Job.monday', 'schedule.__init__.Job.saturday', 'schedule.__init__.Job.wednesday']

diff: 0.6.0(original) 1.0.0
['schedule.__init__.Job.do', 'schedule.__init__.Scheduler', 'schedule.__init__.Job._schedule_next_run', 'schedule.__init__.Scheduler.run_all', 'schedule.__init__.Job.tag', 'schedule.__init__.Job.run', 'schedule.__init__.Job.__repr__', 'schedule.__init__.Job.at', 'schedule.__init__.Job.__str__', 'schedule.__init__.Scheduler.idle_seconds', 'schedule.__init__.Job', 'schedule.__init__.Scheduler.next_run']

As for other packages, the APIs of time are called by schedule in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on schedule from "schedule==0.6.0" to "schedule>=0.4.3,<=1.0.0". This will improve the applicability of etrv2mqtt and reduce the possibility of any further dependency conflict with other projects.

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

No branches or pull requests

1 participant