astropy / astropy/astroquery

Add keyring backend to CI

Open
#2,395 0 comments 0 reactions 0 assignees View on GitHub
bug enhancement infrastructure testing
Dominant language
Python
Stars
791
Forks
451
Avg merge
1d 3h
Merged PRs (30d)
4

Description

```
=================================== FAILURES ===================================
______________________________ test_login_keyring ______________________________

patch_get = <_pytest.monkeypatch.MonkeyPatch object at 0x7f3e67ebfdc0>

def test_login_keyring(patch_get):
casda = Casda()
assert casda._authenticated == False
assert casda.USERNAME == ''
> keyring.set_password("astroquery:casda.csiro.au", USERNAME, PASSWORD)

../../.tox/py310-test-alldeps-devdeps-cov/lib/python3.10/site-packages/astroquery/casda/tests/test_casda.py:173:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../.tox/py310-test-alldeps-devdeps-cov/lib/python3.10/site-packages/keyring/core.py:60: in set_password
get_keyring().set_password(service_name, username, password)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
service = 'astroquery:casda.csiro.au', username = 'user', password = 'password'

def get_password(self, service, username, ***
msg = (
"No recommended backend was available. Install a recommended 3rd "
"party backend package; or, install the keyrings.alt package if "
"you want to use the non-recommended backends. See "
"https://pypi.org/project/keyring for details."
)
> raise NoKeyringError(msg)
E keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

../../.tox/py310-test-alldeps-devdeps-cov/lib/python3.10/site-packages/keyring/backends/fail.py:25: NoKeyringError

---------- coverage: platform linux, python 3.10.4-final-0 -----------
```

Contributor guide

Open the contributing guide

Research direction

Start with the CI and dependency configuration, then inspect astroquery/casda/tests/test_casda.py around test_login_keyring and reproduce the shown failure. Done means the CI environment provides a usable keyring backend and test_login_keyring passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.