Skip to content

Commit

Permalink
Merge pull request #67 from ryanvolz/pending-release
Browse files Browse the repository at this point in the history
Update for 2.6.10 release
  • Loading branch information
ryanvolz authored Jan 16, 2025
2 parents 8d5ba0a + 434b15e commit 1cd1779
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [email protected]
- [email protected]
github: ryanvolz
num_commits: 573
num_commits: 613
first_commit: 2017-04-07 17:54:29
- name: Frank Lind
email: [email protected]
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,3 @@ jobs:
subject-path: "dist/*"

- uses: pypa/gh-action-pypi-publish@release/v1
with:
# Remember to tell (test-)pypi about this repo before publishing
# Remove this line to publish to PyPI
repository-url: https://test.pypi.org/legacy/
31 changes: 31 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ digital_rf Change Log

.. current developments
v2.6.10
====================

**Added:**

* Building of Python package wheels using `cibuildwheel` has been added as a GitHub Actions workflow, making use of the change in build system (see below).

**Changed:**

* The build system has been updated to use pyproject.toml + scikit-build-core for the Python package, replacing the legacy setup.py + setuptools system of yore. As a result, the CMake build procedure has changed a bit, notably in that building a Python wheel using CMake is no longer supported. Use `python -m build` or an equivalent frontend from the source root to build Python wheels instead. The Python package can still be built and installed as before using CMake, just not as a wheel.
* When reading Digital Metadata, convert numpy object arrays to a list for better interoperability (particularly with GNU Radio's PMT type). Also ensure that arrays of strings have the str type.

**Removed:**

* Python 2 and Python < 3.8 will no longer be supported, and the README and build system has been updated accordingly.
* The dependency on `pytz` has been removed in favor of equivalent functionality now in the Python standard library.

**Fixed:**

* Replace deprecated use of Python datetime's `utcnow()` and `utcfromtimestamp()`.
* Fix CMake so that digital_rf.dll actually gets installed on Windows! This makes the C library usable independent of the Python bindings.
* Fixed `TypeError: unsupported operand type(s) for /: 'int' and 'numpy.longdouble'` issue with gr_digital_rf.digital_rf_channel_source by converting the `int` to a `numpy.uint64` before division.
* Fixed aliased numpy function names for numpy 2.0 compatibility.
* Updated to numpy 2.0's new definition for the copy keyword for np.array() by switching to np.asarray() [as suggested](https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword).

**Authors:**

* Ryan Volz



v2.6.9
====================

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_policy(SET CMP0094 NEW)
if(SKBUILD)
set(digital_rf_VERSION ${SKBUILD_PROJECT_VERSION})
else()
set(digital_rf_VERSION 2.6.9)
set(digital_rf_VERSION 2.6.10)
endif(SKBUILD)
project(digital_rf LANGUAGES C VERSION ${digital_rf_VERSION})

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Citation

If you use Digital RF in a scientific publication, we would appreciate a citation such as the following (BibTeX_):

Volz, R., Rideout, W. C., Swoboda, J., Vierinen, J. P., & Lind, F. D. (2024). Digital RF (Version 2.6.9). MIT Haystack Observatory. Retrieved from https://github.com/MITHaystack/digital_rf
Volz, R., Rideout, W. C., Swoboda, J., Vierinen, J. P., & Lind, F. D. (2025). Digital RF (Version 2.6.10). MIT Haystack Observatory. Retrieved from https://github.com/MITHaystack/digital_rf

.. _BibTeX: bibtex.bib

Expand Down
9 changes: 3 additions & 6 deletions RELEASING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Before making a release, check the following:
* Make sure that all tests pass, locally and through the CI hooks on GitHub
* Increment the library version for ``libdigital_rf`` in `c/include/digital_rf_version.h <c/include/digital_rf_version.h>`_ if there have been any feature additions or breaking changes since the last release

To make a new release, run the ``rever`` command from the package base directory::
To make a new release, switch to a new git branch and run the ``rever`` command from the package base directory::

rever VERSION

Expand All @@ -18,8 +18,5 @@ This will do the following:
* Update the bibtex entry for citing the new release
* Merge and remove files in the 'news' directory to update the changelog
* Run the Python test suite in a Docker container
* Create a git tag for the release
* Push the release tag to Github
* Create a Github release containing a source archive and a list of changes
* Upload the Python source distribution to PyPI
* Submit a pull request to update the conda-forge recipe

From there, make a pull request to the upstream Digital RF repository and merge it if all checks pass. Create a release on the main branch with a tag equal to the version number. This will result in the wheel build CI running and adding artifacts to the release and PyPI.
10 changes: 9 additions & 1 deletion bibtex.bib
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ @comment{
version = {2.6.8}
}}
@software{Digital RF2.6.9,
@comment{@software{Digital RF2.6.9,
author = {Volz, Ryan and Rideout, William C. and Swoboda, John and Vierinen, Juha P. and Lind, Frank D.},
date = {2024-05-23},
title = {Digital RF},
url = {https://github.com/MITHaystack/digital_rf},
version = {2.6.9}
}}
@software{Digital RF2.6.10,
author = {Volz, Ryan and Rideout, William C. and Swoboda, John and Vierinen, Juha P. and Lind, Frank D.},
date = {2025-01-15},
title = {Digital RF},
url = {https://github.com/MITHaystack/digital_rf},
version = {2.6.10}
}
24 changes: 0 additions & 24 deletions news/cibuildwheel.rst

This file was deleted.

23 changes: 0 additions & 23 deletions news/install_dll.rst

This file was deleted.

23 changes: 0 additions & 23 deletions news/longdouble_compat.rst

This file was deleted.

23 changes: 0 additions & 23 deletions news/metadata_read_object_array.rst

This file was deleted.

24 changes: 0 additions & 24 deletions news/numpy20.rst

This file was deleted.

53 changes: 2 additions & 51 deletions rever.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,12 @@ $ACTIVITIES = [
"authors",
"bibtex",
"changelog",
# "tag",
"pytest",
"copy_dist",
# "push_tag",
# "ghrelease",
# "pypi_upload",
]

$VERSION_BUMP_PATTERNS = [
(
"python/CMakeLists.txt",
r"set\(digital_rf_VERSION .*\)",
"CMakeLists.txt",
r"set\(digital_rf_VERSION [0-9\.]*\)",
"set(digital_rf_VERSION $VERSION)",
),
(
Expand Down Expand Up @@ -65,46 +59,3 @@ $BIBTEX_AUTHORS = [

$CHANGELOG_FILENAME = "CHANGELOG.rst"
$CHANGELOG_TEMPLATE = "TEMPLATE.rst"

$DOCKER_APT_DEPS = [
"cmake",
"git",
"libhdf5-dev",
"python3-dateutil",
"python3-dev",
"python3-h5py",
"python3-mako",
"python3-numpy",
"python3-packaging",
"python3-pkgconfig",
"python3-pytest",
"python3-setuptools",
"python3-six",
"python3-tz",
]
$DOCKER_INSTALL_COMMAND = "git clean -fdx && mkdir build-rever && cd build-rever && cmake .. && make && make install && make sdist && cp -a dist $HOME/ && cd .. && rm -rf build-rever"

$PYTEST_COMMAND = "pytest-3"

@rever.activity.activity(deps={"pytest"})
def copy_dist():
"""Copy dist tarballs from install docker container to rever dist directory."""
dist_dir = os.path.join($REVER_DIR, "dist")
if os.path.exists(dist_dir):
xonsh.lib.os.rmtree(dist_dir, force=True)
$install_image = xonsh.tools.expand_path($DOCKER_INSTALL_IMAGE)
$install_container_id = $(docker ps -aq --filter ancestor=$install_image).strip()
docker cp $install_container_id:$DOCKER_HOME/dist $REVER_DIR/
del $install_image
del $install_container_id
copy_dist.requires = {"commands": {"docker": "docker"}}

@rever.activity.activity(deps={"version_bump", "copy_dist"})
def pypi_upload():
"""Uploads packages from the rever dist directory to the Python Package Index."""
$dist_dir = os.path.join($REVER_DIR, "dist")
p = ![twine upload --sign $dist_dir/*]
if p.rtn != 0:
raise RuntimeError("PyPI upload failed!")
del $dist_dir
pypi_upload.requires = {"commands": {"twine": "twine"}}

0 comments on commit 1cd1779

Please sign in to comment.