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/13 14:19:24 UTC

[GitHub] [daffodil-schema.g8] stevedlawrence opened a new pull request #3: Add 'namespaced' property to support flat vs deep directory structure

stevedlawrence opened a new pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3


   Defaults to 'no' to use the preferred flat directory structure.


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1013097190


   Ok, I think all comments are addressed, please test and let me know if any other changes are required.


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784796404



##########
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:
       > As long as the TDML file, data subdirectory, and infosets subdirectory are all in the same directory, you shouldn't need any namespace directory names.
   
   Ah, I misunderstood what you were saying. I didn't realize Daffodil looked for data/infoset files relative to the TDML file. Good to know, I'll fix that.




-- 
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



[GitHub] [daffodil-schema.g8] tuxji commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r785009736



##########
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:
       Today's changes look good.
   
   I have more to say about data/infosets test subdirectories.  On one hand, I agree new users may find their names confusing and this template doesn't need test subdirectories.  On the other hand, I just added 4 more test files to 68 test files in Daffodil's own [daffodil-test/src/test/resources/org/apache/daffodil/runtime2](https://github.com/apache/daffodil/tree/main/daffodil-test/src/test/resources/org/apache/daffodil/runtime2) directory. I think it would be a great idea to move the 28 *.dat files into a data subdirectory, the 28 *.dat.xml files into an infosets subdirectory, and leave only the 8 *.dfdl.xsd and 8 *.tdml files in the runtime2 directory in a future PR.  I also could replace 28 .dat filenames in Rat.scala with 1 data filename if a directory or a glob expression can be a filename.  Does that change make sense or not?




-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence merged pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence merged pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3


   


-- 
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



[GitHub] [daffodil-schema.g8] tuxji commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1015623274


   I noticed you updated the workflow.  This raises an interesting question: is it less work to manually sync this repo once or twice a year than to enable Dependabot and Scala Stewart for this repo?  Actually, Dependabot's updates can be scheduled by intervals of  1 month, and Scala Stewart's pull requests can be spaced by intervals of <N> days, so we could limit Dependabot PRs to the first day of each month and Scala Stewart PRs to a few times a year.  Scala Stewart will read a [configuration](https://github.com/scala-steward-org/scala-steward/blob/master/docs/repo-specific-configuration.md) file as well as Dependabot.


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r785030524



##########
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:
       >  I also could replace 28 .dat filenames in Rat.scala with 1 data filename if a directory or a glob expression can be a filename. 
   
   I *think* globs work in the rat excludes list, but I actually kindof like having to manually list files. It's verbose and requires a bit of extra work, but it ensures we know exactly what files are being excluded and that something doesn't slip through the cracks. I think if we standardized on some rule like "all files that cannot include a license and must be excluded must end in .dat.ratexclude" or something, I'd be more fine with just one glob since it's very explicit, but I'm not sure I like that.
   
   Another alternative to avoiding rat excludes is to embed the binary data in the TDML file. Though that does make testing with something like the CLI a bit more difficult though.
   
   Another thought regarding rat exludes, repos created with this template have very different requirements than Daffodil, and generally won't be bound by the Apache license and ASF requirements. In most cases they probably won't even care about running rat. And if they do, they could add a rat excludes for something like "*.ext" if they wanted to glob exclude their test files.




-- 
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



[GitHub] [daffodil-schema.g8] mbeckerle commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1013145964


   Tried it. 
   Fine, but I was surprised that the dummy data and expected infoset files are test_01.myformat and test_01.myformat.xml
   
   Using the format name as an extension in the file-names is unexpected. Most format names will not be suitable for this. E.g. "link16Subset". 
   
   I think the script should ask for a data file suffix with ".dat" as the default
   


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1013154923


   Makes sense, updated to add a new "extension" property which is used when creating the test files.


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1012259303


   Note that the `$if(namespaced.truthy)$FOO$else$.$endif$` pattern says if the namespaced config property is true, then the directory should exist and its name should be FOO (which could also be a template variable). Otherwise, the directory should not exist and any child directories/files become children of the parent.
   
   I also find that it's a little easier to make sense of the new template directory names in tree form:
   ```
   src/main/g8/
   ├── $if(namespaced.truthy)$src$else$.$endif$
   │   ├── $if(namespaced.truthy)$main$else$src$endif$
   │   │   └── $if(namespaced.truthy)$resources$else$.$endif$
   │   │       └── $if(namespaced.truthy)$$package$$else$.$endif$
   │   │           └── $if(namespaced.truthy)$$name__camel$$else$.$endif$
   │   │               └── $if(namespaced.truthy)$xsd$else$.$endif$
   │   │                   └── $name__camel$.dfdl.xsd
   │   └── test
   │       ├── $if(namespaced.truthy)$resources$else$.$endif$
   │       │   └── $if(namespaced.truthy)$$package$$else$.$endif$
   │       │       └── $if(namespaced.truthy)$$name__camel$$else$.$endif$
   │       │           ├── Test$name__Camel$.tdml
   │       │           ├── data
   │       │           │   └── test_01.$name__camel$
   │       │           └── infosets
   │       │               └── test_01.$name__camel$.xml
   │       └── $if(namespaced.truthy)$scala$else$.$endif$
   │           └── $if(namespaced.truthy)$$package$$else$.$endif$
   │               └── $if(namespaced.truthy)$$name__camel$$else$.$endif$
   │                   └── Test$name__Camel$.scala
   ├── README.md
   ├── build.sbt
   ├── default.properties
   └── project
       └── build.properties
   ```


-- 
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



[GitHub] [daffodil-schema.g8] mbeckerle commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784837410



##########
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:
       Add test/**/*.xsd text=auto as well. test diredtory may also contain schema files that are just for testing purposes. 
   




-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1015627768


   I was wondering why everything was out of date, I forgot that config files had to be added to enabled depenabot and scala steward. Yeah, we should just add those config files to enable dependency PR. I don't even mind if it's configred to open a PR as soon as possible rather than once a month. Those PR's are generally pretty easy to review, we have a lot less dependencies in this repo, and the PR's will probably be very similar to ones opened for Daffodil so it would be fresh in our mind.


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784792810



##########
File path: .gitignore
##########
@@ -14,3 +14,4 @@
 # limitations under the License.
 
 target
+.bsp

Review comment:
       We generally try to avoid adding lines to gitignore for things that depend on a users environment (for example what IDE they use). This way we don't have to keep track of all the possible IDE's and were they put their temporary files.
   
   We have a comment in the Daffodil .gitignore that expands on this a bit and reccommends how IDE/OS specific files should be ignored. 
   
   https://github.com/apache/daffodil/blob/main/.gitignore#L16-L22




-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence edited a comment on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence edited a comment on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1013139246


   You can actually test it out it without even checking out my fork, you can point it to the right branch on my github repo:
   ```bash
   sbt new stevedlawrence/daffodil-schema.g8 --branch namespaced-property
   ```
   
   Or to test with a local checkout, you can also run:
   ```
   sbt new file:///path/to/cloned/repo
   ```


-- 
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



[GitHub] [daffodil-schema.g8] mbeckerle commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1013124643


   I checked out your fork. How do I get sbt new to use this checkout, not the one found online?
   


-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784806683



##########
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. 
   
   I think the main reason for seprate data/infoset directories is that it makes the .gitattributes file very easy--anything in the data dir should have `text=false` so that git doesn't do it's silly line-ending CRLF stuff. For example, we have this:
   
   ```
   test/data/** text=false
   ```
   
   I expect that users most likely won't always use `.dat` and will use a specific extension for test data that we can't know about, so we can't use something like this:
   
   ```
   test/*.dat text=false
   ```
   
   And I don't think we can expect users to know to update the .gitattributes file for new extensions, I think most people don't even know it exists.
   
   Though, maybe we can do something like this:
   ```
   test/** text=false
   test/**/*.tdml text=auto
   test/**/*.xml text=auto
   ```
   So everything in the test directory defaults to disabling auto-crlf except for tdml and xml files. This has the downside that if files are added that should have auto-crlf enabled but aren't .tdml or .xml files, then we won't get the expected behavior. But I'm not sure what those files would be, maybe documentation or something? Maybe that's not worth worrying about?




-- 
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784839570



##########
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:
       Good call, done




-- 
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



[GitHub] [daffodil-schema.g8] tuxji commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#discussion_r784476786



##########
File path: .gitignore
##########
@@ -14,3 +14,4 @@
 # limitations under the License.
 
 target
+.bsp

Review comment:
       Should we add some more lines and sort all lines?
   
   ```
   .bloop
   .idea
   .metals
   .vscode
   project/metals.sbt
   target
   ```
   

##########
File path: src/main/g8/build.sbt
##########
@@ -20,14 +20,29 @@ organization := "$package$"
 
 version := "0.1.0-SNAPSHOT"
 
-scalaVersion := "2.12.11"
+scalaVersion := "2.12.15"
 
 libraryDependencies ++= Seq(
   "org.apache.daffodil" %% "daffodil-tdml-processor" % "$daffodil_version$" % "test",
-  "com.novocode" % "junit-interface" % "0.11" % "test",
-  "junit" % "junit" % "4.12" % "test",
+  "com.github.sbt" % "junit-interface" % "0.13.2" % "test",
+  "junit" % "junit" % "4.13.2" % "test",
+  "org.apache.logging.log4j" % "log4j-core" % "2.17.1" % "test",

Review comment:
       Might as well keep all the dependencies sorted alphabetically, right?

##########
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:
       As long as the TDML file, data subdirectory, and infosets subdirectory are all in the same directory, you shouldn't need any namespace directory names.  As I said before, relative-looking filenames are sufficient regardless of which namespace packages the files actually live under:
   
   ```
         <tdml:documentPart type="file">data/test_01.$name;format="camel"$</tdml:documentPart>
   ```

##########
File path: src/main/g8/.gitignore
##########
@@ -15,3 +15,4 @@ $!
 # limitations under the License.
 !$
 target
+.bsp

Review comment:
       Ditto, should we add some more lines and sort all lines?
   
   ```
   .bloop
   .idea
   .metals
   .vscode
   project/metals.sbt
   target
   ```
   




-- 
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



[GitHub] [daffodil-schema.g8] mbeckerle commented on a change in pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [daffodil-schema.g8] stevedlawrence commented on pull request #3: Add 'namespaced' property to support flat vs deep directory structure

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #3:
URL: https://github.com/apache/daffodil-schema.g8/pull/3#issuecomment-1013139246


   You can actually test it out it without even checking out my fork, you can point it to the right branch on my github repo:
   ```bash
   sbt new stevedlawrence/daffodil-schema.g8 --branch namespaced-property
   ```
   
   Or to with a local checkout, you can also run:
   ```
   sbt new file:///path/to/cloned/repo
   ```


-- 
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