Skip to content

Commit

Permalink
Fixed various uncaught clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed Sep 12, 2023
1 parent 0bf233a commit 24a43c8
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Changes in each release are listed below.

## 1.0.1 12-Sep-2023

* Fixed various uncaught clippy lints.

## 1.0.0 07-Sep-2023

* Reverted MSRV to 1.63 for compatibility with manylinux standard.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mwalib"
version = "1.0.0"
version = "1.0.1"
homepage = "https://github.com/MWATelescope/mwalib"
repository = "https://github.com/MWATelescope/mwalib"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mwalib"
version = "1.0.0"
version = "1.0.1"
description = "A library to work with raw data and metadata from the Murchison Widefield Array (MWA)"
readme = "README.md"
requires-python = ">=3.7"
Expand Down
2 changes: 1 addition & 1 deletion src/ffi/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ fn test_set_error_message_buffer_len_too_small() {
#[test]
fn test_mwalib_free_rust_cstring() {
let buffer = CString::new("HELLO WORLD").unwrap();
let buffer_ptr = buffer.into_raw() as *mut i8;
let buffer_ptr = buffer.into_raw();

// into_raw will take garbage collection of the buffer away from rust, so
// some ffi/C code can free it (like below)
Expand Down
2 changes: 1 addition & 1 deletion src/fits_read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Helper functions for reading FITS files.

pub mod error;
pub(crate) mod error;
pub use error::FitsError;

use fitsio::{hdu::*, FitsFile};
Expand Down
27 changes: 11 additions & 16 deletions src/metafits_context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,16 +991,14 @@ impl MetafitsContext {
)?;

// Populate coarse chans from the metafits info.
self.metafits_coarse_chans.extend(
CoarseChannel::populate_coarse_channels(
self.metafits_coarse_chans
.extend(CoarseChannel::populate_coarse_channels(
mwa_version,
&metafits_coarse_chan_vec,
metafits_coarse_chan_width_hz,
None,
None,
)?
.into_iter(),
);
)?);

self.num_metafits_coarse_chans = self.metafits_coarse_chans.len();

Expand All @@ -1025,17 +1023,14 @@ impl MetafitsContext {
mwa_version: MWAVersion,
) -> Result<(), MwalibError> {
// Process the channels based on the gpubox files we have
self.metafits_timesteps.extend(
TimeStep::populate_timesteps(
self,
mwa_version,
self.sched_start_gps_time_ms,
self.sched_duration_ms,
self.sched_start_gps_time_ms,
self.sched_start_unix_time_ms,
)
.into_iter(),
);
self.metafits_timesteps.extend(TimeStep::populate_timesteps(
self,
mwa_version,
self.sched_start_gps_time_ms,
self.sched_duration_ms,
self.sched_start_gps_time_ms,
self.sched_start_unix_time_ms,
));

self.num_metafits_timesteps = self.metafits_timesteps.len();

Expand Down
38 changes: 38 additions & 0 deletions tools/pypi_deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# This image is to provide us with a stable, old platform to build our
# pypi wheels with so we don't rely on newer glibc or other dependencies.
#
# Build this with:
# docker build . -t pypi_deploy:latest
#
# Run this with:
# docker run -it --rm -v $(pwd)/../..:/io pypi_deploy:latest
#
# Once at the prompt, build with:
# maturin build --release --cargo-extra-args="--features python,cfitsio-static,examples" --strip --manylinux 2014
#
# Publish with:
#
#
FROM konstin2/maturin

WORKDIR /
ADD https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1.tar.gz .
RUN tar -xf cmake-3.19.1.tar.gz && \
cd cmake-3.19.1 && \
./bootstrap -- -DCMAKE_USE_OPENSSL=OFF && \
make -j8 install && \
cd .. && \
rm -r cmake*

WORKDIR /io

RUN rustup install 1.63 --no-self-update

RUN rustup default 1.63

RUN rm -rf /io/target

RUN cargo update

ENTRYPOINT ["/bin/bash"]

0 comments on commit 24a43c8

Please sign in to comment.