Cole-Greer opened a new pull request, #2781: URL: https://github.com/apache/tinkerpop/pull/2781
This PR is based off of a recent [dev list post regarding changes to strategy construction](https://lists.apache.org/thread/xv235syvzgl06qcsqr0rrx8boch7ozjp) in response to bytecode removal. This PR does not contain any changes related to adapting TraversalStrategyProxy to construct custom strategies, the changes here include fixes to allow TinkerPop provided strategies to be constructed and configured remotely, as well as the addition of feature tests for TinkerPop provided strategies. In general, the feature tests don't have the granularity to verify the strategy is active and functioning correctly. The main intention of these tests is to ensure that the GLVs can use all expected strategies in both `withStrategies()` and `withoutStrategies()` and pass configurations where applicable. For each scenario, I generally tried to use a traversal in which the strategy will have an affect, although in most cases it is not verifiable that the strategy acted as expected. Testing of strategy behaviour is left to the pre-existing unit tests. I would like to extend these tests with scenarios which take advantage of `explain()` once [TINKERPOP-2128](https://issues.apache.org/jira/browse/TINKERPOP-2128) is resolved. Changes included in this PR: 1. Add missing strategies to groovy's core imports, and the grammar's global strategy registry. 2. Update groovy translator to escape '$' in string literals. Unescaped '$' indicates an embedded value in groovy's GString literals. 3. Update python traversalStrategy translator to handle optional `new` in gremlin-lang strategy declaration. eg. `withStrategies(new ReadOnlyStrategy())` as well as `withStrategies(ReadOnlyStrategy())` 4. Change signature of OptionsStrategy in python to be both more pythonic, and bear closer resemblance to gremlin-lang. For example, `OptionsStrategy(options={'myVar': 'myValue'})` has been updated to `OptionsStrategy(myVar='myValue')` 5. Add missing strategies to python's strategies.py Also included is some temporary changes to ElementIdStrategy. This will be reversed in the final version of this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
