Proposal for new module `suntime`
Re: Proposal for new module `suntime`
This is neat, but it's LGPL, so your version would have to be too.
It also looks like there are some serious unresolved issues with the original which may not be welcome in a MicroPython library
It also looks like there are some serious unresolved issues with the original which may not be welcome in a MicroPython library
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Proposal for new module `suntime`
The official micropython-lib implements libraries which are typically "micro" versions of equivalent CPython libraries. If users want to contribute libraries which have no CPython equivalent, these need to be maintained as independent projects typically with the source on GitHub and optionally on PyPi. You'll find numerous examples of these listed in the Wiki.
I don't believe that the maintainers will accept this on the above grounds. The licensing would also rule it out.
I don't believe that the maintainers will accept this on the above grounds. The licensing would also rule it out.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Proposal for new module `suntime`
The pull request was denied because of the license. I understand that. I started from scratch with the formula provided by Wikipedia's Sunrise equation and it works. I'll provide a new clean and neat code under MIT license in the following days.
What I don't understand is why a module as this couldn't be part of micropython-lib. Its current README.md states:
What I don't understand is why a module as this couldn't be part of micropython-lib. Its current README.md states:
The libraries here fall into four categories corresponding to the four top-level directories:
- ...
- python-ecosys: Compatible, but reduced-functionality versions of modules from the larger Python ecosystem, for example that might be found in the Python Package Index.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Proposal for new module `suntime`
It's up to the maintainers what to include. I had a discussion with @jimmo on the idea of a "contrib" section for user contributed libraries but it was inconclusive. In general these are offered as I described above.
Yours does seem useful. A similar library for moon rise, set and phase would be good. I did this some years ago for a project in C but so far I haven't got round to porting it to Python.
Yours does seem useful. A similar library for moon rise, set and phase would be good. I did this some years ago for a project in C but so far I haven't got round to porting it to Python.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Proposal for new module `suntime`
I just pushed commit 732b15df with the new module implementation. I rebased it on `datetime` branch (see my corresponding thread) because it depends on that.
I'd be glad if some (@pythoncoder) could review the documentation as well, because I'm not a native English speaker.
I'd be glad if some (@pythoncoder) could review the documentation as well, because I'm not a native English speaker.