How raul-izquierdo/roster works
1. What this repository is
- A Java command-line tool for managing a GitHub Classroom roster.
- It does not call GitHub APIs; instead, it analyzes student and roster files and prints manual action instructions for the instructor to apply in the GitHub Classroom UI.
2. Top-level execution flow
- The entry point is main.Main.
- Execution starts by parsing CLI arguments, loading the relevant input files, computing roster differences or additions, and then delegating to a reporter that formats the final console output.
- The process is file-in, text-out; there is no persistent storage or network layer.
3. Command-line boundary
- cli.Arguments and cli.ArgumentsParser define the command surface.
- The tool supports two modes: create and update.
- Options control input file paths and student file format, with defaults for roster and groups files as documented in the README.
4. Core domain model
- model.Student is the central domain object.
- It appears to carry at least the student name and group/roster identity used for comparisons and display.
- The model is intentionally simple, which keeps the business logic focused on set comparison rather than rich domain behavior.
5. Student ingestion subsystem
- loaders.students.StudentsLoader is the orchestration layer for reading enrolled-student files.
- loaders.students.FormatLoader and loaders.students.FileFormat provide format selection.
- loaders.students.StudentBuilder and InvalidStudentFormatException suggest validation and normalization during parsing.
6. Supported student file formats
- The concrete parsers live under loaders.students.formats: CsvLoader, ExcelLoader, and SiesLoader.
- This is a clear strategy-style boundary: same logical input, multiple file-format implementations.
- The SIES loader likely includes institution-specific normalization of group labels, while CSV/Excel are generic tabular parsers.
7. Group filtering subsystem
- loaders.groups.GroupsLoader reads the teacher’s allowed groups file.
- The README indicates the file is a simple list or CSV where only the first column matters.
- This subsystem acts as a filter boundary so the output only includes students relevant to the instructor’s groups.
8. Roster comparison subsystem
- loaders.roster.RosterLoader reads the exported GitHub Classroom roster CSV.
- In update mode, it is compared against the newly loaded enrolled-student list to determine three change sets:
- students to add,
- students to remove,
- students whose group changed.
- The comparison logic is the heart of the tool, converting two file snapshots into actionable deltas.
9. Naming and identity normalization
- naming.NamingStrategy indicates a dedicated abstraction for shaping names or roster labels into the form expected by GitHub Classroom or by the output report.
- The repository includes ParenthesisStrategyTest, so formatting of roster identifiers or display names is a meaningful, test-covered concern.
- This boundary matters because correct formatting affects whether instructors can apply changes manually without mistakes.
10. Reporting layer
- main.Reporter is responsible for turning computed results into the instructional console output shown in the README.
- This layer is not doing business logic; it packages results with human-readable guidance for the GitHub Classroom web workflow.
- Exit codes likely originate here or in Main based on whether changes were found or errors occurred.
11. Data flow for create
- Parse CLI args.
- Load enrolled students from the chosen format.
- Optionally filter by groups.
- Apply naming/format normalization.
- Print the list of students to add, along with step-by-step manual instructions.
- No existing roster file is needed in this mode.
12. Data flow for update
- Parse CLI args.
- Load enrolled students and the current Classroom roster.
- Optionally filter by groups.
- Compare the two sets by student identity and group.
- Print separate sections for additions, removals, and group changes, each with manual instructions.
13. Build, test, and delivery
- The project is Maven-based (pom.xml, Maven wrapper files).
- Tests are organized by subsystem under src/test/java, which suggests the architecture is well-separated and unit-test driven.
- GitHub Actions release workflow and shell/batch run scripts indicate the project is packaged as a distributable CLI JAR for desktop/server use rather than a long-running service.
14. Architectural takeaway
- The repository is a modular CLI pipeline: argument parsing → file loaders → normalization/comparison → reporting.
- Its main architectural boundaries are file format adapters, roster diffing logic, and console reporting.
- That separation makes it suitable for an architecture diagram with clearly labeled input adapters, core comparison logic, and output/reporting at the edge.
Main entry points: Main.java Main · FormatLoader.java Format loader · StudentBuilder.java Student builder · Student.java Student
Components 15
App shell
CLI entrypoint and console reporting.
Command line
Argument parsing and mode selection.
- Arguments · Parsed command-line options and mode settings.
src/main/java/es/uniovi/raul/roster/cli/Arguments.java - Arg parser · Builds the CLI model from raw arguments.
src/main/java/es/uniovi/raul/roster/cli/ArgumentsParser.java
Student ingestion
Loading enrolled-student inputs from multiple formats.
- Students loader · Coordinates loading and normalization of enrolled students.
src/main/java/es/uniovi/raul/roster/loaders/students/StudentsLoader.java - Format loader · Chooses the student file-format implementation.
src/main/java/es/uniovi/raul/roster/loaders/students/FormatLoader.java - File format · Supported student input formats.
src/main/java/es/uniovi/raul/roster/loaders/students/FileFormat.java - Student builder · Validates and normalizes student records during parsing.
src/main/java/es/uniovi/raul/roster/loaders/students/StudentBuilder.java - CSV loader · Parses student data from CSV files.
src/main/java/es/uniovi/raul/roster/loaders/students/formats/CsvLoader.java - Excel loader · Parses student data from spreadsheet files.
src/main/java/es/uniovi/raul/roster/loaders/students/formats/ExcelLoader.java - SIES loader · Parses and normalizes institution-specific SIES exports.
src/main/java/es/uniovi/raul/roster/loaders/students/formats/SiesLoader.java
Group filter
Loading and filtering allowed instructor groups.
- Groups loader · Reads allowed groups used to restrict the student set.
src/main/java/es/uniovi/raul/roster/loaders/groups/GroupsLoader.java
Roster diff
Reading Classroom roster exports and computing changes.
- Roster loader · Reads the current GitHub Classroom roster export.
src/main/java/es/uniovi/raul/roster/loaders/roster/RosterLoader.java
Core model
Shared domain objects and identity shaping.
- Student · Central student identity used for comparisons and reporting.
src/main/java/es/uniovi/raul/roster/model/Student.java - Naming strategy · Shapes roster labels and names for comparison or output.
src/main/java/es/uniovi/raul/roster/naming/NamingStrategy.java
Connections 19
- Main → Arg parser: parse args · Main starts by parsing CLI input.
- Arg parser → Arguments: build · Raw arguments become a typed command model.
- Main → Students loader: load students · Main delegates enrolled-student ingestion.
- Students loader → Format loader: select format · Loader resolves the correct parser strategy.
- Format loader → File format: uses · Format selection is driven by the supported enum.
- Format loader → CSV loader: csv · CSV implementation handles tabular student files.
- Format loader → Excel loader: excel · Excel implementation handles spreadsheet student files.
- Format loader → SIES loader: sies · SIES implementation handles institution-specific exports.
- CSV loader → Student builder: normalize · Parsed rows are validated into domain students.
- Excel loader → Student builder: normalize · Parsed rows are validated into domain students.
- SIES loader → Student builder: normalize · Parsed rows are validated into domain students.
- Student builder → Student: create · Builder produces the central student model.
- Main → Groups loader: load groups · Optional group filtering is loaded from file.
- Main → Roster loader: load roster · Update mode reads the existing Classroom roster.
- Main → Naming strategy: apply names · Names and labels are normalized for output and matching.
- Main → Reporter: report · Computed actions are rendered for the instructor.
- Groups loader → Student: filter by group · Group membership gates which students are kept.
- Roster loader → Student: compare roster · Roster rows are mapped to student identities.
- Main → Student: diff sets · Create/update flows compare student snapshots and emit changes.