Hammurabi

Latest version: v0.11.1

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

Scan your dependencies

Page 3 of 4

0.7.1

-------------------

Fixed
~~~~~

* Fix recursive directory removal issue
* Fix updating existing pull request issue
* Fix wrong default value in config documentation

Changed
~~~~~~~

* Bump hypothesis to 5.15.1
* Bump toml to 0.10.1
* Bump flake8 to 3.8.1
* Bump pylint to 2.5.2

0.7.0

-------------------

Added
~~~~~

* Implement ``__repr`` and ``__str__`` for ``Law``, ``Rule`` and ``Precondition`` objects
* Add logging related configuration options to customize logging
* Add dictionary parsed rules as a base for YAML and JSON rules
* Extend the documentations by the new dictionary rules
* Add community discord link

Changed
~~~~~~~

* Unify log message styles
* Adjust logging levels
* Use dictionary parsed rules as a base for YAML and JSON rules
* Reduced the method complexity of ``DictValueExists`` and ``DictValueNotExists`` rules
* Reduced the method complexity of ``Rule`` execution
* Reduced the method complexity of ``Law`` execution
* Reduced the method complexity of ``LineExists`` task execution
* Reduced the method complexity of ``SectionExists`` task execution
* Improve ``LineExists`` rule to make sure text can be added at the end of file even the file has no trailing newline
* Bump click to 7.1.2
* Bump pylint to 2.5.0
* Bump pydantic to 1.5.1
* Bump hypothesis to 5.10.4
* Bump jinja2 to 2.11.2
* Bump coverage to 5.1
* Bump gitpython to 3.1.1

Removed
~~~~~~~

* Remove ``criteria`` fields since Hammurabi now supports preconditions and it breaks the API uniformity

0.6.0

-------------------

Added
~~~~~

* New precondition ``IsOwnedBy`` / ``IsNotOwnedBy``
* New precondition ``HasMode`` / ``HasNoMode``
* New precondition ``IsDirectoryExists`` / ``IsDirectoryNotExists``
* New precondition ``IsFileExists`` / ``IsFileNotExists``
* New precondition ``IsLineExists`` / ``IsLineNotExists``
* Add preconditions for ``Law`` class
* Add JSON file support

Changed
~~~~~~~

* Added return value type hint to ``pre_task_hook``
* ``_get_by_selector`` / ``_set_by_selector`` became public methods (``get_by_selector`` / ``set_by_selector``)

0.5.0

-------------------

Fixed
~~~~~

* Add untracked files as well to the index

Removed
~~~~~~~

* Remove lock file creation since it is useless

0.4.0

-------------------

Added
~~~~~

* Added ``Reporter`` and ``JSONReporter`` classes to be able to expose execution results
* Add new config option ``report_name`` to the available settings
* New exception type ``PreconditionFailedError`` indicating that the precondition failed and no need to raise an error

Changed
~~~~~~~

* Make sure children and pipe can be set at the same time
* Simplify yaml key rename logic
* ``SectionRenamed`` not raises error if old section name is not represented but the new one
* ``OptionRenamed`` not raises error if old option name is not represented but the new one
* ``LineReplaced`` not raises error if old line is not represented but the new one
* Remove redundant way of getting rules of a law (https://github.com/gabor-boros/hammurabi/issues/45)
* GitHub mixin now returns the URL of the open PR's URL; if an existing PR found, that PR's URL will be returned
* Pillar prepare its Reporter for report generation
* Pillar has a new argument to set the pillar's reporter easily
* CLI's enforce command now calls the Pillar's prepared Reporter to do the report
* "No changes made by" messages now info logs instead of warnings
* Commit changes only if the Law has passing rules
* If ``PreconditionFailedError`` raised, do not log error messages, log a warning instead
* ``LineExists`` will not raise an exception if multiple targets found, instead it will select the last match as target
* Have better PR description formatting

Fixed
~~~~~

* Fixed a dictionary traversal issue regarding yaml file support
* Fixed "Failed Rules" formatting of PR description by removing ``\xa0`` character
* Fixed no Rule name in PR description if the Law did not change anything issue
* Fixed nested rule indentation PR description markup
* Fixed an issue with ``LineReplaced``, if the input file is empty, raise an exception

0.3.1

-------------------

Fixed
~~~~~

* Make sure the lost ini file fix is back lost by merge conflict resolution

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.