CHANGELOG.md in eco-helpers-2.6.4 vs CHANGELOG.md in eco-helpers-2.7.0

- old
+ new

@@ -1,10 +1,136 @@ # Change Log All notable changes to this project will be documented in this file. -## [2.6.4] - 2024-03-xx +## [2.7.0] - 2024-04-xx ### Added + - **support** for node **classifications** on + - `Eco::Data::Locations::NodePlain` + - `Eco::API::Organization::TagTree` + - It `downcase` the classification values + - added class `Eco::API::Organization::NodeClassifications` + - `#node_classifications` method in `session`, `session.config` and in `config.tagtree` + - **validation** helpers via locations base case (`Eco::API::UseCases::GraphQL::Helpers::Location::Base::ClassificationsParser`) + - Use case (**made native**) + - `-tagtree-upload` => `Eco::API::UseCases::Default::Locations::TagtreeUpload` + - it can target specific tree via `-structure-id` cli argument + - it has some **optimizations** such as: + 1. Only backing up the tree once (before) + 2. Not graphql querying the tree as a response of each batch commands request + - Parameter `-file-as-source` for `-tagtree-extract` provided that the case can **convert** input tree csv files into a list of nodes (`Eco::API::UseCases::Default::Locations::TagtreeExtract`) + - **Tagtree UPDATE** case helpers. Added three service modules for quickly building **custom tagtree update cases**. See: + 1. `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeToList` + 2. `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeDiff` + 3. `Eco::API::UseCases::GraphQL::Samples::Location::Command::Service::TreeUpdate` + - `snake_case` helper (at `Eco::Data::Strings::SnakeCase`) + - `camel_case` helper (at `Eco::Data::Strings::CamelCase`) + - `camel_case` helper (at `Eco::Data::Strings::CamelCase`) + - snake vs camel indifferent access helper (at `Eco::Data::Hashes::SnakeCamelIndifferentAccess`) + - **Optimization** helper classes to cluster node diffs: + - `Eco::Data::Locations::NodeDiff::NodesDiff::ClusteredTreeify`: key helper + - `Eco::Data::Locations::NodeDiff::NodesDiff::DiffsTree`: supporting class. + - **consistency** (snake vs camel case) on `parentd` for `Eco::Data::Locations::NodeLevel` + - `Eco::API::UseCases::GraphQL::Utils::Sftp` + - Configurable `remote_folder` + - Made **native** location diffs staged command builders + - These helpers target ONLY location nodes where the `id` are **codes** + - Please notice that composed `id` (i.e. `name - code`) is NOT supported (as there isn't a clean way to update => no batch remap location ids operation available) + - **Added** class and namespaces under `Eco::API::UseCases::GraphQL::Helpers::Location::Command` + - `Diff` + - `Diffs` + - **SFTP Helpers** review + - `Eco::API::Common::Session::SFTP#upload` added method + - `Eco::API::UseCases::GraphQL::Utils::SFTP` + - `#sftp_download_files` added method + - `#local_folder` for downloading the files + - added parameters to the existing methods + +### Changed + - **Parsers** + - Native **date parser**, added _warning_ when date cannot be parsed + - Migrated **select parser** (`Eco::API::Common::People::DefaultParsers::SelectParser`). This change entailed to introduce several changes: + - Added _warning_ when select option is unknown. + - `Eco::API::Common::People::PersonParser`: + 1. methods `#parse` and `#serialize` call to the parser/serializer method by using a block to resolve `Proc` call dependencies. + 2. **added** method `#select_tables` (this has been moved from the _default parsers_ class to the _person parser_ itself) + - `Eco::Language::Models::ParserSerializer` + - methods `#parse` and `#serialize` can be called with a `block` to resolve dependencies. + - `Eco::CSV::Table` the internal method `to_rows_array` was not spliting `Array` values with pipe operator `|`. Made so it does so. + - **Note** that `to_array_of_hashes` (the opposite method) does NOT convert them back to `Array` (but it wasn't converting back the array string to its Array version anyway) + - **renamed** use case `-export-tree` to `-tagtree-extract` + - `Eco::API::UseCases::Default::Locations::TagtreeExtract` + - **Improved** `Eco::Data::Locations::NodeLevel` by adding support for `classifications` and `classification_names` + - It just catches the **original header** names, and uses them + - **Note** that these headers may NOT be actual classifications, but just conventional header names. For this reason, it is **required** that there is a **parse** function that **validates** that they are **actual classifications** + - `Eco::API::Organization::TagTree` + - **changed** `as_json` serialization on **classifications** (it serializes to a `dup` of the `Array` now) - ceased to ~~`join('|')`~~ + - **changed** `as_json`. It now includes `level` (`depth + 1`) + - **Optimized** life cycle of applying commands to _locations structures_ + - This optimization is based on **NOT retrieving** the full locations structure on each request (_apply commands payload block_ on **graphql**). This also entails that the number of **backups** per run is drastically minimized. + - `Eco::API::UseCases::GraphQL::Helpers::Location::Command::DSL` + - **Added** `#batch_tree_track_mode` to define what tracking mode would be used at each commands stage. + - The only stage that tracks/backes-up the tree on each request is now `:id` (or `:id_name`) -> remap location ids _integrity check_ purposes (which is actually somehow redundant; just an additional measure in place). + - `Eco::API::UseCases::GraphQL::Helpers::Location::Command` + - `#sliced_batches` + - **added** parameter `track_tree_mode:` + - **before** final call to `apply_commands`, it scopes the payload `block` of the request (using the new custom method `scope_commands_block`, see below) + - Decoupled re-configurable (**overridable**) methods into `Optimizations` sub-space: `Eco::API::UseCases::GraphQL::Helpers::Location::Command::Optimizations` + - `#default_tree_tracking_mode` the fallback tracking mode (besides `#batch_tree_track_mode` on `DLS`) + - `#scope_commands_block` based on the current tree tracking mode, it scopes what the block for the apply commands payload will be + - `#commands_payload_without_structure_block`: sample graphql payload block that does NOT retrieve the locations structure (**optimization lies here**) + - `Eco::API::UseCases::GraphQL::Samples::Location::Command::Results` + - **Decoupled** tracking of changed ids into `Eco::API::UseCases::GraphQL::Samples::Location::Command::TrackChangedIds` + - `#update_tags_remap_table` -> remove `:move` stage tracking + - As content only has the lowest level location node, moving does **NOT** entail remapping locations any longer (there isn't full path on content at this stage; after `RS P3` release) + - `Eco::Data::Locations::NodeDiff` + - `archived?` added parameter for **validation** (default `true`) + - `attr_expose` + - It adds `_prev` as a postfix (**removed** as a prefix ~~`prev_`~~) + - It uses the question mark `?` alone (**removed** ~~`diff_`~~ prefix) + - **added** all these methods support now `snake_case` + - **BREAKING** change to move onto **RS P3 post-release** + - A change of `name?` **WON'T** trigger a change of `id` (`nodeId`) any more + - For this reason, identification on changes on the `id` will be besides changes of the `name` + - `Eco::Data::Locations::NodeDiff::NodesDiff`- **Important change** on `#diffs` (core property) + - It now discards diffs that `insert?` and `archive?` as well, provided that they do not generate updates + - **Note** that this limiation may be a drawback when we aim to import historical location nodes that should be in the org (for import purposes) but that are not active locations. The way **around it** is to just use an input where the `archived` property is `false` (later on launch those again with `archived` true, but lets do a good input data integrity check here) + - `Eco::Data::Hashes::DiffResult` + - moved `Meta` under its namespace + - created _private_ unique points to access source hashes. This will allows to extend the behaviour from child classes + - **Moved** hash accessors (**DSL**) to `Eco::Data::Hashes::DiffResult::Meta` + - also **added** method `key_present?` + - **improved** `slice_attrs` to return `nil` if `src` isn't present. + - **added** `Array` comparizon via `eq?` method. + - (Class) **Added** named arg `when_present` to `compare` class method. + - (Instance) **Removed** unused method `compared_attrs` + - **Replaced by** `all_compared_attrs` + - (Class) **Added** `compared_attrs_when_present` + - (Instance) **Added** `comparable_attr?`, which based on `all_compared_attrs` (instance method) checks if `attr` is required for presence on both source hashes (`src_1` and `src_2`) + - This is supported by the **new** method `key_present_in_both?` + - (Instance) **Modified** behaviour on `diff_attrs` provided that takes into consideration if an `attr` is **comparable** (`comparable_attr?`) + - upgrade **gems** `ecoportal-api-v2` and `ecoportal-api-graphql` + - this brings some optimizations when treeifying locations structures + - `Eco::Data::Hashes::ArrayDiff` + - **Removed** unused method `compared_attrs` + +### Fixed + - upgrade `ecoportal-api-v2` **gem** + - A bunch of small things on the `Eco::Data::Locations` namespace + - `Eco::API::Session::Config#live_trees` to choose a tree when only one + - `Eco::API::UseCases::GraphQL::Helpers::Location::Base` + - `tagtree_id` method should `map` values rather than `select` keys on `options` + - `Eco::Data::Locations::NodeDiff::NodesDiff` + - fix `diffs_summary` lining + - `Eco::Language::Methods::DslAble` + - explicit behaviour for `respond_to_missing?` (dsl doesn't need to allow method capturing via `method` call) + - add `__FILE__` and `__LINE__` to error backtrace on `eval` + - Parsing `archived` value in + - `Eco::API::Organization::TagTree` + - `Eco::Data::Locations::NodePlain` + +## [2.6.4] - 2024-03-06 + ### Changed - updated core **gem** `ecoportal-api` - The `subordinates` core people property has been removed from the back-end - This was due to some performance issues with org hierarchy model. - As a consequence a temporary patch has been added temporarily in the current gem.