INCATools / INCATools/ontology-access-kit

Bug/UX: OAK requires internet connection

Open
#234 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
198
Forks
35
Avg merge
3d 4h
Merged PRs (30d)
1

Description

## Overview
I know it's probably almost always the case that someone will have an internet connection when developing/using, but it would be much more reliable / better UX if there were fallbacks in place in case there is no internet connection. In this case, I was coding w/ no connection when this came up.

## Error info
**Error type raised**: `requests.exceptions.ConnectionError: HTTPSConnectionPool()`

**Occurred on:** `import oaklib`

**Full log:** [full log.txt](https://github.com/INCATools/ontology-access-kit/files/9428798/full.log.txt)

**Core part of log:**
```
from oaklib.interfaces.basic_ontology_interface import BasicOntologyInterface
File "...oaklib/interfaces/basic_ontology_interface.py", line 8, in
from oaklib.datamodels.vocabulary import (
File "...oaklib/datamodels/vocabulary.py", line 3, in
from linkml_runtime import CurieNamespace
File "...linkml_runtime/__init__.py", line 2, in
from linkml_runtime.utils.schemaview import SchemaView
File "...linkml_runtime/utils/schemaview.py", line 9, in
from linkml_runtime.utils.namespaces import Namespaces
File "...linkml_runtime/utils/namespaces.py", line 4, in
from prefixcommons import curie_util
```

## Related issues
https://github.com/prefixcommons/prefixcommons-py/issues/25
https://github.com/linkml/linkml/issues/1059

## Possible solutions
We can have `prefixcommons.curie_util` cache whatever it's trying to get remotely and, if there is no current internet connection, it can print a warning to alerting to this fact.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the import chain in oaklib/interfaces/basic_ontology_interface.py and oaklib/datamodels/vocabulary.py, then inspect the related prefixcommons and linkml issues. Determine what remote lookup occurs during import and how its cache or offline fallback should behave. Done means importing oaklib without an internet connection no longer raises the reported ConnectionError and provides an appropriate warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.