-
Notifications
You must be signed in to change notification settings - Fork 189
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
feat: use TypeVar for dataframes #443
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Experiment ResultsExperiment 1: air-passengersDescription:
Results:
Plot:Experiment 2: air-passengersDescription:
Results:
Plot:Experiment 3: electricity-multiple-seriesDescription:
Results:
Plot:Experiment 4: electricity-multiple-seriesDescription:
Results:
Plot:Experiment 5: electricity-multiple-seriesDescription:
Results:
Plot: |
setup.py
Outdated
@@ -34,6 +34,8 @@ | |||
long_description_content_type="text/markdown", | |||
url="https://github.com/Nixtla/nixtla", | |||
packages=setuptools.find_packages(exclude=["action_files"]), | |||
include_package_data=True, | |||
package_data={'nixtla': ['py.typed']}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that I lied haha. It's already being packaged (0.5.2 logs), I'll remove this.
Changes the type hints for the input and output dataframes from using a type union to a typevar. The main benefit of this is that this tells the type checkers that whatever the input of a function was (restricted to some dataframe types) the output will be of the same type, which helps a lot with IDES and type checkers, for example:
Pandas:
Polars:
Also packages the
py.typed
file, which was already there but wasn't being included in the distribution. This tells type checkers that the package has type annotations.