Skip to content

Commit 5f650bc

Browse files
committed
Rename PySoundFile/Soundfile to python-soundfile/soundfile
See #217.
1 parent 0f84929 commit 5f650bc

File tree

9 files changed

+44
-45
lines changed

9 files changed

+44
-45
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
__pycache__/
33
dist/
44
build/
5-
PySoundFile.egg-info/
65
.eggs/
76
*.egg-info/
87
.cache/

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributing
33

44
If you find bugs, errors, omissions or other things that need improvement,
55
please create an issue or a pull request at
6-
https://github.com/bastibe/PySoundFile/.
6+
https://github.com/bastibe/python-soundfile/.
77
Contributions are always welcome!
88

99
Testing

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ met:
1111
notice, this list of conditions and the following disclaimer in
1212
the documentation and/or other materials provided with the
1313
distribution.
14-
* Neither the name of PySoundFile nor the names
14+
* Neither the name of python-soundfile nor the names
1515
of its contributors may be used to endorse or promote products
1616
derived from this software without specific prior written
1717
permission.

README.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
SoundFile
2-
=========
1+
python-soundfile
2+
================
33

44
|version| |python| |status| |license|
55

66
|contributors| |downloads|
77

8-
`SoundFile <https://github.com/bastibe/SoundFile>`__ is an audio
8+
The `soundfile <https://github.com/bastibe/python-soundfile>`__ module is an audio
99
library based on libsndfile, CFFI and NumPy. Full documentation is
10-
available on http://pysoundfile.readthedocs.org/.
10+
available on https://python-soundfile.readthedocs.io/.
1111

12-
SoundFile can read and write sound files. File reading/writing is
12+
The ``soundfile`` module can read and write sound files. File reading/writing is
1313
supported through `libsndfile <http://www.mega-nerd.com/libsndfile/>`__,
1414
which is a free, cross-platform, open-source (LGPL) library for reading
1515
and writing many different sampled sound file formats that runs on many
1616
platforms including Windows, OS X, and Unix. It is accessed through
17-
`CFFI <http://cffi.readthedocs.org/>`__, which is a foreign function
17+
`CFFI <https://cffi.readthedocs.io/>`__, which is a foreign function
1818
interface for Python calling C code. CFFI is supported for CPython 2.6+,
19-
3.x and PyPy 2.0+. SoundFile represents audio data as NumPy arrays.
19+
3.x and PyPy 2.0+. The ``soundfile`` module represents audio data as NumPy arrays.
2020

21-
| SoundFile is BSD licensed (BSD 3-Clause License).
21+
| python-soundfile is BSD licensed (BSD 3-Clause License).
2222
| (c) 2013, Bastian Bechtold
2323
2424

@@ -38,7 +38,7 @@ interface for Python calling C code. CFFI is supported for CPython 2.6+,
3838
Breaking Changes
3939
----------------
4040

41-
SoundFile has evolved rapidly during the last few releases. Most
41+
The ``soundfile`` module has evolved rapidly during the last few releases. Most
4242
notably, we changed the import name from ``import pysoundfile`` to
4343
``import soundfile`` in 0.7. In 0.6, we cleaned up many small
4444
inconsistencies, particularly in the the ordering and naming of
@@ -55,11 +55,11 @@ methods to ``dtype``, using the Numpy ``dtype`` notation. The old
5555
Installation
5656
------------
5757

58-
SoundFile depends on the Python packages CFFI and NumPy, and the
58+
The ``soundfile`` module depends on the Python packages CFFI and NumPy, and the
5959
system library libsndfile.
6060

6161
In a modern Python, you can use ``pip install soundfile`` to download
62-
and install the latest release of SoundFile and its dependencies.
62+
and install the latest release of the ``soundfile`` module and its dependencies.
6363
On Windows and OS X, this will also install the library libsndfile.
6464
On Linux, you need to install libsndfile using your distribution's
6565
package manager, for example ``sudo apt-get install libsndfile1``.
@@ -86,10 +86,10 @@ Read/Write Functions
8686
--------------------
8787

8888
Data can be written to the file using `soundfile.write()`, or read from
89-
the file using `soundfile.read()`. SoundFile can open all file formats
89+
the file using `soundfile.read()`. The ``soundfile`` module can open all file formats
9090
that `libsndfile supports
9191
<http://www.mega-nerd.com/libsndfile/#Features>`__, for example WAV,
92-
FLAC, OGG and MAT files (see `Known Issues <https://github.com/bastibe/SoundFile#known-issues>`__ below about writing OGG files).
92+
FLAC, OGG and MAT files (see `Known Issues <https://github.com/bastibe/python-soundfile#known-issues>`__ below about writing OGG files).
9393

9494
Here is an example for a program that reads a wave file and copies it
9595
into an FLAC file:
@@ -117,14 +117,14 @@ file:
117117
rms = [np.sqrt(np.mean(block**2)) for block in
118118
sf.blocks('myfile.wav', blocksize=1024, overlap=512)]
119119
120-
SoundFile Objects
121-
-----------------
120+
``SoundFile`` Objects
121+
---------------------
122122

123123
Sound files can also be opened as `SoundFile` objects. Every
124-
SoundFile has a specific sample rate, data format and a set number of
124+
`SoundFile` has a specific sample rate, data format and a set number of
125125
channels.
126126

127-
If a file is opened, it is kept open for as long as the SoundFile
127+
If a file is opened, it is kept open for as long as the `SoundFile`
128128
object exists. The file closes when the object is garbage collected,
129129
but you should use the `SoundFile.close()` method or the
130130
context manager to close the file explicitly:
@@ -147,7 +147,7 @@ channels in the file.
147147
RAW Files
148148
---------
149149

150-
Pysoundfile can usually auto-detect the file type of sound files. This
150+
`soundfile.read()` can usually auto-detect the file type of sound files. This
151151
is not possible for RAW files, though:
152152

153153
.. code:: python
@@ -167,7 +167,7 @@ cases, a more expressive format is better and should be used instead.
167167
Virtual IO
168168
----------
169169

170-
If you have an open file-like object, Pysoundfile can open it just like
170+
If you have an open file-like object, `soundfile.read()` can open it just like
171171
regular files:
172172

173173
.. code:: python
@@ -197,7 +197,7 @@ For Python 2.x support, replace the third line with:
197197
Known Issues
198198
------------
199199

200-
Writing to OGG files can result in empty files with certain versions of libsndfile. See `#130 <https://github.com/bastibe/SoundFile/issues/130>`__ for news on this issue.
200+
Writing to OGG files can result in empty files with certain versions of libsndfile. See `#130 <https://github.com/bastibe/python-soundfile/issues/130>`__ for news on this issue.
201201

202202
News
203203
----

doc/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ qthelp:
8585
@echo
8686
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8787
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PySoundFile.qhcp"
88+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-soundfile.qhcp"
8989
@echo "To view the help file:"
90-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PySoundFile.qhc"
90+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-soundfile.qhc"
9191

9292
devhelp:
9393
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
9494
@echo
9595
@echo "Build finished."
9696
@echo "To view the help file:"
97-
@echo "# mkdir -p $$HOME/.local/share/devhelp/PySoundFile"
98-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PySoundFile"
97+
@echo "# mkdir -p $$HOME/.local/share/devhelp/python-soundfile"
98+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/python-soundfile"
9999
@echo "# devhelp"
100100

101101
epub:

doc/conf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33
#
4-
# PySoundFile documentation build configuration file, created by
4+
# python-soundfile documentation build configuration file, created by
55
# sphinx-quickstart on Sun Sep 21 19:26:48 2014.
66
#
77
# This file is execfile()d with the current directory set to its
@@ -56,7 +56,7 @@
5656
master_doc = 'index'
5757

5858
# General information about the project.
59-
project = 'PySoundFile'
59+
project = 'python-soundfile'
6060
copyright = '2015, Bastian Bechtold, Matthias Geier'
6161

6262
# The version info for the project you're documenting, acts as replacement for
@@ -193,7 +193,7 @@
193193
#html_file_suffix = None
194194

195195
# Output file base name for HTML help builder.
196-
htmlhelp_basename = 'PySoundFiledoc'
196+
htmlhelp_basename = 'python-soundfile-doc'
197197

198198

199199
# -- Options for LaTeX output ---------------------------------------------
@@ -213,7 +213,7 @@
213213
# (source start file, target name, title,
214214
# author, documentclass [howto, manual, or own class]).
215215
latex_documents = [
216-
('index', 'PySoundFile.tex', 'PySoundFile Documentation',
216+
('index', 'python-soundfile.tex', 'python-soundfile Documentation',
217217
'Bastian Bechtold, Matthias Geier', 'howto'),
218218
]
219219

@@ -243,7 +243,7 @@
243243
# One entry per manual page. List of tuples
244244
# (source start file, name, description, authors, manual section).
245245
man_pages = [
246-
('index', 'pysoundfile', 'PySoundFile Documentation',
246+
('index', 'python-soundfile', 'python-soundfile Documentation',
247247
['Bastian Bechtold, Matthias Geier'], 1)
248248
]
249249

@@ -257,8 +257,8 @@
257257
# (source start file, target name, title, author,
258258
# dir menu entry, description, category)
259259
texinfo_documents = [
260-
('index', 'PySoundFile', 'PySoundFile Documentation',
261-
'Bastian Bechtold, Matthias Geier', 'PySoundFile', 'One line description of project.',
260+
('index', 'python-soundfile', 'python-soundfile Documentation',
261+
'Bastian Bechtold, Matthias Geier', 'python-soundfile', 'One line description of project.',
262262
'Miscellaneous'),
263263
]
264264

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ def get_tag(self):
8686
cmdclass['bdist_wheel'] = bdist_wheel_half_pure
8787

8888
setup(
89-
name='SoundFile',
89+
name='soundfile',
9090
version='0.10.3post1',
9191
description='An audio library based on libsndfile, CFFI and NumPy',
9292
author='Bastian Bechtold',
9393
author_email='basti@bastibe.de',
94-
url='https://github.com/bastibe/SoundFile',
94+
url='https://github.com/bastibe/python-soundfile',
9595
keywords=['audio', 'libsndfile'],
9696
py_modules=['soundfile'],
9797
packages=packages,

soundfile.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
"""SoundFile is an audio library based on libsndfile, CFFI and NumPy.
1+
"""python-soundfile is an audio library based on libsndfile, CFFI and NumPy.
22
33
Sound files can be read or written directly using the functions
44
`read()` and `write()`.
55
To read a sound file in a block-wise fashion, use `blocks()`.
66
Alternatively, sound files can be opened as `SoundFile` objects.
77
8-
For further information, see http://pysoundfile.readthedocs.org/.
8+
For further information, see https://python-soundfile.readthedocs.io/.
99
1010
"""
1111
__version__ = "0.10.3"
@@ -428,7 +428,7 @@ def __repr__(self):
428428

429429

430430
def info(file, verbose=False):
431-
"""Returns an object with information about a SoundFile.
431+
"""Returns an object with information about a `SoundFile`.
432432
433433
Parameters
434434
----------
@@ -520,7 +520,7 @@ class SoundFile(object):
520520
"""A sound file.
521521
522522
For more documentation see the __init__() docstring (which is also
523-
used for the online documentation (http://pysoundfile.readthedocs.org/).
523+
used for the online documentation (https://python-soundfile.readthedocs.io/).
524524
525525
"""
526526

@@ -715,7 +715,7 @@ def __getattr__(self, name):
715715

716716
def __len__(self):
717717
# Note: This is deprecated and will be removed at some point,
718-
# see https://github.com/bastibe/SoundFile/issues/199
718+
# see https://github.com/bastibe/python-soundfile/issues/199
719719
return self._info.frames
720720

721721
def __bool__(self):
@@ -1514,11 +1514,11 @@ def _has_virtual_io_attrs(file, mode_int):
15141514

15151515

15161516
class SoundFileError(Exception):
1517-
"""Base class for all SoundFile-specific errors."""
1517+
"""Base class for all soundfile-specific errors."""
15181518
pass
15191519

15201520
class SoundFileRuntimeError(SoundFileError, RuntimeError):
1521-
"""SoundFile runtime error.
1521+
"""soundfile module runtime error.
15221522
15231523
Errors that used to be `RuntimeError`."""
15241524
pass

tests/test_pysoundfile.py renamed to tests/test_soundfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,8 @@ def test_read_into_out_over_end_with_fill_should_return_full_data_and_write_into
751751
assert np.all(data[2:] == 0)
752752
assert out.shape == (4, sf_stereo_r.channels)
753753

754-
def test_concurren_open_error_reporting(file_inmemory):
755-
# Test that no sf_open errors are missed when pysoundfile is used
754+
def test_concurrent_open_error_reporting(file_inmemory):
755+
# Test that no sf_open errors are missed when used
756756
# concurrently (there are race conditions in libsndfile's error reporting).
757757

758758
n_threads = 4

0 commit comments

Comments
 (0)