Skip to content

Releases: cerbernetix/py-toolbox

0.10.0

01 May 10:05
461f38e
Compare
Choose a tag to compare

Added

  • get_combinations(values, length, start, stop, step, offset, indexes): Computes combinations given a set of values and a length.
  • minmax(*args): Returns with the min and the max value from the given arguments.
  • quantity(quota, total): Gets a quantity with respect to a quota applied to a total.

Changed

  • Add options to JSONFile implementation (sort_keys, skip_keys, ensure_ascii, separators, strict).
  • Set the default CSV dialect to 'excel' when writing (this reflects the default value from the Python library).
  • Set the default CSV dialect to 'auto' when reading (the dialect will be sniffed from the first few rows).

Fixed

  • Fix the link to the documentation in the readme.
  • Inconsistent return value in the log action.
  • Too many branches and returns in the file checker.
  • A few linter issues.
  • Typo in the instructions for the installation in dev mode.

What's Changed

Full Changelog: 0.9.1...0.10.0

0.9.1

27 Oct 07:32
f0f9890
Compare
Choose a tag to compare

Fixed

  • Correct the readme instructions for installing the package.

What's Changed

Full Changelog: 0.9.0...0.9.1

0.9.0

26 Oct 15:59
37e1935
Compare
Choose a tag to compare

Changed

  • Move the package to the cerbernetix namespace.
  • Move the package to the src directory.
  • FileManager.read_file(iterator) - Accepts to return an iterator from read_file() instead of immediately the content.

Added

  • get_combination_rank(combination, offset): Gets the rank of a combination.
  • get_combination_from_rank(rank, length, offset): Gets the combination corresponding to a particular rank.
  • get_cache_path(name, create) - Gets the path to a cache folder.
  • ValueExtractor(entries, mapper) - A tool for extracting values from a set of possible entries.
  • decimal(separator, thousands) - Creates a mapper for casting decimal values to floats.
  • Weekday(day) - Gets the date of a weekday given a particular date.
  • FileManager.create_path() - Creates the parent path of the file.
  • FileManager.check(...) - Tells if the file is valid with respect to the specified criteria.

What's Changed

Full Changelog: 0.8.1...0.9.0

0.8.1

03 Oct 20:35
90144ea
Compare
Choose a tag to compare

Added

  • Script for running the unit tests and presenting the coverage.
  • Script for applying the linter.
  • Script for applying the formatting.

Fixed

  • Correct the dependencies declaration.

What's Changed

Full Changelog: 0.8.0...0.8.1

0.8.0

17 Sep 19:13
0e7f31c
Compare
Choose a tag to compare

Changed

  • Move the tests to a dedicated folder outside of the source code. This will avoid polluting the exports.

Fixed

  • Better default value for the config option mapper (None instead of a default mapper function).

What's Changed

Full Changelog: 0.7.0...0.8.0

0.7.0

14 Sep 20:49
c0c33d5
Compare
Choose a tag to compare

Changed

  • read_pickle_file(...) and PickleFile.read_file() - Can either return a list (default) or an iterator (when the iterator parameter is True).
  • read_csv_file(...) and CSVFile.read_file() - Can either return a list (default) or an iterator (when the iterator parameter is True).
  • read_zip_csv(buffer, ...) - Can either return a list (default) or an iterator (when the iterator parameter is True).

What's Changed

Full Changelog: 0.6.0...0.7.0

0.6.0

14 Sep 14:02
0b21b0b
Compare
Choose a tag to compare

Added

  • fetch_content(url, ...) - Fetch content from a remote HTTP address.
  • read_zip_file(buffer, ...) - Reads a file content from a Zip archive.
  • read_zip_csv(buffer, ...) - Reads a CSV content from a Zip.

What's Changed

Full Changelog: 0.5.1...0.6.0

0.5.1

13 Sep 20:17
52c3c14
Compare
Choose a tag to compare

Changed

  • Increase coverage

Fixed

  • Wrong use of fieldnames=False in CSVFile.write().

What's Changed

Full Changelog: 0.5.0...0.5.1

0.5.0

13 Sep 19:07
aa3d831
Compare
Choose a tag to compare

Added

  • Config - A class for handling a configuration.
  • ConfigOption - A class for handling config options.
  • create_options(options) - Creates config options from a list of descriptors.
  • passthrough(value) - A passthrough mapper. It returns the value as it is.
  • boolean(value) - Converts a value to a boolean value.

What's Changed

Full Changelog: 0.4.0...0.5.0

0.4.0

12 Sep 20:58
aa9e1cd
Compare
Choose a tag to compare

Added

  • TestCase - Extends the default Python TestCase with more assertions.
  • test_cases(cases) - Decorates a test case with parameters.

What's Changed

Full Changelog: 0.3.0...0.4.0