You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/01/14 11:51:28 UTC
[GitHub] [daffodil-schema.g8] mbeckerle commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure
mbeckerle commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784783234
##########
File path: src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/Test$name__Camel$.tdml
##########
@@ -26,12 +26,12 @@ limitations under the License.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
defaultRoundTrip="onePass">
- <tdml:parserTestCase name="test_$name;format="camel"$_01" root="$name;format="Camel"$" model="$package;format="packaged"$/$name;format="camel"$/xsd/$name;format="camel"$.dfdl.xsd">
+ <tdml:parserTestCase name="test_$name;format="camel"$_01" root="$name;format="Camel"$" model="$if(namespaced.truthy)$$package;format="packaged"$/$name;format="camel"$/xsd/$endif$$name;format="camel"$.dfdl.xsd">
<tdml:document>
- <tdml:documentPart type="file">$package;format="packaged"$/$name;format="camel"$/data/test_01.$name;format="camel"$</tdml:documentPart>
+ <tdml:documentPart type="file">$if(namespaced.truthy)$$package;format="packaged"$/$name;format="camel"$/$endif$data/test_01.$name;format="camel"$</tdml:documentPart>
</tdml:document>
<tdml:infoset>
- <tdml:dfdlInfoset type="file">$package;format="packaged"$/$name;format="camel"$/infosets/test_01.$name;format="camel"$.xml</tdml:dfdlInfoset>
+ <tdml:dfdlInfoset type="file">$if(namespaced.truthy)$$package;format="packaged"$/$name;format="camel"$/$endif$infosets/test_01.$name;format="camel"$.xml</tdml:dfdlInfoset>
Review comment:
Even this tier of "data" and "infoset" subdir is troublesome to new DFDL users. All tdml, test data, infoset expected, all those files can all just live together in the "test" subdir. They're distinguished by extension.
I am generally opposed to use of data and infosets sub-directories. These things are simply not needed, and if file names are chosen sensibly, those serve the same purpose of reminding the user that there is input data, expected infoset output, and test definitions. E.g.,
foo_data1.dat
foo_expected_infoset1.xml
foo_tests.tdml
foo_tests.scala
Keep in mind the whole word "infoset" is unusual and unexpected to new users. "data" does not necessarily suggest "input data" to a new user. They're just as likely to think the data dir is where the expected output goes.
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org