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

Avoid mypy error on adding newGraph from cache to graph #644

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

mvdbeek
Copy link
Contributor

@mvdbeek mvdbeek commented Jan 6, 2023

Fixes:

gxformat2/schema/v19_09.py:167: error: Argument 1 to "__iadd__" of "Graph" has incompatible type "Union[str, Graph, bool]"; expected "Iterable[Tuple[Node, Node, Node]]"  [arg-type]

and should also be a little more helpful when the external schema can't be parsed or fetched (not familiar with the code base, but isn't there a need to be more transparent about this??).

@mvdbeek
Copy link
Contributor Author

mvdbeek commented Jan 6, 2023

As a sidenote,

- http://schema.org/version/9.0/schemaorg-current-http.rdf
does not exist currently, not sure if this should cause a test failure or not. When I missed the try/except around the fetch 4 tests were failing.

@mr-c
Copy link
Member

mr-c commented Jan 6, 2023

As a sidenote,

- http://schema.org/version/9.0/schemaorg-current-http.rdf

does not exist currently, not sure if this should cause a test failure or not. When I missed the try/except around the fetch 4 tests were failing.

Heh, a useful "broken" test file then :-P
Lets rename the file and permanently break the URL
And refresh from https://github.com/common-workflow-library/bio-cwl-tools/blob/release/bamtools/bamtools_stats.cwl for the normal usage.

I'm torn about making the inability to resolve an external a failure or not

Fixes:

```
gxformat2/schema/v19_09.py:167: error: Argument 1 to "__iadd__" of "Graph" has incompatible type "Union[str, Graph, bool]"; expected "Iterable[Tuple[Node, Node, Node]]"  [arg-type]
```
and should also be a little more helpful when the external schema can't
be parsed or fetched (not familiar with the code base, but isn't there a
need to be more transparent about this??).
@mvdbeek
Copy link
Contributor Author

mvdbeek commented Jan 6, 2023

I'm torn about making the inability to resolve an external a failure or not

Maybe something one could dispatch on with a --strict option or similar? Not suggesting this is high priority :).

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #644 (94eaa5d) into main (dc57554) will increase coverage by 0.01%.
The diff coverage is 73.68%.

@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
+ Coverage   83.07%   83.09%   +0.01%     
==========================================
  Files          22       22              
  Lines        4478     4483       +5     
  Branches     1238     1238              
==========================================
+ Hits         3720     3725       +5     
- Misses        487      488       +1     
+ Partials      271      270       -1     
Impacted Files Coverage Δ
schema_salad/ref_resolver.py 86.68% <73.68%> (+0.09%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mr-c mr-c merged commit 9a7c109 into common-workflow-language:main Jan 9, 2023
@mr-c
Copy link
Member

mr-c commented Jan 9, 2023

Thanks @mvdbeek !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants