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

Upgrade python tests & remove python 3.7 #11

Merged
merged 6 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
python-version: ['3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
Expand All @@ -68,7 +68,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ combine third party tools or implement new functionalities from scratch.

## Requirements

**ml-stars** has been developed and tested on [Python 3.6, 3.7, 3.8, and 3.9](https://www.python.org/downloads/)
**ml-stars** has been developed and tested on [Python 3.8, 3.9, 3.10, and 3.11](https://www.python.org/downloads/)

Also, although it is not strictly required, the usage of a
[virtualenv](https://virtualenv.pypa.io/en/latest/) is highly recommended in order to avoid
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Requirements

Python
~~~~~~
**ml-stars** has been tested on **GNU/Linux**, and **macOS** systems running `Python 3.6, 3.7, or 3.8`_ installed.
**ml-stars** has been tested on **GNU/Linux**, and **macOS** systems running `Python 3.8, 3.9, 3.10, or 3.11`_ installed.

Also, although it is not strictly required, the usage of a `virtualenv`_ is highly recommended in
order to avoid having conflicts with other software installed in the system where you are trying to run **ml-stars**.
Expand Down Expand Up @@ -45,7 +45,7 @@ from its sources, in the editable mode, and also including some additional depen
order to be able to run the tests and build the documentation. Instructions about this process
can be found in the :ref:`contributing` guide.

.. _Python 3.6, 3.7, or 3.8: https://docs.python-guide.org/starting/installation/
.. _Python 3.8, 3.9, 3.10, or 3.11: https://docs.python-guide.org/starting/installation/
.. _virtualenv: https://virtualenv.pypa.io/en/latest/
.. _pip: https://pip.pypa.io
.. _PyPI: https://pypi.org/
Expand Down
2 changes: 1 addition & 1 deletion mlstars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = 'MIT Data To AI Lab'
__email__ = '[email protected]'
__version__ = '0.1.4.dev0'
__version__ = '0.1.4.dev1'

import os

Expand Down
12 changes: 11 additions & 1 deletion mlstars/adapters/statsmodels.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import warnings

import numpy as np
from statsmodels.tsa.arima import model

_ARIMA_MODEL_DEPRECATION_WARNING = (
"statsmodels.tsa.arima_model.Arima is deprecated "
"and will be removed in a future version. Please use "
"statsmodels.tsa.arima.model.ARIMA instead."
)


class ARIMA(object):
"""A Wrapper for the statsmodels.tsa.arima_model.ARIMA class."""
"""A Wrapper for the statsmodels.tsa.arima.model.ARIMA class."""

def __init__(self, p, d, q, trend, steps):
"""Initialize the ARIMA object.
Expand All @@ -22,6 +30,8 @@ def __init__(self, p, d, q, trend, steps):
steps (int):
Integer denoting the number of time steps to predict ahead.
"""
warnings.warn(_ARIMA_MODEL_DEPRECATION_WARNING, DeprecationWarning)

self.p = p
self.d = d
self.q = q
Expand Down
4 changes: 4 additions & 0 deletions mlstars/primitives/statsmodels.tsa.arima.model.ARIMA.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
},
"hyperparameters": {
"fixed": {
"trend": {
"type": "str",
"default": "t"
},
"steps": {
"type": "int",
"default": 10
Expand Down
66 changes: 66 additions & 0 deletions mlstars/primitives/statsmodels.tsa.arima_model.Arima.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "statsmodels.tsa.arima_model.Arima",
"contributors": [
"Alexander Geiger <[email protected]>"
],
"description": "ARIMA Model; mstatsmodels.tsa.arima_model.Arima is deprecated and will be removed in a future version. Please use statsmodels.tsa.arima.model.ARIMA instead.",
"classifiers": {
"type": "estimator",
"subtype": "regressor"
},
"modalities": [],
"primitive": "mlstars.adapters.statsmodels.ARIMA",
"produce": {
"method": "predict",
"args": [
{
"name": "X",
"type": "ndarray"
}
],
"output": [
{
"name": "y",
"type": "ndarray"
}
]
},
"hyperparameters": {
"fixed": {
"trend": {
"type": "str",
"default": "t"
},
"steps": {
"type": "int",
"default": 10
}
},
"tunable": {
"p": {
"type": "int",
"default": 1,
"range": [
0,
40
]
},
"d": {
"type": "int",
"default": 0,
"range": [
0,
3
]
},
"q": {
"type": "int",
"default": 0,
"range": [
0,
12
]
}
}
}
}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.4.dev0
current_version = 0.1.4.dev1
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?
Expand Down
15 changes: 7 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
'mlblocks>=0.6.1',
'numpy>=1.17.4,<2',
'pandas>=1,<3',
'scikit-learn>=0.21,<1.2',
'scipy>=1.1.0,<2',
'scikit-learn>=0.22,<1.2',
'scipy>=1.4.1,<2',
'statsmodels>=0.12.0,<0.15',
'tensorflow>=2,<2.13',
'tensorflow>=2.2,<2.13',
'xgboost>=0.72.1,<2',

# fix google/protobuf/descriptor
Expand Down Expand Up @@ -78,11 +78,10 @@
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
description='Primitives and Pipelines for Time Series Data.',
entry_points={
Expand All @@ -104,11 +103,11 @@
keywords='mlstars',
name='ml-stars',
packages=find_packages(include=['mlstars', 'mlstars.*']),
python_requires='>=3.7,<3.12',
python_requires='>=3.8,<3.12',
setup_requires=setup_requires,
test_suite='tests',
tests_require=tests_require,
url='https://github.com/sintel-dev/ml-stars',
version='0.1.4.dev0',
version='0.1.4.dev1',
zip_safe=False,
)
Loading