CLI
CLI ¶
InputDirectories ¶
process_argument
staticmethod
¶
Converts CLI input to list of directories over which user-specified data product generator method will be mapped.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arg
|
str
|
Directories or glob string from CLI |
required |
Returns:
Type | Description |
---|---|
List[Path]
|
List of directories over which to map the user-specified product generator |
Source code in src/trendify/CLI.py
NProcs ¶
add_argument
classmethod
¶
add_argument(parser: ArgumentParser)
Defines the argument parsing from command line
Source code in src/trendify/CLI.py
process_argument
staticmethod
¶
process_argument(arg: str)
Type-casts input to int
and caps value at 5*os.cpu_count()
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arg
|
int
|
Desired number of processes |
required |
Returns;
(int): Number of processes capped to 5*os.cpu_count()
Source code in src/trendify/CLI.py
TrendifyDirectory ¶
Source code in src/trendify/CLI.py
process_argument ¶
Converts CLI input to list of directories over which user-specified data product generator method will be mapped.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arg
|
str
|
Directories or glob string from CLI |
required |
Returns:
Type | Description |
---|---|
FileManager
|
List of directories over which to map the user-specified product generator |
Source code in src/trendify/CLI.py
UserMethod ¶
Defines arguments parsed from command line
add_argument
classmethod
¶
add_argument(parser: ArgumentParser)
Defines the argument parsing from command line
Source code in src/trendify/CLI.py
process_argument
staticmethod
¶
process_argument(arg: str) -> ProductGenerator
Imports python method based on user CLI input
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arg
|
str
|
Method to be imported in the form |
required |
Returns:
Type | Description |
---|---|
Callable
|
User-specified method to be mapped over raw data directories. |
Source code in src/trendify/CLI.py
trendify ¶
Defines the command line interface script installed with python package
Source code in src/trendify/CLI.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
|