Word-search-generator

Latest version: v3.5.0

Safety actively analyzes 625951 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

3.5.0

Added

- `save()` method now also supports the `solution` argument for "CSV" and "JSON" formats. This will remove all filler characters from the saved output, leaving only characters from the placed puzzle words. Closes issues 41 and 44.
- Testing for solution highlighting in PDF output
- `cropped_size` property which gives the size (in characters) of a cropped/masked puzzle as a (width, height) tuple

Changed

- Updated testing to use fixtures
- Standardized testing variable names

3.4.1

Fixed

- Solution highlighting on exported PDFs

3.4.0

Fixed

- `Word.offset_coordinates()`
- Secret words correctly obey their directional constraints (by duck57). Fixes issue 42.

Changed

- `show()` method now accepts the `hide_fillers` boolean argument
- `True` will hide all filler characters showing only the placed words (negates `solution=True`)

3.3.0

Added

- New pre-built mask shapes: [Club](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Club), [Fish](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Fish), [Flower](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Flower), and [Spade](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Spade)
- Testing for built-in masks shapes based on known output
- 'tools/build_masks_output_dict.py' tool for generating known built-in shapes output dict for us in testing

Fixed

- During mask generation, each class and subclass now refers to their own `build_mask()` method instead of the base class.
- Incorrect horizontal center calculation for `Spade` and `Club` masks on even sized masks.

Changed

- The `.random_words()` method default to **NOT** resetting the puzzle size.
- Radius calculation for the `RegularPolygon` mask.
- If the `random_words()` method is called on an empty `WordSearch()` object, an appropriate puzzle size is calculated.
- Cleaned up variable naming a bit to make things clear
- cli.py `BUILTIN_SHAPES` -> `BUILTIN_MASK_SHAPES_OBJECTS`
- shapes.py `MASK_SHAPES` -> `BUILTIN_MASK_SHAPES`
- Cleaned up calculation of built-in shape objects
- Cleaned up imports for 'test/__init__.py'
- README and wiki mention puzzle masking.

Removed

- `make_header()` function no longer needed as header is created with f-strings now

3.2.0

Changed

- Moved build system from setup.cfg to pyproject.toml
- Added [ruff](https://github.com/charliermarsh/ruff) to the dev tool set (plus tox, pre-commit)
- Fixed all ruff suggestions
- Moved flake8 settings to .flake8 file since pyproject.toml isn't supported
- Changed 'mode' on CSV and JSON open context managers to 'x' and let that handle any exceptions

Removed

- `export.validate_path()`

3.1.0

Added

- `PuzzleNotGenerated` is raised if a mask is applied to a puzzle that had yet to be generated, either because it doesn't yet have words or doesn't yet have a size.
- `PuzzleSizeError` is now raised if the current puzzle size is smaller than the shortest words in the wordlist.
- Additional tests to keep coverage at 100%.

Changed

- `WordSearch.random_words()` now accepts an "action" argument. This determines whether the random words are added ("ADD") to the current wordlist or replace ("REPLACE") the current wordlist. Defaults to "REPLACE".
- `no_duped_words()` refactored to speed up puzzle generation especially on large puzzles and puzzles with large wordlists.
- `fill_words()` refactored to stop adding words or secret words if placed words > `config.max_puzzle_words`.
- `try_to_fit_word()` refactored to no longer use deepcopy. While trying a new word, all changes are made to the actual puzzle, changes are also tracked in `previous_chars`. If a word ends up not fitting, the function backtracks and reset the puzzle to the `previous_chars`.
- `calc_puzzle_size()` now maxes out at `config.max_puzzle_words` no matter the caculation result.
- Generation tests updated to work with above changes.

Removed

- `no_matching_neighbors()`
- `capture_all_paths_from_position()`

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.