tuxji commented on a change in pull request #1:
URL: https://github.com/apache/daffodil-schema.g8/pull/1#discussion_r583134862



##########
File path: src/main/g8/.gitattributes
##########
@@ -0,0 +1,18 @@
+$if(false)$
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+$endif$
+
+/src/test/resources/**/data/** text=false

Review comment:
       You might want to remove the blank line at 17 or move it before line 16 
so that the generated .gitattributes doesn't start with a blank line.  Also, 
should the directory at 18 start with a slash - shouldn't it be a relative path 
(`src/test/resources/**/data/**`)?

##########
File path: src/main/g8/.gitignore
##########
@@ -0,0 +1,18 @@
+$!
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+!$
+
+target

Review comment:
       You might want to remove the blank line at 17 or move it before line 16 
so the generated .gitignore doesn't start with a blank line.

##########
File path: src/test/g8/test
##########
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# make sure the jar is built
+> package
+$ exists target/dfdl-format-0.1.0-SNAPSHOT.jar
+
+# make sure the tests pass
+> test

Review comment:
       If this file is supposed to be a template, I didn't see any file like it 
in the generated project.  Is the sbt test command in 
`.github/workflows/main.yml` supposed to call this file?  

##########
File path: .github/workflows/main.yml
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Daffodil Schema Template CI
+
+on: [push, pull_request]
+
+jobs:
+  test:
+    name: Java ${{ matrix.java_version }}, Scala ${{ matrix.scala_version }}, 
${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        java_version: [ 8, 11, 15 ]
+        scala_version: [ 2.12.11 ]
+        os: [ 'ubuntu-latest' ]
+    runs-on: ${{ matrix.os }}
+
+    steps:
+
+      ############################################################
+      # Setup
+      ############################################################
+
+      - name: Checkout Repository
+        uses: actions/checkout@v2.0.0
+
+      - name: Install Java
+        uses: actions/setup-java@v1
+        with:
+          java-version: ${{ matrix.java_version }}
+
+      ############################################################
+      # Test
+      ############################################################
+
+      - name: Run Rat Check
+        run: sbt ++${{ matrix.scala_version }} ratCheck
+
+      - name: Test
+        run: sbt ++${{ matrix.scala_version }} test

Review comment:
       Is this how the `src/test/g8/test` file gets used?  Might want to change 
name to `name: Run Tests`.
   
   Are you enabling GitHub Actions?  This pull request didn't run any CI job 
after you created it.  

##########
File path: .github/workflows/main.yml
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Daffodil Schema Template CI
+
+on: [push, pull_request]
+
+jobs:
+  test:
+    name: Java ${{ matrix.java_version }}, Scala ${{ matrix.scala_version }}, 
${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        java_version: [ 8, 11, 15 ]
+        scala_version: [ 2.12.11 ]
+        os: [ 'ubuntu-latest' ]

Review comment:
       You can say just `[ ubuntu-latest ]` - the quotes aren't mandatory.

##########
File path: 
src/main/g8/src/test/scala/$package$/$name__camel$/Test$name__Camel$.scala
##########
@@ -0,0 +1,38 @@
+$!
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+!$
+package $package$.$name;format="camel"$
+
+import org.junit.AfterClass
+import org.junit.Test
+
+import org.apache.daffodil.tdml.Runner
+
+object Test$name;format="Camel"$ {
+  lazy val runner = 
Runner("/$package;format="packaged"$/$name;format="camel"$/", 
"Test$name;format="Camel"$.tdml")
+
+  @AfterClass def shutDown {
+    runner.reset
+  }
+}
+
+class Test$name;format="Camel"$ {
+
+  import Test$name;format="Camel"$._
+
+  @Test def test_$name;format="camel"$_01() = { 
runner.runOneTest("test_$name;format="camel"$_01") }

Review comment:
       You may want to give the method a type (`: Unit = {`).

##########
File path: src/main/g8/project/build.properties
##########
@@ -0,0 +1,18 @@
+$!
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+!$
+
+sbt.version=1.3.9

Review comment:
       Ditto about line 17

##########
File path: 
src/main/g8/src/test/resources/$package$/$name__camel$/infosets/test_01.$name__camel$.xml
##########
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+$!
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+!$
+
+<$name;format="camel"$:$name;format="Camel"$ 
xmlns:$name;format="camel"$="urn:$name;format="camel"$" />

Review comment:
       Ditto about blank line at 20.

##########
File path: .github/workflows/main.yml
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Daffodil Schema Template CI
+
+on: [push, pull_request]
+
+jobs:
+  test:
+    name: Java ${{ matrix.java_version }}, Scala ${{ matrix.scala_version }}, 
${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        java_version: [ 8, 11, 15 ]
+        scala_version: [ 2.12.11 ]
+        os: [ 'ubuntu-latest' ]
+    runs-on: ${{ matrix.os }}
+
+    steps:
+
+      ############################################################
+      # Setup
+      ############################################################
+
+      - name: Checkout Repository
+        uses: actions/checkout@v2.0.0

Review comment:
       Why `@v2.0.0` instead of `@v2`?  This prevents the workflow from using 
any later version in the v2 series.

##########
File path: src/main/g8/build.sbt
##########
@@ -0,0 +1,34 @@
+$!
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+!$
+
+name := "dfdl-$name;format="norm"$"

Review comment:
       Ditto about the blank line at 17.

##########
File path: NOTICE
##########
@@ -0,0 +1,5 @@
+Apache Daffodil Schema Template
+Copyright 2021 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

Review comment:
       This NOTICE doesn't mention any specific software - consider removing 
this file or mentioning the giter8 software.

##########
File path: 
src/main/g8/src/test/resources/$package$/$name__camel$/infosets/test_01.$name__camel$.xml
##########
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>

Review comment:
       You might want to remove the unnecessary whitespace character before the 
`?>`.

##########
File path: 
src/main/g8/src/test/scala/$package$/$name__camel$/Test$name__Camel$.scala
##########
@@ -0,0 +1,38 @@
+$!
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+!$
+package $package$.$name;format="camel"$
+
+import org.junit.AfterClass
+import org.junit.Test
+
+import org.apache.daffodil.tdml.Runner
+
+object Test$name;format="Camel"$ {
+  lazy val runner = 
Runner("/$package;format="packaged"$/$name;format="camel"$/", 
"Test$name;format="Camel"$.tdml")
+
+  @AfterClass def shutDown {
+    runner.reset
+  }
+}
+
+class Test$name;format="Camel"$ {
+
+  import Test$name;format="Camel"$._

Review comment:
       Maybe remove blank line at 33?

##########
File path: 
src/main/g8/src/test/scala/$package$/$name__camel$/Test$name__Camel$.scala
##########
@@ -0,0 +1,38 @@
+$!
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+!$
+package $package$.$name;format="camel"$
+
+import org.junit.AfterClass
+import org.junit.Test
+
+import org.apache.daffodil.tdml.Runner
+
+object Test$name;format="Camel"$ {
+  lazy val runner = 
Runner("/$package;format="packaged"$/$name;format="camel"$/", 
"Test$name;format="Camel"$.tdml")
+
+  @AfterClass def shutDown {
+    runner.reset
+  }
+}
+
+class Test$name;format="Camel"$ {
+
+  import Test$name;format="Camel"$._
+
+  @Test def test_$name;format="camel"$_01() = { 
runner.runOneTest("test_$name;format="camel"$_01") }
+  
+}

Review comment:
       Maybe remove blank line at 37?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to