Skip to content

Conversation

@Al3xramirez
Copy link

@Al3xramirez Al3xramirez commented Nov 18, 2025

worked with @thigiang16. Extra Credit attempted

Copilot AI review requested due to automatic review settings November 18, 2025 02:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Assignment 7+8, which adds implementation for data processing classes, async data handling, a circular linked list data structure (Node), and comprehensive test coverage.

  • Implements synchronous and asynchronous CSV data processing classes
  • Adds a circular linked list data structure with IEnumerable support
  • Includes comprehensive unit tests for all implemented functionality

Reviewed Changes

Copilot reviewed 15 out of 25 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
global.json Updates SDK version from 9.0.306 to 9.0.305
Directory.Build.targets Adds new build targets file to manage project references conditionally
Directory.Build.props Formatting changes (line numbering added)
Assignment/SampleData.cs Implements ISampleData interface with CSV parsing and data processing
Assignment/SampleDataAsync.cs Implements IAsyncSampleData interface with async CSV parsing
Assignment/Person.cs Formatting changes (line numbering added)
Assignment/People.csv Adds CSV data file with 50 person records
Assignment/Node.cs Implements circular linked list with IEnumerable support
Assignment/DataHelper.cs Adds static helper methods for CSV parsing and data extraction
Assignment/Address.cs Formatting changes (line numbering added)
Assignment/Assignment.csproj Adds configuration to copy People.csv to output directory
Assignment.Tests/SampleDataTests.cs Adds comprehensive tests for SampleData class
Assignment.Tests/SampleDataAsyncTests.cs Adds comprehensive tests for SampleDataAsync class
Assignment.Tests/NodeTests.cs Adds tests for Node circular linked list implementation
Assignment.Tests/Assignment.Tests.csproj Updates MSTest packages to 4.0.2 and adds project reference
Assignment.Tests/AssemblyAttributes.cs Adds test parallelization configuration
Assignment.Interfaces/ISampleData.cs Formatting changes (line numbering added)
Assignment.Interfaces/IAsyncSampleData.cs Updates return type for GetAggregateSortedListOfStatesUsingCsvRows to Task
Assignment.Interfaces/IPerson.cs Formatting changes (line numbering added)
Assignment.Interfaces/IAddress.cs Formatting changes (line numbering added)
.gitignore Updates gitignore with formatting changes and Mac-specific files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Al3xramirez Al3xramirez mentioned this pull request Nov 18, 2025
@Al3xramirez Al3xramirez changed the title Assignment7+8 Assignment7+8 Extra Credit Nov 18, 2025
Copy link

@ColtonKnopik ColtonKnopik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implement the ISampleData.CsvRows property, loading the data from the People.csv file and returning each line as a single string. ✔
Change the "Copy to" property on People.csv to "Copy if newer" so that the file is deployed along with your test project. ✔
Using LINQ, skip the first row in the People.csv. ✔
Be sure to appropriately handle resource (IDisposable) items correctly if applicable (and it may not be depending on how you implement it). ✔

Implement IEnumerable GetUniqueSortedListOfStatesGivenCsvRows() to return a sorted, unique list of states. ✔
Use ISampleData.CsvRows for your data source. ✔
Don't forget the list should be unique. ✔
Sort the list alphabetically. ✔
Include a test that leverages a hardcoded list of addresses. ✔
Include a test that uses LINQ to verify the data is sorted correctly (do not use a hardcoded list). ✔

Implement ISampleData.GetAggregateSortedListOfStatesUsingCsvRows() to return a string that contains a unique, comma separated list of states. ✔
Use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows() for your data source. ✔
Consider "selecting" only the states and calling ToArray() to retrieve an array of all the state names. ✔
Given the array, consider using string.Join to combine the list into a single string. ✔

Implement the ISampleData.People property to return all the items in People.csv as Person objects ✔
Use ISampleData.CsvRows as the source of the data. ✔
Sort the list by State, City, and Zip. ✔
Be sure that Person.Address is also populated. ✔
Adding null validation to all the Person and Address properties is optional.
Consider using ISampleData.CsvRows in your test to verify your results. ✔

Implement ISampleDate.FilterByEmailAddress(Predicate filter) to return a list of names where the email address matches the filter. ✔
Use ISampleData.People for your data source. ✔

Implement ISampleData.GetAggregateListOfStatesGivenPeopleCollection(IEnumerable people) to return a string that contains a unique, comma-separated list of states. ✔
Use the people parameter from ISampleData.People property for your data source. ✔
At a minimum, use the System.Linq.Enumerable.Aggregate` LINQ method to create your result. ✔
Don't forget the list should be unique. ✔
It is recommended that, at a minimum, you use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows to validate your result.

Given the implementation of Node in Assignment5

Implement IEnumerable to return all the items in the "circle" of items. ✔
Add an IEnumberable ChildItems(int maximum) method to Node that returns the remaining items with a maximum number of items returned less than maximum.

Fundamentals

Place all shared project properties into a Directory.Build.Props file.
Place all shared project items into a Directory.Build.targets file.
Ensure nullable reference types is enabled ✔
Ensure that you turn on code analysis for all projects(EnableNETAnalyzers) ✔
Set LangVersion and the TargetFramework to the latest released versions available (preview versions optional) ✔
and enabled .NET analyzers for both projects ✔
For this assignment, consider using Assert.AreEqual() (the generic version) ✔
All of the above should be unit tested ✔
Choose simplicity over complexity ✔

Good job

@kellanburns
Copy link

  1. Implement the ISampleData.CsvRows property, loading the data from the People.csv file and returning each line as a single string. ✔

    • Change the "Copy to" property on People.csv to "Copy if newer" so that the file is deployed along with your test project. ✔
    • Using LINQ, skip the first row in the People.csv. ✔
    • Be sure to appropriately handle resource (IDisposable) items correctly if applicable (and it may not be depending on how you implement it). ✔
  2. Implement IEnumerable<string> GetUniqueSortedListOfStatesGivenCsvRows() to return a sorted, unique list of states. ✔

    • Use ISampleData.CsvRows for your data source. ✔
    • Don't forget the list should be unique. ✔
    • Sort the list alphabetically. ✔
    • Include a test that leverages a hardcoded list of addresses. ✔
    • Include a test that uses LINQ to verify the data is sorted correctly (do not use a hardcoded list). ✔
  3. Implement ISampleData.GetAggregateSortedListOfStatesUsingCsvRows() to return a string that contains a unique, comma separated list of states. ✔

    • Use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows() for your data source. ✔
    • Consider "selecting" only the states and calling ToArray() to retrieve an array of all the state names. ✔
    • Given the array, consider using string.Join to combine the list into a single string. ✔
  4. Implement the ISampleData.People property to return all the items in People.csv as Person objects ✔

    • Use ISampleData.CsvRows as the source of the data. ✔
    • Sort the list by State, City, and Zip. ✔
    • Be sure that Person.Address is also populated. ✔
    • Adding null validation to all the Person and Address properties is optional.
    • Consider using ISampleData.CsvRows in your test to verify your results. ✔
  5. Implement ISampleDate.FilterByEmailAddress(Predicate<string> filter) to return a list of names where the email address matches the filter. ✔

    • Use ISampleData.People for your data source. ✔
  6. Implement ISampleData.GetAggregateListOfStatesGivenPeopleCollection(IEnumerable<IPerson> people) to return a string that contains a unique, comma-separated list of states. ✔

    • Use the people parameter from ISampleData.People property for your data source. ✔
    • At a minimum, use the System.Linq.Enumerable.Aggregate` LINQ method to create your result. ✔
    • Don't forget the list should be unique. ✔
    • It is recommended that, at a minimum, you use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows to validate your result.
  7. Given the implementation of Node in Assignment5

  • Implement IEnumerable<T> to return all the items in the "circle" of items. ✔
  • Add an IEnumberable<T> ChildItems(int maximum) method to Node that returns the remaining items with a maximum number of items returned less than maximum. ✔

Extra Credit

  • Implement the homework using async/await and multi-threading by defining a new SampleDataAsync class that implements IAsyncSampleData). Refactor your SampleData and SampleDataAsync classes with minimal duplication. Be sure to refactor your tests to re-use a significant amount of the test code for both implementations. ✔

Fundamentals

  • Place all shared project properties into a Directory.Build.Props file. ✔
  • Place all shared project items into a Directory.Build.targets file. ✔
  • Ensure nullable reference types is enabled ✔
  • Ensure that you turn on code analysis for all projects(EnableNETAnalyzers) ✔
  • Set LangVersion and the TargetFramework to the latest released versions available (preview versions optional) ❌ (Target framework set to 8.0 - should be 9.0+ - and lang version is not set)
  • and enabled .NET analyzers for both projects ✔
  • For this assignment, consider using Assert.AreEqual<T>() (the generic version) ✔
  • All of the above should be unit tested ✔
  • Choose simplicity over complexity ✔

Program is totally there, just looks like a minor tweak on setup is needed. I also admire the functional use of helper methods, seems effective for avoiding duplicate code.

@github-actions
Copy link

Summary

Summary
Generated on: 11/21/2025 - 05:55:40
Coverage date: 11/21/2025 - 05:55:38
Parser: MultiReport (2x Cobertura)
Assemblies: 1
Classes: 6
Files: 6
Line coverage: 95.3% (205 of 215)
Covered lines: 205
Uncovered lines: 10
Coverable lines: 215
Total lines: 370
Branch coverage: 79.7% (118 of 148)
Covered branches: 118
Total branches: 148
Method coverage: Feature is only available for sponsors
Tag: 487_19561461943

Coverage

Assignment - 95.3%
Name Line Branch
Assignment 95.3% 79.7%
Assignment.Address 100%
Assignment.DataHelper 90% 50%
Assignment.Node`1 90.1% 72.7%
Assignment.Person 100%
Assignment.SampleData 100% 100%
Assignment.SampleDataAsync 100% 82.2%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants