Skip to content

Refactor directory structure and split property group#338

Merged
shibayan merged 2 commits intomasterfrom
directory-structure
Mar 16, 2026
Merged

Refactor directory structure and split property group#338
shibayan merged 2 commits intomasterfrom
directory-structure

Conversation

@shibayan
Copy link
Owner

This pull request reorganizes the project structure to follow a more conventional layout, introduces centralized configuration files for build and package management, and updates documentation to reflect these changes. The key updates include moving source, test, and sample projects into src/, tests/, and samples/ directories, respectively, and adding shared configuration for nullable reference types and package version management.

Project structure reorganization:

  • Moved main library, source generator, tests, and example projects into src/, tests/, and samples/ directories for improved clarity and maintainability. Updated references in Sharprompt.slnx, .github/workflows/publish.yml, and related documentation to match the new structure. [1] [2] [3] [4] [5]
  • Removed the old Sharprompt.Example/Sharprompt.Example.csproj and added its replacement at samples/Sharprompt.Example/Sharprompt.Example.csproj with updated project references. [1] [2]

Centralized build and package management:

  • Added Directory.Build.props to enable nullable reference types and embed source link information across all projects.
  • Added Directory.Packages.props to manage NuGet package versions centrally, ensuring consistency and easier maintenance.

Project file cleanup:

  • Cleaned up Sharprompt.SourceGenerator.csproj (now in src/) by removing redundant properties and relying on shared configuration from the new props files.

@shibayan shibayan requested a review from Copilot March 16, 2026 08:57
@shibayan shibayan self-assigned this Mar 16, 2026
@shibayan shibayan added the enhancement New feature or request label Mar 16, 2026
Copy link
Contributor

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 reorganizes the Sharprompt project into a conventional src/, tests/, samples/ directory structure and centralizes build configuration. It also adds a comprehensive test suite and introduces the full library source code under the new directory layout.

Changes:

  • Moved source projects to src/, test project to tests/, and example project to samples/, updating all project references, solution file, CI workflows, and documentation accordingly.
  • Added Directory.Build.props (for shared Nullable, SourceLink settings) and Directory.Packages.props (for centralized NuGet package version management), removing redundant properties from individual .csproj files.
  • Added extensive unit tests covering validators, options, internal types (Paginator, TextInputBuffer, Optional, etc.), fluent extensions, console driver interface, and key bindings.

Reviewed changes

Copilot reviewed 11 out of 86 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Sharprompt.slnx Updated project paths to new src/, tests/, samples/ layout
Directory.Build.props New shared build properties (Nullable, SourceLink)
Directory.Packages.props New central package version management
src/Sharprompt/Sharprompt.csproj Removed redundant props, updated relative paths for icon/README
src/Sharprompt.SourceGenerator/Sharprompt.SourceGenerator.csproj Removed redundant props, versions now centralized
tests/Sharprompt.Tests/Sharprompt.Tests.csproj Updated project reference path, centralized versions
samples/Sharprompt.Example/Sharprompt.Example.csproj New sample project with updated references
Sharprompt.Example/Sharprompt.Example.csproj Removed old project file
.github/workflows/publish.yml Updated pack path to src/Sharprompt
README.md, CONTRIBUTING.md Updated example project path references
src/Sharprompt/Strings/Resource.resx Resource strings (English)
src/Sharprompt/Strings/Resource.ja.resx Resource strings (Japanese)
src/Sharprompt/Strings/Resource.de-DE.resx Resource strings (German)
src/Sharprompt/** Full library source (forms, drivers, internals, options, fluent API, etc.)
tests/Sharprompt.Tests/** Comprehensive test suite for validators, options, internals, fluent API, console driver

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

You can also share your feedback on Copilot code review. Take the survey.

@shibayan shibayan merged commit a5e4207 into master Mar 16, 2026
9 checks passed
@shibayan shibayan deleted the directory-structure branch March 16, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants