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

ENH: Don't add a metadata instance with only one object #85

Merged
merged 1 commit into from
Mar 19, 2018

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented Mar 15, 2018

Description

  • If any of the metadata namespaces has one or fewer objects contained, don't bring them to the ipython session.
  • add utility function for counting the metadata namespaces

Motivation and Context

Without this fix, anything in the user's beamline file with an underscore becomes a metadata namespace!

For example, safe_load gets repackaged as safe.load, which is undesirable.

closes #78

How Has This Been Tested?

  • added test for the utility function
  • add check for tst object that I broke, to make sure I didn't break it
  • verified in tstpython

Where Has This Been Documented?

Added to the utils api docs

@ZLLentz ZLLentz requested a review from teddyrendahl March 15, 2018 23:05
@codecov-io
Copy link

codecov-io commented Mar 15, 2018

Codecov Report

Merging #85 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   98.72%   98.74%   +0.02%     
==========================================
  Files          14       14              
  Lines         548      557       +9     
==========================================
+ Hits          541      550       +9     
  Misses          7        7
Impacted Files Coverage Δ
hutch_python/utils.py 97.93% <100%> (+0.16%) ⬆️
hutch_python/load_conf.py 98.48% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f927e5...1a7483f. Read the comment docs.

@ZLLentz ZLLentz merged commit 4ab1d18 into pcdshub:master Mar 19, 2018
@ZLLentz ZLLentz deleted the small-md branch April 12, 2018 23:38
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.

Skip Loading MD Namespaces of Size 1
3 participants