thegraphnetwork / epigraphhub_py

Epigraphhub Python package
GNU General Public License v3.0
2 stars 9 forks source link

Correct the poetry for wbgapi and added a notebook with examples #160

Closed eduardocorrearaujo closed 2 years ago

eduardocorrearaujo commented 2 years ago

In this PR I corrected the poetry file to get the right version of the wbgapi package.

fccoelho commented 2 years ago

When running the tests now just one error is left:

tests/test_models/test_ngboost_models.py:14 (test_rolling_predictions)
tests/test_models/test_ngboost_models.py:20: in test_rolling_predictions
    df_preds = ngboost_models.rolling_predictions(
epigraphhub/models/ngboost_models.py:172: in rolling_predictions
    df_pred["date"] = x
venv/lib/python3.9/site-packages/pandas/core/frame.py:3655: in __setitem__
    self._set_item(key, value)
venv/lib/python3.9/site-packages/pandas/core/frame.py:3832: in _set_item
    value = self._sanitize_column(value)
venv/lib/python3.9/site-packages/pandas/core/frame.py:4535: in _sanitize_column
    com.require_length_match(value, self.index)
venv/lib/python3.9/site-packages/pandas/core/common.py:557: in require_length_match
    raise ValueError(
E   ValueError: Length of values (27) does not match length of index (26)

The error points to this line(172) in ngboost_models.py:

df_pred["date"] = x

Where len(x) is 27 but len(df_pred) is 26

eduardocorrearaujo commented 2 years ago

@fccoelho is this error showing in the main or in this branch?. I Am asking it because I solved this problem in this branch, some days ago and when I run the tests locally I didn't get any errors.

fccoelho commented 2 years ago

@fccoelho is this error showing in the main or in this branch?. I Am asking it because I solved this problem in this branch, some days ago and when I run the tests locally I didn't get any errors.

In this branch.

eduardocorrearaujo commented 2 years ago

@fccoelho is this error showing in the main or in this branch?. I Am asking it because I solved this problem in this branch, some days ago and when I run the tests locally I didn't get any errors.

In this branch.

I think this problem is solved now. The uniqu

@fccoelho is this error showing in the main or in this branch?. I Am asking it because I solved this problem in this branch, some days ago and when I run the tests locally I didn't get any errors.

In this branch.

I think this problem is solved now. At least from my side, I'm not receiving any error with the test_ngboost_models.py or with the test_clustering.py. In the CI, the test that is failing is the test test_upload.py.

fccoelho commented 2 years ago

Thanks @eduardocorrearaujo the test_upload is supposed to fail, because it requires the SSH tunnel up for access to the DB