diff --git a/crates/cli/CHANGELOG.md b/crates/cli/CHANGELOG.md index c48bc46..e4ebaae 100644 --- a/crates/cli/CHANGELOG.md +++ b/crates/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # `moc-cli` Change Log + +## 0.5.2 + +Realeased 2022-09-12 + + ## 0.5.1 Realeased 2022-09-09 diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index f5a2f8a..f68600b 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "moc-cli" -version = "0.5.1" +version = "0.5.2" authors = ["F.-X. Pineau "] description = "Command-line to create and manipulate HEALPix Multi-Order Coverages maps (MOCs)" license = "MIT OR Apache-2.0" diff --git a/crates/set/CHANGELOG.md b/crates/set/CHANGELOG.md index eef4963..118544a 100644 --- a/crates/set/CHANGELOG.md +++ b/crates/set/CHANGELOG.md @@ -1,5 +1,14 @@ # `moc-set` Change Log +## 0.5.2 + +Released 2022-09-12. + +### Bug correction + +* Accept negative number in arguments + + ## 0.5.1 Released 2022-09-09. diff --git a/crates/set/Cargo.toml b/crates/set/Cargo.toml index 5e37e18..fd9a467 100644 --- a/crates/set/Cargo.toml +++ b/crates/set/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "moc-set" -version = "0.5.1" +version = "0.5.2" authors = ["F.-X. Pineau "] description = "command-line tool to build, update and query a persistent set of HEALPix Multi-Order Coverages maps (MOCs)" license = "MIT OR Apache-2.0" diff --git a/crates/set/resources/tests/test.bash b/crates/set/resources/tests/test.bash index ecb5e33..be7b4d6 100755 --- a/crates/set/resources/tests/test.bash +++ b/crates/set/resources/tests/test.bash @@ -33,6 +33,14 @@ query_cone_valid(){ assert_eq "${actual}" "${expected}" "query cone 0.0 +0.0 0.1" } +query_cone_negdec_valid(){ + local cmd="cargo run --release -- query ${mocset} cone 10.0 -12.0 0.1" + local actual=$(${cmd} | tr '\n' ' ' | sed -r 's/ +$//') + local expected="id" + assert_eq "${actual}" "${expected}" "query cone 10.0 -12.0 0.1" +} + + query_cone_valid_prec6(){ local cmd="cargo run --release -- query ${mocset} cone 0.0 +0.0 0.1 --precision 6" local actual=$(${cmd} | tr '\n' ' ' | sed -r 's/ +$//') @@ -105,6 +113,7 @@ list1 query_cone_valid query_cone_valid_with_coverage query_cone_valid_prec6 +query_cone_negdec_valid #cargo run --release list --ranges mocset.bin cargo run --release purge mocset.bin #cargo run --release list --ranges mocset.bin @@ -124,7 +133,8 @@ query_cone_deprecated_withdeprect cargo run --release chgstatus mocset.bin 161 removed query_cone_removed_nodeprec query_cone_removed_withdeprec -cargo run --release append mocset.bin 161 data/CDS_J_ApJ_811_30_table3.fits +cargo run --release append mocset.bin -161 data/CDS_J_ApJ_811_30_table3.fits +cargo run --release chgstatus mocset.bin 161 valid cargo run --release purge mocset.bin query_cone_valid query_cone_valid_with_coverage diff --git a/crates/set/src/append.rs b/crates/set/src/append.rs index 647b904..89be19c 100644 --- a/crates/set/src/append.rs +++ b/crates/set/src/append.rs @@ -29,6 +29,7 @@ use crate::{ }; #[derive(Debug, Parser)] +#[clap(allow_negative_numbers = true)] /// Append the given MOCs to an existing mocset pub struct Append { #[clap(parse(from_os_str))] diff --git a/crates/set/src/query.rs b/crates/set/src/query.rs index ea24104..af7f42c 100644 --- a/crates/set/src/query.rs +++ b/crates/set/src/query.rs @@ -61,7 +61,7 @@ pub struct Query { #[derive(Debug, Parser)] pub enum Region { - #[clap(name = "pos")] + #[clap(name = "pos", allow_negative_numbers = true)] /// Single position. Pos { /// Longitude of the cone center (in degrees) @@ -69,7 +69,7 @@ pub enum Region { /// Latitude of the cone center (in degrees) lat_deg: f64, }, - #[clap(name = "cone")] + #[clap(name = "cone", allow_negative_numbers = true)] /// A cone, i.e. a position with a small area around (approximated by a MOC). Cone { /// Longitude of the cone center (in degrees) diff --git a/crates/wasm/CHANGELOG.md b/crates/wasm/CHANGELOG.md index 8e254b5..8670cb3 100644 --- a/crates/wasm/CHANGELOG.md +++ b/crates/wasm/CHANGELOG.md @@ -1,5 +1,10 @@ # `moc-wasm` Change Log +## 0.5.2 + +Realeased 2022-09-12 + + ## 0.5.1 Realeased 2022-09-09 diff --git a/crates/wasm/Cargo.toml b/crates/wasm/Cargo.toml index 30cccb7..39c6472 100644 --- a/crates/wasm/Cargo.toml +++ b/crates/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "moc-wasm" -version = "0.5.1" +version = "0.5.2" authors = ["F.-X. Pineau "] description = """ WASM library to create and manipulate HEALPix