Contributing to Vali-Flow
This document is for contributors working on the Vali-Flow packages: adding features, fixing bugs, writing tests, or improving documentation.
Repository layout
loading...Vali-Flow.Core is maintained in a separate repository. Changes to Core are made there; changes to the evaluators and translators are made here.
Prerequisites
- .NET 8 SDK or .NET 9 SDK
- Rider or Visual Studio (or VS Code with C# DevKit)
Vali-Flow.Corecloned at/Users/feliperafaelmontenegro/RiderProjects/Vali-Flow.Core(the localProjectReferencepath)
Build
# Build the full solution
dotnet build
# Build in Release (used before packing)
dotnet build --configuration Release
Run tests
# All test projects
dotnet test
# Specific project
dotnet test Vali-Flow.Sql.Tests/
# With verbosity
dotnet test --logger "console;verbosity=detailed"
Test projects use xUnit and FluentAssertions.
Pack a NuGet package
dotnet pack Vali-Flow/Vali-Flow.csproj --configuration Release
dotnet pack Vali-Flow.InMemory/Vali-Flow.InMemory.csproj --configuration Release
dotnet pack Vali-Flow.Sql/Vali-Flow.Sql.csproj --configuration Release
The .nupkg files land in <project>/bin/Release/.
Adding a new ValiFlow<T> method (Core)
New filter methods (e.g., a new string operator) go in Vali-Flow.Core. The process:
- Add the new IR node to
Vali-Flow.Core/IR/(if a new node type is needed). - Add the fluent method to
ValiFlow<T>that creates the node. - Update
ExpressionToIRVisitorinVali-Flow.NoSqlto handle the new node. - Update each NoSQL adapter's translator to emit the corresponding native query.
- Update the SQL
ExpressionToSqlVisitorto emit the SQL fragment. - Add tests in all affected test projects.
- Update documentation in
docs/en/anddocs/es/.
Adding a new SQL dialect
- Create a class implementing
ISqlDialectinVali-Flow.Sql/Dialects/. - Implement:
QuoteIdentifier(string name)— return the dialect-specific quoted form.ParameterPrefix— return"@",":", etc.CaseInsensitiveLike— return the operator or function for case-insensitive LIKE.
- Add tests in
Vali-Flow.Sql.Tests/. - Document in
docs/adapters/sql/*(and the matchingi18n/es/.../adapters/sql/*files).
Adding a new NoSQL adapter
- Create a new project
Vali-Flow.NoSql.<Technology>/. - Reference
Vali-Flow.NoSql(for the IR base) and the technology's official NuGet client. - Implement a
<Technology>FilterTranslatorthat walksIRNodeand emits the native query. - Expose an extension method on
ValiFlow<T>and onExpression<Func<T, bool>>. - Add a test project
Vali-Flow.NoSql.<Technology>.Tests/. - Add documentation in
docs/en/anddocs/es/.
Documentation
Documentation lives in docs/en/ (English) and docs/es/ (Spanish). Both languages must be kept in sync.
- Reference docs for each package live in
docs/{lang}/vali-flow-<package>.md. - Guides live in
docs/{lang}/guides/. - Architecture docs live in
docs/{lang}/architecture/. - Internal contributor docs live in
docs/{lang}/internal/.
When you add or change a feature, update both en/ and es/ docs in the same commit.
Benchmarks
Vali-Flow.Benchmarks uses BenchmarkDotNet. Run benchmarks in Release mode:
cd Vali-Flow.Benchmarks
dotnet run --configuration Release
Results land in BenchmarkDotNet.Artifacts/. Do not commit benchmark results.
Commit style
- Use conventional commits:
feat:,fix:,refactor:,test:,docs:,chore:. - Keep commits focused: one logical change per commit.
- Reference issue numbers in the commit body when applicable.
Core version management
The local ProjectReference to Core must stay consistent across all package .csproj files. When Core is published to NuGet:
- Replace every
<ProjectReference Include="...Vali-Flow.Core.csproj" />with:<PackageReference Include="Vali-Flow.Core" Version="2.6.0" /> - Verify all projects build and all tests pass.
- Bump the version of each package that changes.