Repository: jtablesaw/tablesaw
Pull request #542 (2019-06-25 16:10:36)

Update Getting Started section of README
Thanks for contributing.

- [X] Tick to sign-off your agreement to the [Developer Certificate of Origin (DCO) 1.1](https://developercertificate.org)

## Description

The version number was getting outdated. This should make it so that we don't have to update with each release


Patch:
diff --git a/README.md b/README.md
index 2202c873..da30fc38 100644
--- a/README.md
+++ b/README.md
@@ -37,21 +37,23 @@ Tablesaw supports data visualization by providing a wrapper for the Plot.ly Java
 
 ### Getting started
 
-Add tablesaw-core and tablesaw-jsplot to your project: 
+Add tablesaw-core to your project. You can find the version number for the latest release in the [release notes](https://github.com/jtablesaw/tablesaw/releases): 
 
 ```xml
 <dependency>
     <groupId>tech.tablesaw</groupId>
     <artifactId>tablesaw-core</artifactId>
-    <version>0.32.6</version>
-</dependency>
-<dependency>
-    <groupId>tech.tablesaw</groupId>
-    <artifactId>tablesaw-jsplot</artifactId>
-    <version>0.32.6</version>
+    <version>VERSION_NUMBER_GOES_HERE</version>
 </dependency>
 ```
 
+You may also add supporting projects:
+- `tablesaw-beakerx` - for using Tablesaw inside [BeakerX](http://beakerx.com/)
+- `tablesaw-excel` - for using Excel workbooks
+- `tablesaw-html` - for using HTML
+- `tablesaw-json` - for using JSON
+- `tablesaw-jsplot` - for creating charts
+
 ### Documentation and support
 
 * Start here:  https://jtablesaw.github.io/tablesaw/gettingstarted
diff --git a/core/src/main/java/tech/tablesaw/io/Source.java b/core/src/main/java/tech/tablesaw/io/Source.java
index 7b1ba4b9..57f2e052 100644
--- a/core/src/main/java/tech/tablesaw/io/Source.java
+++ b/core/src/main/java/tech/tablesaw/io/Source.java
@@ -15,16 +15,14 @@ import java.util.Scanner;
 
 public class Source {
 
+    // we always have one of these (file, reader, or inputStream)
     protected final File file;
     protected final Reader reader;
     protected final InputStream inputStream;
     protected final Charset charset;
 
     public Source(File file) {
-        this.file = file;
-        this.reader = null;
-        this.inputStream = null;
-        this.charset = Charset.defaultCharset();
+        this(file, Charset.defaultCharset());
     }
 
     public Source(File file, Charset charset) {
@@ -42,10 +40,7 @@ public class Source {
     }
 
     public Source(InputStream inputStream) {
-        this.file = null;
-        this.reader = null;
-        this.inputStream = inputStream;
-        this.charset = Charset.defaultCharset();
+        this(inputStream, Charset.defaultCharset());
     }
 
     public Source(InputStream inputStream, Charset charset) {
diff --git a/core/src/main/java/tech/tablesaw/io/fixed/FixedWidthReadOptions.java b/core/src/main/java/tech/tablesaw/io/fixed/FixedWidthReadOptions.java
index c0a544f5..86cd426b 100644
--- a/core/src/main/java/tech/tablesaw/io/fixed/FixedWidthReadOptions.java
+++ b/core/src/main/java/tech/tablesaw/io/fixed/FixedWidthReadOptions.java
@@ -29,7 +29,6 @@ import java.util.Locale;
 
 public class FixedWidthReadOptions extends ReadOptions {
 
-    // we always have one of these (file, reader, or inputStream)
     private final ColumnType[] columnTypes;
     private final FixedWidthFields columnSpecs;
     private final String lineEnding;
@@ -174,6 +173,10 @@ public class FixedWidthReadOptions extends ReadOptions {
             return this;
         }
 
+        public Builder systemLineEnding() {
+            return lineEnding(System.lineSeparator());
+        }
+
         public Builder padding(char padding) {
             this.padding = padding;
             return this;


Test patch:
diff --git a/core/src/test/java/tech/tablesaw/io/csv/CsvWriterTest.java b/core/src/test/java/tech/tablesaw/io/csv/CsvWriterTest.java
index 0282d27c..1ac52995 100644
--- a/core/src/test/java/tech/tablesaw/io/csv/CsvWriterTest.java
+++ b/core/src/test/java/tech/tablesaw/io/csv/CsvWriterTest.java
@@ -21,7 +21,7 @@ public class CsvWriterTest {
         Table table = Table.create("testTable", colA, colB);
         StringWriter writer = new StringWriter();
         table.write().toWriter(writer, "csv");
-        assertEquals("colA,colB\na,1\nb,2\n", writer.toString());
+        assertEquals("colA,colB\na,1\nb,2\n", writer.toString().replaceAll("\\r\\n", "\n"));
     }
 
 }
diff --git a/core/src/test/java/tech/tablesaw/io/fixed/FixedWidthReaderTest.java b/core/src/test/java/tech/tablesaw/io/fixed/FixedWidthReaderTest.java
index 5f3b2792..9136dfb0 100644
--- a/core/src/test/java/tech/tablesaw/io/fixed/FixedWidthReaderTest.java
+++ b/core/src/test/java/tech/tablesaw/io/fixed/FixedWidthReaderTest.java
@@ -53,7 +53,7 @@ public class FixedWidthReaderTest {
                 .columnTypes(car_types)
                 .columnSpecs(car_fields_specs)
                 .padding('_')
-                .lineEnding("\n")
+                .systemLineEnding()
                 .build()
         );
 
@@ -75,7 +75,7 @@ public class FixedWidthReaderTest {
                 .columnTypes(car_types_with_SKIP)
                 .columnSpecs(car_fields_specs)
                 .padding('_')
-                .lineEnding("\n")
+                .systemLineEnding()
                 .build());
 
         assertEquals(4, table.columnCount());
@@ -92,7 +92,7 @@ public class FixedWidthReaderTest {
                 .columnTypes(car_types_with_SKIP)
                 .columnSpecs(car_fields_specs)
                 .padding('_')
-                .lineEnding("\n")
+                .systemLineEnding()
                 .skipTrailingCharsUntilNewline(true)
                 .build());
 
@@ -110,7 +110,7 @@ public class FixedWidthReaderTest {
                 .header(true)
                 .columnSpecs(car_fields_specs)
                 .padding('_')
-                .lineEnding("\n")
+                .systemLineEnding()
                 .sample(false)
                 .locale(Locale.getDefault())
                 .minimizeColumnSizes()
@@ -129,7 +129,7 @@ public class FixedWidthReaderTest {
                 .header(true)
                 .columnSpecs(car_fields_specs)
                 .padding('_')
-                .lineEnding("\n")
+                .systemLineEnding()
                 .missingValueIndicator("null")
                 .minimizeColumnSizes()
                 .sample(false)
@@ -153,7 +153,7 @@ public class FixedWidthReaderTest {
                 .columnTypes(car_types)
                 .columnSpecs(car_fields_specs)
                 .padding('_')
-                .lineEnding("\n")
+                .systemLineEnding()
                 .skipTrailingCharsUntilNewline(true)
                 .build()
         );