-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preparing for 1.2.2 and updating versions (#46)
* Update build.yml * Update pyproject.toml Expanding our supported python trove identifiers to include python 3.13 * Update Cargo.toml Updating pyo3 from 0.15 to 0.23 * Update pyproject.toml Moving 3.6 and 3.7 to EOL (since not only they, but even 3.8 are EOL. pyo3 currently does not support abi3-py36, and I'm betting 3.7 is going to follow suit sometime soon.) * Update Cargo.toml abi3-py36 changing to abi3-py38 * Updated a bunch of versions. Pyo3 changed fairly substantially in signature specification for python. Also updated my first name everywhere. * Updating versions, running clippy, yanking the logging nonsense that was never used and never should be used (there have to be better ways than that nonsense), and about to have clippy fix my convention of always using a return statement because I hate implicit returns but that's a me thing not a world thing * More clippy fixes * More clippy suggestions. It's like I never ran this before. * Adding ipython and networkx as dev deps. `cd packages/pyo3 && uv sync && uv run ipython` get you to a reasonable repl for manual testing. I cannot believe I did not do proper python testing here. Maybe I did it in graspologic? * Running cargo fmt * Misspelled repetition, which I have also repetitively done in this commit message alone * Committing some minor changes before I rebase on dev. I forgot the dev/main branching scheme. * Updating the pyproject.toml to be correct as per the current pypa specification. I really hope this doesn't break older versions. * Fixing the changes clippy made to some of the commonmark documentation in the function. Too much was being treated as a quoted paragraph.
- Loading branch information
Showing
33 changed files
with
550 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
fn_args_layout = "vertical" | ||
empty_item_single_line = false | ||
fn_params_layout = "vertical" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
too-many-arguments-threshold=20 # for what it is worth, clippy is absolutely right and pythonic-ness is absolutely wrong | ||
enum-variant-name-threshold=10 # it doesn't like the repetition in "Error" in my export-to-python error types |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
[package] | ||
name = "cli" | ||
version = "0.1.0" | ||
authors = ["Dwayne Pryce <dwpryce@microsoft.com>"] | ||
version = "0.1.1" | ||
authors = ["Dax Pryce <daxpryce@microsoft.com>"] | ||
edition = "2018" | ||
license = "MIT" | ||
description = "CLI Runner for the topologic associated crates (network_partitions and eventually network_automatic_layouts)" | ||
|
||
[dependencies] | ||
clap = "2.34" | ||
clap = "4.5" | ||
rand = "0.8" | ||
rand_xorshift = "0.3" | ||
network_partitions={path = "../network_partitions"} | ||
|
||
[features] | ||
logging = ["network_partitions/logging"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
#![feature(in_band_lifetimes)] | ||
use clap::{App, Arg}; | ||
use clap::{Arg, ArgAction, Command}; | ||
use std::convert::TryFrom; | ||
|
||
mod args; | ||
|
@@ -11,83 +10,82 @@ mod leiden; | |
use crate::args::*; | ||
|
||
fn main() { | ||
let matches = App::new("leiden_cli") | ||
let matches = Command::new("leiden_cli") | ||
.version("0.1.0") | ||
.author("Dwayne Pryce <[email protected]>") | ||
.about("Runs leiden over a provided edge list and outputs the results") | ||
.arg( | ||
Arg::with_name(SOURCE_EDGES) | ||
Arg::new(SOURCE_EDGES) | ||
.help("The edge list that defines the graph's connections") | ||
.required(true) | ||
.index(1), | ||
) | ||
.arg( | ||
Arg::with_name(OUTPUT) | ||
Arg::new(OUTPUT) | ||
.help("The output for the communities detected") | ||
.required(true) | ||
.index(2), | ||
) | ||
.arg( | ||
Arg::with_name(SEPARATOR) | ||
.short("s") | ||
Arg::new(SEPARATOR) | ||
.short('s') | ||
.help("The character to split the edge list on") | ||
.takes_value(true) | ||
.action(ArgAction::Set) | ||
.default_value("\t"), | ||
) | ||
.arg( | ||
Arg::with_name(SOURCE_INDEX) | ||
.takes_value(true) | ||
Arg::new(SOURCE_INDEX) | ||
.action(ArgAction::Set) | ||
.help("0-based index of source column from edge file") | ||
.default_value("0"), | ||
) | ||
.arg( | ||
Arg::with_name(TARGET_INDEX) | ||
.takes_value(true) | ||
Arg::new(TARGET_INDEX) | ||
.action(ArgAction::Set) | ||
.help("0-based index of target column from edge file") | ||
.default_value("1"), | ||
) | ||
.arg( | ||
Arg::with_name(WEIGHT_INDEX) | ||
.takes_value(true) | ||
Arg::new(WEIGHT_INDEX) | ||
.action(ArgAction::Set) | ||
.help("0-based index of weight column from edge file") | ||
) | ||
.arg( | ||
Arg::with_name(SEED) | ||
.takes_value(true) | ||
Arg::new(SEED) | ||
.action(ArgAction::Set) | ||
.help("A seed value to start the PRNG") | ||
.long("seed"), | ||
) | ||
.arg( | ||
Arg::with_name(ITERATIONS) | ||
.takes_value(true) | ||
Arg::new(ITERATIONS) | ||
.action(ArgAction::Set) | ||
.help("Leiden is an inherently recursive algorithm, however it may find itself (due to randomness) at a localized maximum. Setting iterations to a number larger than 1 may allow you to jump out of a local maximum and continue until a better optimum partitioning is found (note that any n > 1 will mean that leiden will be run again for a minimum of n-1 more times, though it may be run for many more than that") | ||
.short("i") | ||
.short('i') | ||
.default_value("1"), | ||
) | ||
.arg( | ||
Arg::with_name(RESOLUTION) | ||
.takes_value(true) | ||
Arg::new(RESOLUTION) | ||
.action(ArgAction::Set) | ||
.help("") | ||
.short("r") | ||
.short('r') | ||
.default_value("1.0") | ||
) | ||
.arg( | ||
Arg::with_name(RANDOMNESS) | ||
.takes_value(true) | ||
Arg::new(RANDOMNESS) | ||
.action(ArgAction::Set) | ||
.help("") | ||
.default_value("1E-2"), | ||
) | ||
.arg( | ||
Arg::with_name(QUALITY) | ||
.takes_value(true) | ||
Arg::new(QUALITY) | ||
.action(ArgAction::Set) | ||
.help("Quality function to use") | ||
.short("q") | ||
.possible_value("modularity") | ||
.possible_value("cpm") | ||
.short('q') | ||
.value_parser(["modularity", "cpm"]) | ||
.default_value("modularity"), | ||
) | ||
.arg( | ||
Arg::with_name(HAS_HEADER) | ||
Arg::new(HAS_HEADER) | ||
.help("Flag must be added if the source file contains a header line") | ||
.long("has_header") | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
[package] | ||
name = "network_partitions" | ||
version = "0.1.0" | ||
authors = ["Dwayne Pryce <dwpryce@microsoft.com>"] | ||
authors = ["Dax Pryce <daxpryce@microsoft.com>"] | ||
edition = "2018" | ||
license = "MIT" | ||
description = "Leiden community detection as per https://arxiv.org/abs/1810.08473" | ||
|
||
[dependencies] | ||
rand = "0.8" | ||
chrono = { version = "0.4", optional = true } | ||
|
||
[dev-dependencies] | ||
rand_xorshift = "0.3" | ||
|
||
[features] | ||
logging = ["chrono"] | ||
debug = [] |
Oops, something went wrong.