Skip to content

Commit

Permalink
Version 1.0 preparation (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben J. Ward authored Aug 11, 2018
1 parent 15accc2 commit 3f58f98
Show file tree
Hide file tree
Showing 14 changed files with 269 additions and 78 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ os:
- linux
- osx
julia:
- 0.6
- 0.7
- 1.0
- nightly
notifications:
email: false
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.0] - 2018-08-11
### Changed
- The first major stable release
- Comaptible with julia v0.7 and 1.0.

## [0.4.1] - 2018-07-10
### Changed
- More compatiblity improvements to julia v0.7.

## [0.4.0] - 2018-03-01
### Changed
- Compatibility changes for julia v0.7.

## [0.3.3] - 2017-06-04
### Added
- Extend `Base.unsafe_read` & `Base.nb_available`.

### Changed
- Fixed a double buffering problem.

## [0.3.2] - 2017-03-13
### Changed
- Bugfix of the `readbytes!` method.

## [0.3.1] - 2017-03-10
### Changed
- Bugfix of the `shiftdata!` method.

## [0.3.0] - 2017-02-07
### Added
- The ability to make buffered data immobile.

### Changed
- Minor code refactors.

## [0.2.3] - 2017-01-18
### Changed
- Fixed lower bound.

## [0.2.2] - 2017-01-17
### Changed
- Bugfixes to takebuf_string methods.

## [0.2.1] - 2017-01-10
### Changed
- Revised takebuf methods, thanks @musm

[Unreleased]: https://github.com/BioJulia/BioCore.jl/compare/v1.3.0...HEAD
[1.0.0]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.4.1...v1.0.0
[0.4.1]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.3.3...v0.4.0
[0.3.3]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.3.2...v0.3.3
[0.3.2]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.2.3...v0.3.0
[0.2.3]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/BioJulia/BufferedStreams.jl/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/BioJulia/BufferedStreams.jl/tree/v0.2.1
18 changes: 18 additions & 0 deletions HUMANS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# The humans responsible for BufferedStreams.jl

## BufferedStreams.jl Maintainers
- Ben J. Ward
- GitHub: [BenJWard](https://github.com/BenJWard)
- Email: [email protected]
- Twitter: @Ward9250

- Kenta Sato
- GitHub: [bicycle1885](https://github.com/bicycle1885)

## Thanks
- Dan Jones
- GitHub: [dcjones](https://github.com/dcjones)

[Full contributors list](https://github.com/BioJulia/BioCore.jl/graphs/contributors)

_Is somebody missing from this file? That won't do! Please file an Issue or PR and let's fix that!_
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 BioJulia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 0 additions & 22 deletions LICENSE.md

This file was deleted.

76 changes: 57 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# BufferedStreams

[![Diagram of locks](https://biojulia.github.io/BufferedStreams.jl/locks.gif)](https://www.pc.gc.ca/eng/lhn-nhs/qc/annedebellevue/natcul/natcul2/b.aspx)

| **Release** | **Documentation** | **Maintainers** |
|:---------------------------------------------------------------:|:-------------------------------------------------------------------------------:|:-------------------------------------------:|
| [![](https://img.shields.io/github/release/BioJulia/BufferedStreams.jl.svg)](https://github.com/BioJulia/BufferedStreams.jl/releases/latest) [![](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BioJulia/BufferedStreams.jl/blob/master/LICENSE) | [![](https://img.shields.io/badge/docs-stable-blue.svg)](https://biojulia.github.io/BufferedStreams.jl/stable) [![](https://img.shields.io/badge/docs-latest-blue.svg)](https://biojulia.github.io/BufferedStreams.jl/latest) | ![](https://img.shields.io/badge/BioJulia%20Maintainer-Ward9250-orange.svg) |
[![](https://img.shields.io/github/release/BioJulia/BufferedStreams.jl.svg?style=flat-square)](https://github.com/BioJulia/BufferedStreams.jl/releases/latest)
[![](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/BioJulia/BufferedStreams.jl/blob/master/LICENSE)
[![](https://img.shields.io/badge/docs-stable-blue.svg?style=flat-square)](https://biojulia.github.io/BufferedStreams.jl/stable)
[![](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://biojulia.github.io/BufferedStreams.jl/latest)
![Lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg?style=flat-square)
[![Chat on Discord](https://img.shields.io/badge/discord-chat-blue.svg?style=flat-square&logo=discord&colorB=%237289DA)](https://discord.gg/z73YNFz)


## Description
Expand All @@ -18,7 +19,7 @@ automatically making incremental reading and writing faster.
```julia
using Pkg
add("BufferedStreams")
# Pkg.add("BufferedStreams") on julia v0.6-
# Pkg.add("BufferedStreams") on julia prior to v0.7
```

If you are interested in the cutting edge of the development, please check out
Expand All @@ -27,21 +28,58 @@ the master branch to try new features before release.

## Testing

BufferedStreams.jl is tested against Julia `0.6` and current `0.7-dev` on Linux, OS X, and Windows.
BufferedStreams is tested against Julia `0.7` and `1.0` on Linux, OS X, and Windows.

| **PackageEvaluator** | **Latest Build Status** |
|:--------------------:|:-----------------------:|
| [![](https://pkg.julialang.org/badges/BufferedStreams_0.7.svg)](https://pkg.julialang.org/detail/BufferedStreams) [![](https://pkg.julialang.org/badges/BufferedStreams_1.0.svg)](https://pkg.julialang.org/detail/BufferedStreams) | [![](https://img.shields.io/travis/BioJulia/BufferedStreams.jl/master.svg?label=Linux+/+macOS)](https://travis-ci.org/BioJulia/BufferedStreams.jl) [![](https://ci.appveyor.com/api/projects/status/0f7jv901adjmp8o7?svg=true)](https://ci.appveyor.com/project/Ward9250/bufferedstreams-jl/branch/master) [![](https://codecov.io/gh/BioJulia/BufferedStreams.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/BufferedStreams.jl) |


## Contributing

We appreciate contributions from users including reporting bugs, fixing
issues, improving performance and adding new features.

Take a look at the [CONTRIBUTING](CONTRIBUTING.md) file provided with
every BioJulia package package for detailed contributor and maintainer
guidelines.


### Financial contributions

We also welcome financial contributions in full transparency on our
[open collective](https://opencollective.com/biojulia).
Anyone can file an expense. If the expense makes sense for the development
of the community, it will be "merged" in the ledger of our open collective by
the core contributors and the person who filed the expense will be reimbursed.


## Backers & Sponsors

Thank you to all our backers and sponsors!

Love our work and community? [Become a backer](https://opencollective.com/biojulia#backer).

[![backers](https://opencollective.com/biojulia/backers.svg?width=890)](https://opencollective.com/biojulia#backers)

| **PackageEvaluator** | **Latest Build Status** |
|:---------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------:|
| [![](https://pkg.julialang.org/badges/BufferedStreams_0.6.svg)](https://pkg.julialang.org/detail/BufferedStreams) [![](https://pkg.julialang.org/badges/BufferedStreams_0.7.svg)](https://pkg.julialang.org/detail/BufferedStreams) | [![](https://img.shields.io/travis/BioJulia/BufferedStreams.jl/master.svg?label=Linux+/+macOS)](https://travis-ci.org/BioJulia/BufferedStreams.jl) [![](https://ci.appveyor.com/api/projects/status/0f7jv901adjmp8o7?svg=true)](https://ci.appveyor.com/project/Ward9250/bufferedstreams-jl/branch/master) [![](https://codecov.io/gh/BioJulia/BufferedStreams.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/BufferedStreams.jl) |
Does your company use BioJulia? Help keep BioJulia feature rich and healthy by
[sponsoring the project](https://opencollective.com/biojulia#sponsor)
Your logo will show up here with a link to your website.

[![](https://opencollective.com/biojulia/sponsor/0/avatar.svg)](https://opencollective.com/biojulia/sponsor/0/website)
[![](https://opencollective.com/biojulia/sponsor/1/avatar.svg)](https://opencollective.com/biojulia/sponsor/1/website)
[![](https://opencollective.com/biojulia/sponsor/2/avatar.svg)](https://opencollective.com/biojulia/sponsor/2/website)
[![](https://opencollective.com/biojulia/sponsor/3/avatar.svg)](https://opencollective.com/biojulia/sponsor/3/website)
[![](https://opencollective.com/biojulia/sponsor/4/avatar.svg)](https://opencollective.com/biojulia/sponsor/4/website)
[![](https://opencollective.com/biojulia/sponsor/5/avatar.svg)](https://opencollective.com/biojulia/sponsor/5/website)
[![](https://opencollective.com/biojulia/sponsor/6/avatar.svg)](https://opencollective.com/biojulia/sponsor/6/website)
[![](https://opencollective.com/biojulia/sponsor/7/avatar.svg)](https://opencollective.com/biojulia/sponsor/7/website)
[![](https://opencollective.com/biojulia/sponsor/8/avatar.svg)](https://opencollective.com/biojulia/sponsor/8/website)
[![](https://opencollective.com/biojulia/sponsor/9/avatar.svg)](https://opencollective.com/biojulia/sponsor/9/website)

## Contributing and Questions

We appreciate contributions from users including reporting bugs, fixing issues,
improving performance and adding new features.
Please go to the [contributing section of the documentation](https://biojulia.net/Contributing/latest)
for more information.
## Questions?

If you have a question about
contributing or using this package, you are encouraged to use the
[Bio category of the Julia discourse
site](https://discourse.julialang.org/c/domain/bio).
If you have a question about contributing or using BioJulia software, come
on over and chat to us on [Discord](https://discord.gg/z73YNFz), or you can try the
[Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.6
julia 0.7
Compat
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
environment:
matrix:
- Julia_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- Julia_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
- Julia_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"

matrix:
Expand Down
1 change: 0 additions & 1 deletion docs/src/index.md

This file was deleted.

85 changes: 85 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# BufferedStreams

[![](https://img.shields.io/github/release/BioJulia/BufferedStreams.jl.svg?style=flat-square)](https://github.com/BioJulia/BufferedStreams.jl/releases/latest)
[![](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/BioJulia/BufferedStreams.jl/blob/master/LICENSE)
[![](https://img.shields.io/badge/docs-stable-blue.svg?style=flat-square)](https://biojulia.github.io/BufferedStreams.jl/stable)
[![](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://biojulia.github.io/BufferedStreams.jl/latest)
![Lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg?style=flat-square)
[![Chat on Discord](https://img.shields.io/badge/discord-chat-blue.svg?style=flat-square&logo=discord&colorB=%237289DA)](https://discord.gg/z73YNFz)


## Description

BufferedStreams provides buffering for IO operations. It can wrap any IO type
automatically making incremental reading and writing faster.


## Installation

```julia
using Pkg
add("BufferedStreams")
# Pkg.add("BufferedStreams") on julia prior to v0.7
```

If you are interested in the cutting edge of the development, please check out
the master branch to try new features before release.


## Testing

BufferedStreams is tested against Julia `0.7` and `1.0` on Linux, OS X, and Windows.

| **PackageEvaluator** | **Latest Build Status** |
|:--------------------:|:-----------------------:|
| [![](https://pkg.julialang.org/badges/BufferedStreams_0.7.svg)](https://pkg.julialang.org/detail/BufferedStreams) [![](https://pkg.julialang.org/badges/BufferedStreams_1.0.svg)](https://pkg.julialang.org/detail/BufferedStreams) | [![](https://img.shields.io/travis/BioJulia/BufferedStreams.jl/master.svg?label=Linux+/+macOS)](https://travis-ci.org/BioJulia/BufferedStreams.jl) [![](https://ci.appveyor.com/api/projects/status/0f7jv901adjmp8o7?svg=true)](https://ci.appveyor.com/project/Ward9250/bufferedstreams-jl/branch/master) [![](https://codecov.io/gh/BioJulia/BufferedStreams.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/BufferedStreams.jl) |


## Contributing

We appreciate contributions from users including reporting bugs, fixing
issues, improving performance and adding new features.

Take a look at the [CONTRIBUTING](https://github.com/BioJulia/BufferedStreams.jl/blob/master/CONTRIBUTING.md) file provided with
every BioJulia package package for detailed contributor and maintainer
guidelines.


### Financial contributions

We also welcome financial contributions in full transparency on our
[open collective](https://opencollective.com/biojulia).
Anyone can file an expense. If the expense makes sense for the development
of the community, it will be "merged" in the ledger of our open collective by
the core contributors and the person who filed the expense will be reimbursed.


## Backers & Sponsors

Thank you to all our backers and sponsors!

Love our work and community? [Become a backer](https://opencollective.com/biojulia#backer).

[![backers](https://opencollective.com/biojulia/backers.svg?width=890)](https://opencollective.com/biojulia#backers)

Does your company use BioJulia? Help keep BioJulia feature rich and healthy by
[sponsoring the project](https://opencollective.com/biojulia#sponsor)
Your logo will show up here with a link to your website.

[![](https://opencollective.com/biojulia/sponsor/0/avatar.svg)](https://opencollective.com/biojulia/sponsor/0/website)
[![](https://opencollective.com/biojulia/sponsor/1/avatar.svg)](https://opencollective.com/biojulia/sponsor/1/website)
[![](https://opencollective.com/biojulia/sponsor/2/avatar.svg)](https://opencollective.com/biojulia/sponsor/2/website)
[![](https://opencollective.com/biojulia/sponsor/3/avatar.svg)](https://opencollective.com/biojulia/sponsor/3/website)
[![](https://opencollective.com/biojulia/sponsor/4/avatar.svg)](https://opencollective.com/biojulia/sponsor/4/website)
[![](https://opencollective.com/biojulia/sponsor/5/avatar.svg)](https://opencollective.com/biojulia/sponsor/5/website)
[![](https://opencollective.com/biojulia/sponsor/6/avatar.svg)](https://opencollective.com/biojulia/sponsor/6/website)
[![](https://opencollective.com/biojulia/sponsor/7/avatar.svg)](https://opencollective.com/biojulia/sponsor/7/website)
[![](https://opencollective.com/biojulia/sponsor/8/avatar.svg)](https://opencollective.com/biojulia/sponsor/8/website)
[![](https://opencollective.com/biojulia/sponsor/9/avatar.svg)](https://opencollective.com/biojulia/sponsor/9/website)


## Questions?

If you have a question about contributing or using BioJulia software, come
on over and chat to us on [Discord](https://discord.gg/z73YNFz), or you can try the
[Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).
8 changes: 1 addition & 7 deletions src/BufferedStreams.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
__precompile__()

module BufferedStreams

Expand All @@ -12,8 +11,6 @@ export BufferedInputStream,
upanchor!,
takeanchored!

using Compat

# default buffer size is 128 KiB
const default_buffer_size = 128 * 2^10

Expand All @@ -25,10 +22,7 @@ function _datasize(nbytes)
k = 1
for suffix in [" KiB", " MiB", " GiB", " TiB"]
if nbytes < 1024^(k+1)
# Note: The base keyword argument is needed until
# https://github.com/JuliaLang/Compat.jl/pull/537 lands or
# Compat is dropped.
return string(Compat.floor(nbytes / 1024^k, digits = 1, base = 10), suffix)
return string(floor(nbytes / 1024^k; digits = 1), suffix)
end
k += 1
end
Expand Down
4 changes: 2 additions & 2 deletions src/bufferedinputstream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ end
end
end

@inline function Base.nb_available(stream::BufferedInputStream)
@inline function Base.bytesavailable(stream::BufferedInputStream)
if eof(stream)
return 0
else
Expand All @@ -118,7 +118,7 @@ end
end

@inline function Base.readavailable(stream::BufferedInputStream)
read(stream, nb_available(stream))
read(stream, bytesavailable(stream))
end

@inline function Base.skip(stream::BufferedInputStream, n_::Integer)
Expand Down
Loading

0 comments on commit 3f58f98

Please sign in to comment.