https://github.com/dpvreony/nucleotide

Code Generation Toolkit for manipulation of POCO objects

https://github.com/dpvreony/nucleotide

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary

Keywords

code-generation roslyn

Keywords from Contributors

unit-test phase-transition conformance labels sparql climate-model interaction mvvm reactiveui roslyn-generator
Last synced: 4 months ago · JSON representation

Repository

Code Generation Toolkit for manipulation of POCO objects

Basic Info
Statistics
  • Stars: 10
  • Watchers: 1
  • Forks: 0
  • Open Issues: 7
  • Releases: 37
Topics
code-generation roslyn
Created over 13 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

Nucleotide

Mission Statement

To provide a tool that automatically generates repeditive .NET code to allow better use of developers time.

Introduction

Nucleotide is a library to aid in the generation of .NET code for manipulation the following types of objects:

  • Client\Server Services (Interfaces)
  • Commands (Classes)
  • Command Factory (Interfaces and Classes)
  • Entity Framework DbSet (Classes)
  • Entity Framework Models (Classes)
  • Entity Framework Entity Type Configuration (Classes)
  • Entity Framework Parent and Child Foreign Keys Representation (Interfaces)
  • Models (Interfaces and Classes)
  • MVC Controllers (Classes)
  • Queries (Classes)
  • Query Factories (Interfaces and Classes)
  • Request DTO POCO Objects (Classes)
  • Response DTO POCO Objects (Classes)
  • SignalR Hubs (Classes)
  • WCF Service classes (Classes)
  • Web Api Client (Classes)
  • Web Api Controllers (Classes)

This project leverages Roslyn functionality to combine a DSL style model with the power of the compiler to give a simple way to generate code.

Credits

  • https://github.com/AArnott/CodeGeneration.Roslyn : Allowed the original migration away from T4 to Roslyn

Getting Started

Pre-requisites

You will need: * An IDE \ Build chain that supports Roslyn (Recent versions of VSCode, Visual Studio, Jetbrains Rider, etc.) * A project using * A supported version of .NET core (Version 8) * C# 9 language compiler settings or later

Before you start

You can use the following project structure

  • Your generation model sits in a project above the project where it will be generated

mermaid flowchart TD GenProject(Generation Project) --> TargetProject(TargetProject)

  • You can also have a common model, then sub projects used to generate specific code

mermaid flowchart TD CommonModel(Common Model Project) --> MvcGenProject(ASP.NET Core MVC Service Generation Project) MvcGenProject --> MvcSvcProject(ASP.NET Core MVC Project) CommonModel --> WebApiSvcGenProject(ASP.NET Core Web API Service Generation Project) CommonModel --> WebApiClientGenProject(Web API Client Generation Project) CommonModel --> WpfAppGenProject(Wpf App Generation Project) CommonModel --> CommonProject(Common Shared Code Project) WebApiClientGenProject --> WebApiClientProject(Web API Client Project) WebApiSvcGenProject --> WebApiSvcProject(Web API Service Project) WpfAppGenProject --> WpfAppProject(WPF App Project) CommonProject -.-> MvcSvcProject CommonProject -.-> WebApiClientProject CommonProject -.-> WebApiSvcProject CommonProject -.-> WpfAppProject

NOTE: There is an intention to simplify this use case to reduce the number of proxy projects.

mermaid flowchart TD CommonGenerationModel(Common Generation Model Project) --> MvcSvcProject(ASP.NET Core MVC Service Project) CommonGenerationModel --> CommonProject(Common Shared Code Project) CommonGenerationModel --> WebApiClientProject(Web API Client Project) CommonGenerationModel --> WebApiSvcProject(Web API Service Project) CommonGenerationModel --> WpfAppProject(WPF App Project) CommonProject -.-> MvcSvcProject CommonProject -.-> WebApiClientProject CommonProject -.-> WebApiSvcProject CommonProject -.-> WpfAppProject

  1. Your code generation model is in Project1, while your generated code is in Project2.

Get the package (Single Project)

You want to install Nucleotide in the project where you want to place your generated model.

Install-Package Dhgms.Nucleotide

Get the package (Dual Project)

In project1.

  1. Install-Package Dhgms.Nucleotide

  2. Add Your Code Generation Models

  3. Inherit the Code Generation Attributes.

In project2.

  1. Reference Project1.

  2. Install-Package Dhgms.Nucleotide

  3. Apply the Assembly Code Generation Attributes.

Get started with a Code Generation Model

TODO.

Apply a Model Generation Attribute

TODO.

Viewing the documentation

The documentation can be found at http://dpvreony.github.io/nucleotide/

Contributing to the code

See the contribution guidelines.

Owner

  • Name: David Vreony
  • Login: dpvreony
  • Kind: user
  • Location: UK

.NET Developer \ Analyst \ Architect with experience in Developer Experience, Financial Services and Healthcare domains

GitHub Events

Total
  • Create event: 67
  • Issues event: 3
  • Release event: 3
  • Watch event: 1
  • Delete event: 63
  • Issue comment event: 208
  • Push event: 232
  • Pull request event: 122
  • Pull request review event: 62
Last Year
  • Create event: 67
  • Issues event: 3
  • Release event: 3
  • Watch event: 1
  • Delete event: 63
  • Issue comment event: 208
  • Push event: 232
  • Pull request event: 122
  • Pull request review event: 62

Committers

Last synced: 4 months ago

All Time
  • Total Commits: 823
  • Total Committers: 6
  • Avg Commits per committer: 137.167
  • Development Distribution Score (DDS): 0.61
Past Year
  • Commits: 82
  • Committers: 2
  • Avg Commits per committer: 41.0
  • Development Distribution Score (DDS): 0.073
Top Committers
Name Email Commits
David Vreony d****y@u****m 321
renovate[bot] 2****]@u****m 304
dependabot[bot] 4****]@u****m 71
dependabot-preview[bot] 2****]@u****m 64
David Vreony d****y@h****m 43
dpvreony_cp 0****s 20

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 25
  • Total pull requests: 226
  • Average time to close issues: 8 months
  • Average time to close pull requests: 9 days
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.4
  • Average comments per pull request: 1.12
  • Merged pull requests: 183
  • Bot issues: 4
  • Bot pull requests: 200
Past Year
  • Issues: 3
  • Pull requests: 70
  • Average time to close issues: 5 days
  • Average time to close pull requests: 2 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 1.67
  • Average comments per pull request: 1.47
  • Merged pull requests: 52
  • Bot issues: 3
  • Bot pull requests: 68
Top Authors
Issue Authors
  • dpvreony (21)
  • renovate[bot] (4)
Pull Request Authors
  • renovate[bot] (135)
  • dependabot-preview[bot] (65)
  • dpvreony (26)
Top Labels
Issue Labels
enhancement (9) documentation (2) triage (2) bug (1) dependencies (1)
Pull Request Labels
dependencies (142) release (12) enhancement (1)

Packages

  • Total packages: 3
  • Total downloads:
    • nuget 115,653 total
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 120
  • Total maintainers: 1
nuget.org: dhgms.nucleotide

Package Description

  • License: MIT
  • Latest release: 4.0.9
    published 9 months ago
  • Versions: 53
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 78,716 Total
Rankings
Downloads: 7.1%
Average: 14.1%
Dependent repos count: 15.0%
Dependent packages count: 20.3%
Maintainers (1)
Last synced: 5 months ago
nuget.org: dhgms.nucleotide.generators

Package Description

  • License: MIT
  • Latest release: 4.0.9
    published 9 months ago
  • Versions: 34
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 23,527 Total
Rankings
Downloads: 13.6%
Dependent repos count: 15.0%
Average: 16.3%
Dependent packages count: 20.3%
Maintainers (1)
Last synced: 5 months ago
nuget.org: dhgms.nucleotide.analyzers

Package Description

  • License: MIT
  • Latest release: 4.0.9
    published 9 months ago
  • Versions: 33
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13,410 Total
Rankings
Dependent repos count: 15.0%
Average: 18.6%
Dependent packages count: 20.3%
Downloads: 20.4%
Maintainers (1)
Last synced: 5 months ago

Dependencies

src/Dhgms.Nucleotide.GenerationTests/Dhgms.Nucleotide.SampleApp.csproj nuget
  • Microsoft.EntityFrameworkCore 6.0.6
  • Whipstaff.AspNetCore 6.0.134
  • Whipstaff.Wpf 6.0.134
  • Whipstaff.Wpf.Mahapps 6.0.134
src/Dhgms.Nucleotide.Generators/Dhgms.Nucleotide.Generators.csproj nuget
  • Microsoft.CodeAnalysis.CSharp 4.2.0
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/create-release v1 composite
  • actions/download-artifact v3 composite
  • actions/setup-dotnet v3 composite
  • actions/setup-java v3 composite
  • actions/upload-artifact v3 composite
  • dotnet/nbgv master composite
  • glennawatson/ChangeLog v1 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • actions/setup-dotnet v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/init v2 composite
src/Dhgms.Nucleotide.Analyzers/Dhgms.Nucleotide.Analyzers.csproj nuget