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

Raise detailed exception for broken citation #7891

Merged
merged 1 commit into from May 3, 2019

Conversation

@nsoranzo
Copy link
Member

nsoranzo commented May 3, 2019

For an empty citation, this will result in logging:

Exception: Invalid citation of type 'doi' with content 'None': 'NoneType' object has no attribute 'strip'

instead of:

AttributeError: 'NoneType' object has no attribute 'strip'

xref galaxyproject/planemo#929

For an empty citation, this will result in logging:
```
Exception: Invalid citation of type 'doi' with content 'None': 'NoneType' object has no attribute 'strip'
```

instead of:
```
AttributeError: 'NoneType' object has no attribute 'strip'
```

xref galaxyproject/planemo#929
@mvdbeek
mvdbeek approved these changes May 3, 2019
@nsoranzo

This comment has been minimized.

Copy link
Member Author

nsoranzo commented May 3, 2019

@jmchilton While working to enhance galaxy/tools/linters/citations.py in galaxy-lib , I noticed that in commit cb9fc09 you added the possibility for a bibtex citation to use a file attribute, but this is not allowed in the XSD and there are no tests for it.
I'm not aware of any tool using this attribute, so should we remove the code allowing it or fix the XSD?

@martenson martenson merged commit a4978e2 into galaxyproject:dev May 3, 2019
7 checks passed
7 checks passed
api test Build finished. 491 tests run, 1 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 218 tests run, 0 skipped, 0 failed.
Details
get_code_and_test Workflow: get_code_and_test
Details
integration test Build finished. 306 tests run, 19 skipped, 0 failed.
Details
selenium test Build finished. 151 tests run, 2 skipped, 0 failed.
Details
toolshed test Build finished. 578 tests run, 0 skipped, 0 failed.
Details
@nsoranzo nsoranzo deleted the nsoranzo:broken_citation_exc branch May 4, 2019
@jmchilton

This comment has been minimized.

Copy link
Member

jmchilton commented May 7, 2019

Hmm... I'm fine with removing the option. Seems undocumented at best.

@nsoranzo

This comment has been minimized.

Copy link
Member Author

nsoranzo commented May 8, 2019

Thanks, I've opened #7911 to remove the attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.