Skip to content

Commit

Permalink
Release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Feb 6, 2021
1 parent 76e2687 commit a54aa79
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 29 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,25 @@ on:

jobs:

publish-linux:
environment: PyPI
wheel-linux:
runs-on: ubuntu-latest
name: Publish Linux wheels
name: Build Linux wheels
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install build package
run: python -m pip install -U build
- name: Build a source tarball
run: python -m build --sdist --outdir dist
- name: Build manylinux wheels
uses: RalfG/[email protected]
with:
build-requirements: 'setuptools'
- name: Publish distributions to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
- name: Store built wheels
uses: actions/upload-artifact@v2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
name: wheels
path: dist/*

publish-osx:
environment: PyPI
wheel-osx:
runs-on: macos-latest
name: Publish OSX wheels
name: Build OSX wheels
strategy:
matrix:
python-version:
Expand All @@ -45,8 +34,6 @@ jobs:
- 3.7
- 3.8
- 3.9
- pypy-3.6
- pypy-3.7
steps:
- name: Checkout code
uses: actions/checkout@v1
Expand All @@ -55,7 +42,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install build package
run: python -m pip install -U build
run: python -m pip install -U build pip setuptools
- name: Build wheel distribution
run: python -m build --wheel --outdir dist
- name: Store built wheels
Expand Down Expand Up @@ -94,3 +81,4 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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]

[Unreleased]: https://github.com/althonos/iocursor/compare/v1.0.0...HEAD


## [v0.1.0] - 2021-02-06

[v0.1.0]: https://github.com/althonos/iocursor/compare/f47f405...v0.1.0

Initial release.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ inspired by Rust's [`std::io::Cursor`](https://doc.rust-lang.org/std/io/struct.C

[![Actions](https://img.shields.io/github/workflow/status/althonos/iocursor/Test/master?logo=github&style=flat-square&maxAge=300)](https://github.com/althonos/iocursor/actions)
[![Coverage](https://img.shields.io/codecov/c/gh/althonos/iocursor?style=flat-square&maxAge=3600)](https://codecov.io/gh/althonos/iocursor/)
[![PyPI](https://img.shields.io/pypi/v/iocursor.svg?style=flat-square&maxAge=3600)](https://pypi.org/project/iocursor)
[![Python Implementations](https://img.shields.io/pypi/implementation/iocursor.svg?style=flat-square&maxAge=3600&label=impl)](https://pypi.org/project/iocursor/#files)
[![Wheel](https://img.shields.io/pypi/wheel/iocursor.svg?style=flat-square&maxAge=3600)](https://pypi.org/project/iocursor/#files)
[![Python Versions](https://img.shields.io/pypi/pyversions/iocursor.svg?style=flat-square&maxAge=3600)](https://pypi.org/project/iocursor/#files)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&maxAge=2678400)](https://choosealicense.com/licenses/mit/)
[![Source](https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=2678400&style=flat-square)](https://github.com/althonos/iocursor/)
[![GitHub issues](https://img.shields.io/github/issues/althonos/iocursor.svg?style=flat-square&maxAge=600)](https://github.com/althonos/iocursor/issues)
[![Downloads](https://img.shields.io/badge/dynamic/json?style=flat-square&color=303f9f&maxAge=86400&label=downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Fiocursor)](https://pepy.tech/project/iocursor)
[![Changelog](https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=2678400&style=flat-square)](https://github.com/althonos/iocursor/blob/master/CHANGELOG.md)

<!-- [![PyPI](https://img.shields.io/pypi/v/iocursor.svg?style=flat-square&maxAge=3600)](https://pypi.org/project/iocursor) -->
<!-- [![Wheel](https://img.shields.io/pypi/wheel/iocursor.svg?style=flat-square&maxAge=3600)](https://pypi.org/project/iocursor/#files) -->
<!-- [![Python Versions](https://img.shields.io/pypi/pyversions/iocursor.svg?style=flat-square&maxAge=3600)](https://pypi.org/project/iocursor/#files) -->
<!-- [![Python Implementations](https://img.shields.io/pypi/implementation/iocursor.svg?style=flat-square&maxAge=3600&label=impl)](https://pypi.org/project/iocursor/#files) -->
<!-- [![Downloads](https://img.shields.io/badge/dynamic/json?style=flat-square&color=303f9f&maxAge=86400&label=downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Fiocursor)](https://pepy.tech/project/iocursor) -->


## 🗺️ Overview
Expand All @@ -41,12 +41,14 @@ For now, `iocursor` can be installed directly from the GitHub repository:
$ pip install https://github.com/althonos/iocursor/archive/master.zip
```


## 🧶 Thread-safety

`iocursor.Cursor` instances are not thread-safe. Using several `Cursor`
instances with the same backend memory only for reading should be fine.
Use a lock when interfacing otherwise.


## 💡 Examples

- Use `iocursor.Cursor` when you have `bytes` you need to pass to an interface
Expand Down Expand Up @@ -89,6 +91,7 @@ Use a lock when interfacing otherwise.
print(array) # array([1, 2, 3, 4], dtype=int16)
```


## 💭 Feedback

### ⚠️ Issue Tracker
Expand Down
4 changes: 4 additions & 0 deletions iocursor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# coding: utf-8
"""A zero-copy file-like wrapper for Python byte buffers.
"""

import io
import os

from .cursor import Cursor

__author__ = "Martin Larralde <[email protected]>"
__version__ = "0.1.0"
__license__ = "MIT"

io.IOBase.register(Cursor) # type: ignore
io.BufferedIOBase.register(Cursor) # type: ignore
7 changes: 5 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = attr: iocursor.__version__
author = Martin Larralde
author-email = [email protected]
home-page = https://github.com/althonos/iocursor
description = A zero-copy file-like wrapper for byte buffers, inspired by Rust `std::io::Cursor`.
description = A zero-copy file-like wrapper for byte buffers, inspired by Rust's std::io::Cursor.
long-description = file: README.md
long_description_content_type = text/markdown
license = MIT
Expand All @@ -21,18 +21,21 @@ classifiers =
Programming Language :: C
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: PyPy
Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Utilities
Typing :: Typed
project_urls =
Bug Tracker = https://github.com/althonos/iocursor/issues
Changelog = https://github.com/althonos/iocursor/blob/master/CHANGELOG.md
Coverage = https://codecov.io/gh/althonos/iocursor
Builds = https://github.com/althonos/iocursor/actions
[options]
zip_safe = false
Expand Down

0 comments on commit a54aa79

Please sign in to comment.