You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the pre-release review. Breaking changes are cheap now (0.x, nothing published) and expensive after; decide each before dotnet pack goes to nuget.org.
Blockers
One exception model with a library base type. Today the same bad plan is ArgumentException from TabularExtractor.Start and TabularStructureException from TabularImporter.Import(Stream…); corrupt files and exceeded ceilings are BCL InvalidDataException; malformed XML leaks XmlException. Proposal: TabularException → TabularFormatException (unreadable/unsupported/corrupt, with a code), TabularLimitException (a bound was hit — which one), TabularStructureException (whole-run fault, with a code), MappingPlanException (carries the MappingFaults). Keep ArgumentException for programmer errors only.
Fewer namespaces. Seven today (Abstractions, Csv, Xlsx, Analysis, Mapping, Extraction, Import); the documented import needs five usings and ~15 types. Proposal: the workflow in TriasDev.Tabular, format-specific cursors/options in .Csv / .Xlsx.
High
Internalise implementation types: ColumnProfiler, DistinctBudget, HypothesisBuilder, CsvDialectDetector (add InternalsVisibleTo for tests where needed).
Public error-code constants (ErrorCodes.ValueRequired = "value.required", …) so callers stop copying strings; keep ErrorCodeCatalogTests checking them against the guide.
A plan without a UI: e.g. MappingPlan.ByHeader(schema, profile, …) matching headers to field names (case/space/underscore-insensitive), filling SourceHeader from the profile. Needed for a 15-line happy path.
Unsupported formats: TabularFormat has no way to say "not a format we read"; TabularFile.Detect/Open should recognise OLE2 (.xls), xlsb, ods (for now), and non-text binaries and throw the format exception.
Stream ownership / leaveOpen is inconsistent: Import(Stream…) always closes, ExtractionSession is IDisposable but owns nothing, TabularFile.Open cannot pass cursor options. One rule for every entry point.
Cancellation token placement: captured at construction in some layers, per call in others (cursor ReadRow, analyzer). Pick one convention.
ITabularCursor contract: versioning story for a public interface (default members), and put the csv dialect somewhere other than a CsvCursor cast.
Medium
Culture spelled three ways ("", "invariant", null) across profile, hypotheses and plan — a top hypothesis's culture cannot be copied into a plan as is.
Entry points differ per layer (new TabularAnalyzer(opts).Analyze vs static TabularExtractor.Start vs static TabularImporter.Import); align verbs and shapes.
ImportRun<T> is an IEnumerable that can be enumerated once; make that explicit (or not an IEnumerable) and even out InChunks/All naming.
PrecheckFinding.Detail is English prose; MappingFault, RowError, PrecheckFinding are three shapes for "a problem" — align fields (code, field, column, row, rows affected, values).
Generic names that collide in consumer code: TextField, DateField, Pattern, Rule.
Options records validate nothing (negative bounds, empty cultures) and cannot be reached from TabularFile.Open.
CsvDialect override is all-or-nothing (must restate encoding + delimiter + provenance to change one).
Cheap single-sheet analysis, sheet addressing by name, sheet visibility (docs/IDEAS.md).
Low
Row counters are int in six places and long in one — pick long or document the int ceiling.
FileProfile.Diagnostics / ImportRun.Summary expose live mutable objects.
Records with collection/delegate members get reference equality (TargetField, ColumnBinding, Pattern, AllowedValues) — seal equality semantics or use classes.
Fluent naming (Matching/AtLeast) vs constraint names (Pattern/MinValue); range rules silently no-op on non-numeric fields.
Pattern matches anywhere in the value (unanchored) — document or anchor.
After v1 (additive): async/IAsyncEnumerable import for blob streams, analyse-by-path, raw preview grid, IDataReader interop.
Tooling to lock the result in: Microsoft.CodeAnalysis.PublicApiAnalyzers (PublicAPI.Shipped/Unshipped.txt) and package validation — see #3.
From the pre-release review. Breaking changes are cheap now (0.x, nothing published) and expensive after; decide each before
dotnet packgoes to nuget.org.Blockers
ArgumentExceptionfromTabularExtractor.StartandTabularStructureExceptionfromTabularImporter.Import(Stream…); corrupt files and exceeded ceilings are BCLInvalidDataException; malformed XML leaksXmlException. Proposal:TabularException→TabularFormatException(unreadable/unsupported/corrupt, with a code),TabularLimitException(a bound was hit — which one),TabularStructureException(whole-run fault, with a code),MappingPlanException(carries theMappingFaults). KeepArgumentExceptionfor programmer errors only.usings and ~15 types. Proposal: the workflow inTriasDev.Tabular, format-specific cursors/options in.Csv/.Xlsx.High
ColumnProfiler,DistinctBudget,HypothesisBuilder,CsvDialectDetector(addInternalsVisibleTofor tests where needed).ErrorCodes.ValueRequired = "value.required", …) so callers stop copying strings; keepErrorCodeCatalogTestschecking them against the guide.MappingPlan.ByHeader(schema, profile, …)matching headers to field names (case/space/underscore-insensitive), fillingSourceHeaderfrom the profile. Needed for a 15-line happy path.TabularFormathas no way to say "not a format we read";TabularFile.Detect/Openshould recognise OLE2 (.xls), xlsb, ods (for now), and non-text binaries and throw the format exception.leaveOpenis inconsistent:Import(Stream…)always closes,ExtractionSessionisIDisposablebut owns nothing,TabularFile.Opencannot pass cursor options. One rule for every entry point.ReadRow, analyzer). Pick one convention.ITabularCursorcontract: versioning story for a public interface (default members), and put the csv dialect somewhere other than aCsvCursorcast.Medium
"","invariant",null) across profile, hypotheses and plan — a top hypothesis's culture cannot be copied into a plan as is.new TabularAnalyzer(opts).Analyzevs staticTabularExtractor.Startvs staticTabularImporter.Import); align verbs and shapes.ImportRun<T>is anIEnumerablethat can be enumerated once; make that explicit (or not anIEnumerable) and even outInChunks/Allnaming.PrecheckFinding.Detailis English prose;MappingFault,RowError,PrecheckFindingare three shapes for "a problem" — align fields (code, field, column, row, rows affected, values).TextField,DateField,Pattern,Rule.TabularFile.Open.CsvDialectoverride is all-or-nothing (must restate encoding + delimiter + provenance to change one).Low
intin six places andlongin one — picklongor document theintceiling.FileProfile.Diagnostics/ImportRun.Summaryexpose live mutable objects.TargetField,ColumnBinding,Pattern,AllowedValues) — seal equality semantics or use classes.Matching/AtLeast) vs constraint names (Pattern/MinValue); range rules silently no-op on non-numeric fields.Patternmatches anywhere in the value (unanchored) — document or anchor.IAsyncEnumerableimport for blob streams, analyse-by-path, raw preview grid,IDataReaderinterop.Tooling to lock the result in:
Microsoft.CodeAnalysis.PublicApiAnalyzers(PublicAPI.Shipped/Unshipped.txt) and package validation — see #3.