Skip to content

Commit

Permalink
disable HydroShare_integration.ipynb because not working anymore (#460)
Browse files Browse the repository at this point in the history
```
  ______ RavenPy-master/docs/notebooks/HydroShare_integration.ipynb::Cell 0 ______
  Notebook cell execution failed
  Cell 0: Cell execution caused an exception

  Input:
  import os

  from hsclient import HydroShare, Token

  # Authentication method using username and password
  """
  username = 'XXXXX'
  password = 'XXXXX'
  hs = HydroShare(username=username, password=password)
  """

  client_id = os.environ.get("HYDROSHARE_AUTH_CLIENT_ID", "<your_client_id>")
  access_token = os.environ.get("HYDROSHARE_AUTH_TOKEN", "<your_auth_token>")

  token = Token(access_token=access_token, token_type="bearer")
  hs = HydroShare(client_id=client_id, token=token)

  Traceback:

  ---------------------------------------------------------------------------
  ValidationError                           Traceback (most recent call last)
  Cell In[1], line 15
       12 client_id = os.environ.get("HYDROSHARE_AUTH_CLIENT_ID", "<your_client_id>")
       13 access_token = os.environ.get("HYDROSHARE_AUTH_TOKEN", "<your_auth_token>")
  ---> 15 token = Token(access_token=access_token, token_type="bearer")
       16 hs = HydroShare(client_id=client_id, token=token)

  File /opt/conda/envs/birdy/lib/python3.11/site-packages/pydantic/main.py:176, in BaseModel.__init__(self, **data)
      174 # `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks
      175 __tracebackhide__ = True
  --> 176 self.__pydantic_validator__.validate_python(data, self_instance=self)

  ValidationError: 4 validation errors for Token
  scope
    Field required [type=missing, input_value={'access_token': '<your_a... 'token_type': 'bearer'}, input_type=dict]
      For further information visit https://errors.pydantic.dev/2.7/v/missing
  state
    Field required [type=missing, input_value={'access_token': '<your_a... 'token_type': 'bearer'}, input_type=dict]
      For further information visit https://errors.pydantic.dev/2.7/v/missing
  expires_in
    Field required [type=missing, input_value={'access_token': '<your_a... 'token_type': 'bearer'}, input_type=dict]
      For further information visit https://errors.pydantic.dev/2.7/v/missing
  refresh_token
    Field required [type=missing, input_value={'access_token': '<your_a... 'token_type': 'bearer'}, input_type=dict]
      For further information visit https://errors.pydantic.dev/2.7/v/missing
```

<!-- Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [ ] This PR addresses an already opened issue (for bug fixes /
features)
  - This PR fixes #xyz
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [ ] (If applicable) Tests have been added.
- [ ] CHANGELOG.rst has been updated (with summary of main changes).
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added.

### What kind of change does this PR introduce?

* ...

### Does this PR introduce a breaking change?


### Other information:
  • Loading branch information
tlvu authored Feb 14, 2025
2 parents c26ad56 + ab2a1a6 commit 24846b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def rebuild_readme():
".jupyter_cache",
"jupyter_execute",
"notebooks/paper",
"notebooks/HydroShare_integration.ipynb",
"notebooks-notworking",
]

# The name of the Pygments (syntax highlighting) style to use.
Expand Down
File renamed without changes.

0 comments on commit 24846b4

Please sign in to comment.