Skip to content

Commit

Permalink
Upgrade package to 1.6
Browse files Browse the repository at this point in the history
- CI moves from AppVeyor/Travis -> GHA
- Update `make.jl` for newer Documenter.jl versions
- Add Project.toml to package
- Add Project.toml + Manifest.toml to docs
- Extend `Base.peek` instead of exporting
- Update badges
  • Loading branch information
KristofferC committed Jun 15, 2022
1 parent b85ff82 commit 5a9c10e
Show file tree
Hide file tree
Showing 13 changed files with 194 additions and 103 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI
on:
pull_request:
push:
branches: [master]
tags: ['*']
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
include:
- os: windows-latest
version: '1'
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: 4
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Built documentation
docs/build/

# Julia temp files
*.cov
*.mem
Expand All @@ -9,3 +12,5 @@
# OS temp or generated files
.DS_Store
.directory

Manifest.toml
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

12 changes: 12 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name = "BufferedStreams"
uuid = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d"
version = "1.1.0"

[compat]
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# 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)


[![](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)
[![Build Status](https://github.com/BioJulia/BufferedStreams.jl/workflows/CI/badge.svg)](https://github.com/BioJulia/BufferedStreams.jl/actions?query=workflows/CI) [![codecov](https://codecov.io/gh/BioJulia/BufferedStreams.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/BufferedStreams.jl)
[![](https://img.shields.io/badge/docs-stable-blue.svg?style=flat-square)](https://biojulia.github.io/BufferedStreams.jl/stable)
[![Project Status: Inactive](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)
[![Chat on Discord](https://img.shields.io/badge/discord-chat-blue.svg?style=flat-square&logo=discord&colorB=%237289DA)](https://discord.gg/z73YNFz)

Expand All @@ -18,23 +20,12 @@ automatically making incremental reading and writing faster.

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

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
Expand Down
2 changes: 0 additions & 2 deletions REQUIRE

This file was deleted.

42 changes: 0 additions & 42 deletions appveyor.yml

This file was deleted.

103 changes: 103 additions & 0 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.8.0-rc1"
manifest_format = "2.0"
project_hash = "314c8c0d5d781207b79a84bba2324642088c07db"

[[deps.ANSIColoredPrinters]]
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
version = "0.0.1"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.BufferedStreams]]
path = ".."
uuid = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d"
version = "1.0.0"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.6"

[[deps.Documenter]]
deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "f7809f532671564e48cd81627ddcfb1ba670f87d"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.27.19"

[[deps.IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.2"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[deps.JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.3"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.Parsers]]
deps = ["Dates"]
git-tree-sha1 = "1285416549ccfcdf0c50d4997a94331e88d68413"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.3.1"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA", "Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
BufferedStreams = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
9 changes: 4 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using Documenter, BufferedStreams

makedocs(
format = :html,
format = Documenter.HTML(
prettyurls = !("local" in ARGS),
canonical = "https://biojulia.net/BufferedStreams.jl/stable/",
),
sitename = "BufferedStreams",
pages = [
"Home" => "index.md",
Expand All @@ -13,9 +16,5 @@ makedocs(

deploydocs(
repo = "github.com/BioJulia/BufferedStreams.jl.git",
julia = "1.0",
osname = "linux",
target = "build",
deps = nothing,
make = nothing
)
25 changes: 8 additions & 17 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# 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)


[![](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)
[![Build Status](https://github.com/BioJulia/BufferedStreams.jl/workflows/CI/badge.svg)](https://github.com/BioJulia/BufferedStreams.jl/actions?query=workflows/CI) [![codecov](https://codecov.io/gh/BioJulia/BufferedStreams.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/BufferedStreams.jl)
[![](https://img.shields.io/badge/docs-stable-blue.svg?style=flat-square)](https://biojulia.github.io/BufferedStreams.jl/stable)
[![Project Status: Inactive](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)
[![Chat on Discord](https://img.shields.io/badge/discord-chat-blue.svg?style=flat-square&logo=discord&colorB=%237289DA)](https://discord.gg/z73YNFz)


Expand All @@ -18,23 +20,12 @@ automatically making incremental reading and writing faster.

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

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
Expand Down
1 change: 0 additions & 1 deletion src/BufferedStreams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module BufferedStreams

export BufferedInputStream,
BufferedOutputStream,
peek,
peekbytes!,
fillbuffer!,
isanchored,
Expand Down
2 changes: 1 addition & 1 deletion src/bufferedinputstream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ end
"""
Return the next byte from the input stream without advancing the position.
"""
@inline function peek(stream::BufferedInputStream)
@inline function Base.peek(stream::BufferedInputStream)
checkopen(stream)
if stream.position > stream.available
if fillbuffer!(stream) < 1
Expand Down

0 comments on commit 5a9c10e

Please sign in to comment.