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 2021/02/05 19:19:05 UTC

[GitHub] [incubator-daffodil-site] tuxji commented on a change in pull request #36: Updates to include latest conventions in the dfdl project layout

tuxji commented on a change in pull request #36:
URL: https://github.com/apache/incubator-daffodil-site/pull/36#discussion_r571192464



##########
File path: site/dfdl-layout.md
##########
@@ -52,50 +52,53 @@ organizing projects so as to achieve the above benefits.
 ### Conventions
 
 Let's assume the DFDL schema contains two files named main.dfdl.xsd, and
-format.dfdl.xsd, and that our format is named RFormat with an organization of
+format.dfdl.xsd, and that our format is named RFormat (rfmt) with an organization of
 example.com.
 
 The standard file tree would be:
 
-    RFormat/
-    ├── src/
-    │   ├── main/
-    │   │   └── resources/
-    │   │       └── com/
-    │   │           └── example/
-    │   │               └── RFormat/
-    │   │                   ├── xsd/
-    │   │                   │   ├── main.dfdl.xsd    - Main DFDL schema file
-    │   │                   │   └── format.dfdl.xsd  - DFDL schema file imported/included from main
-    │   │                   └── xsl/
-    │   │                       └── xforms.xsl       - Resources other than XSD go in other directories
-    │   └── test/
-    │       ├── resources/
-    │       │   └── com/
-    │       │       └── example/
-    │       │           └── RFormat/
-    │       │               └── tests1.tdml    - TDML test files
-    │       └── scala/
-    │           └── com/
-    │               └── example/
-    │                   └── RFormat/
-    │                       └── Tests1.scala   - Scala test driver file
-    ├── project/
-    │   └── build.properties   - Defines the sbt version
+    rfmt /
+    ├── .gitattributes         - Git revision control system 'attributes' (see below)
+    ├── .gitignore             - Git revision control system 'ignore' file (should contain
+    │                            'target' and 'lib_managed' entries)
     ├── build.sbt              - Simple Build Tool (sbt) specification file. Edit to change version
     │                            of Daffodil needed, or versions of other DFDL schemas needed
     ├── README.md              - Documentation about the DFDL schema in Markdown file format
-    ├── .classpath             - Eclipse classpath file (optional)
-    ├── .project               - Eclipse project file (optional)
-    └── .gitignore             - Git revision control system 'ignore' file (should contain
-                                'target' and 'lib_managed' entries)
+    ├── project/
+    │   └── build.properties   - Defines the sbt version
+    └── src/
+        ├── main/
+        │   └── resources/
+        │       └── com/
+        │           └── example/
+        │               └── rfmt /
+        │                   ├── xsd/
+        │                   │   ├── rfmt .dfdl.xsd   - Main DFDL schema file

Review comment:
       Other places in this file still mention `main.dfdl.xsd` instead of `rfmt.dfdl.xsd`.  You'll want to update these other places.  Also, you may want to remove an extraneous space from `rfmt .dfdl.xsd` and change `Main DFDL schema file` to `RFormat DFDL schema file`.

##########
File path: site/dfdl-layout.md
##########
@@ -52,50 +52,53 @@ organizing projects so as to achieve the above benefits.
 ### Conventions
 
 Let's assume the DFDL schema contains two files named main.dfdl.xsd, and

Review comment:
       This line still mentions `main.dfdl.xsd` instead of `rfmt.dfdl.xsd`.

##########
File path: site/dfdl-layout.md
##########
@@ -104,18 +107,33 @@ version := "0.0.1"
 scalaVersion := "2.12.11"
  
 libraryDependencies ++= Seq(
-  "org.apache.daffodil" %% "daffodil-tdml-processor" % "2.6.0" % "test",
+  "org.apache.daffodil" %% "daffodil-tdml-processor" % "3.0.0" % "test",
   "com.novocode" % "junit-interface" % "0.11" % "test",
   "junit" % "junit" % "4.12" % "test",
 )
 
-testOptions in ThisBuild += Tests.Argument(TestFrameworks.JUnit, "-v")
+testOptions += Tests.Argument(TestFrameworks.JUnit, "-v")
 
 crossPaths := false
 ```
 
 Edit the version of daffodil-tdml above to match the version you are using. 
 
+### .gitattributes
+
+In some cases, git may mangle line endings of files so that they match the line
+ending of the system. In most cases, this is done in such a way that it you may
+never notice. However, in cases where file formats require specific line
+endings, this mangling of test data can lead to test failures. To prevent this,
+we recommend that a .gitattributes file be created in the root of the format
+directory with the following content to disabling the mangline:
+
+```
+/src/test/resources/**/data/** text=false

Review comment:
       Why aren't we doing this in our own repo (`incubator-daffodil/.gitattributes`)?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org