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

Implement human-friendly memory request handling #1397

Merged
merged 2 commits into from
Jul 6, 2016
Merged

Conversation

standage
Copy link
Member

@standage standage commented Jun 30, 2016

Supports raw numbers and scientific notation (as before), but now also supports common suffixes.

  • 1K: 1000 bytes (1 KB)
  • 700m: 700,000,000 bytes (700 MB)
  • 16G: 16,000,000,000 bytes (16 GB)
  • 1.3T: 1,300,000,000,000 bytes (1.3 TB)

Upper- and lower-case single-letter suffixes are supported. I'd prefer to update the documentation after #1396 is merged.


  • Is it mergeable?
  • make test Did it pass the tests?
  • make clean diff-cover If it introduces new functionality in
    scripts/ is it tested?
  • make format diff_pylint_report cppcheck doc pydocstyle Is it well
    formatted?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Is it documented in the ChangeLog?
    http://en.wikipedia.org/wiki/Changelog#Format
  • Was a spellchecker run on the source code and documentation after
    changes were made?
  • Do the changes respect streaming IO? (Are they
    tested for streaming IO?)
  • Is the Copyright year up to date?

@codecov-io
Copy link

codecov-io commented Jun 30, 2016

Current coverage is 90.88%

Merging #1397 into master will increase coverage by 0.01%

@@             master      #1397   diff @@
==========================================
  Files            57         57          
  Lines          7224       7239    +15   
  Methods           0          0          
  Messages          0          0          
  Branches        433        434     +1   
==========================================
+ Hits           6564       6579    +15   
  Misses          594        594          
  Partials         66         66          

Powered by Codecov. Last updated by 1fa14a3...5a94693

try:
multiplier = float(prefix)
return multiplier * suffixes[suffix]
except ValueError:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncovered by test

@ctb
Copy link
Member

ctb commented Jul 4, 2016

Nice work! LGTM once you add test coverage.

@standage
Copy link
Member Author

standage commented Jul 5, 2016

Additional test coverage.

@ctb ctb merged commit 45a5195 into master Jul 6, 2016
@ctb
Copy link
Member

ctb commented Jul 6, 2016

thx!

@ctb ctb deleted the feature/friendlymem branch July 6, 2016 12:03
@ctb ctb restored the feature/friendlymem branch July 6, 2016 12:03
@ctb ctb deleted the feature/friendlymem branch July 6, 2016 12:03
Dmarch28 pushed a commit to Dmarch28/khmer that referenced this pull request Mar 10, 2021
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.

None yet

3 participants