Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mazharenko authored Sep 29, 2024
0 parents commit 9dfef6c
Show file tree
Hide file tree
Showing 38 changed files with 773 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "mazharenko.AoCAgent"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

jobs:
build-and-run:
runs-on: ubuntu-20.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build
run: dotnet build -c Release
- name: Run tests
run: dotnet test -c Release
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Oo]bj/
[Bb]in/
*.suo


.idea/
.vscode/
.vs/

*.DotSettings.user

SESSION.COOKIE
36 changes: 36 additions & 0 deletions aoc.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aoc", "src\aoc\aoc.csproj", "{82CD8D3B-D5F0-472C-9954-5FAFCF789B1E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C9376883-178C-44E6-8DA9-3D91689628FE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6DFBE5A9-4974-4CFD-899C-D8A02AEC394A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AoC.Tests", "tests\AoC.Tests\AoC.Tests.csproj", "{470B7545-BB2D-4492-AE81-84C6E83F8F82}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{82CD8D3B-D5F0-472C-9954-5FAFCF789B1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82CD8D3B-D5F0-472C-9954-5FAFCF789B1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82CD8D3B-D5F0-472C-9954-5FAFCF789B1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82CD8D3B-D5F0-472C-9954-5FAFCF789B1E}.Release|Any CPU.Build.0 = Release|Any CPU
{470B7545-BB2D-4492-AE81-84C6E83F8F82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{470B7545-BB2D-4492-AE81-84C6E83F8F82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{470B7545-BB2D-4492-AE81-84C6E83F8F82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{470B7545-BB2D-4492-AE81-84C6E83F8F82}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{82CD8D3B-D5F0-472C-9954-5FAFCF789B1E} = {C9376883-178C-44E6-8DA9-3D91689628FE}
{470B7545-BB2D-4492-AE81-84C6E83F8F82} = {6DFBE5A9-4974-4CFD-899C-D8A02AEC394A}
EndGlobalSection
EndGlobal
101 changes: 101 additions & 0 deletions aoc.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/@KeyIndexDefined">True</s:Boolean>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=2CBD6971A7955044AD2624B84FB49E38/Position/@EntryValue">9</s:Int64>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=567DCF4B487C244A9F6BB46E4E9F3B84/Position/@EntryValue">6</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=79EA624A2C449D47A498E55EC51D5AE2/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=79EA624A2C449D47A498E55EC51D5AE2/EntryName/@EntryValue">&lt;No Name&gt;</s:String>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=79EA624A2C449D47A498E55EC51D5AE2/Position/@EntryValue">10</s:Int64>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=7F2A1BE8D0078241A9AE7802038BAD3C/Position/@EntryValue">7</s:Int64>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=F0CA621CDF5AB24282D8CDC11C520997/Entry/=C4795E57DDEC1C4F97BBC8C7173EBBCA/Position/@EntryValue">8</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/@KeyIndexDefined">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Applicability/=Live/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Description/@EntryValue">AoC Part Example</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=expectation/@KeyIndexDefined">True</s:Boolean>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=expectation/Order/@EntryValue">2</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=input/@KeyIndexDefined">True</s:Boolean>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=input/Order/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=name/@KeyIndexDefined">True</s:Boolean>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=name/Order/@EntryValue">0</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Field/=Num/@KeyIndexDefined">False</s:Boolean>

<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Reformat/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Scope/=C3001E7C0DA78E4487072B7E050D86C5/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Scope/=C3001E7C0DA78E4487072B7E050D86C5/CustomProperties/=minimumLanguageVersion/@EntryIndexedValue">2.0</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Scope/=C3001E7C0DA78E4487072B7E050D86C5/Type/@EntryValue">InCSharpFile</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Shortcut/@EntryValue">aocex</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/ShortenQualifiedReferences/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=12A6B95DE4EF234AB2BE7FB59CDA9D31/Text/@EntryValue">private readonly Example $name$ = new ($input$, $expectation$)</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/@KeyIndexDefined">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Applicability/=File/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/CustomProperties/=Extension/@EntryIndexedValue">cs</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/CustomProperties/=FileName/@EntryIndexedValue">Day</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/CustomProperties/=ValidateFileName/@EntryIndexedValue">True</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Description/@EntryValue">AoC Day</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=CLASS/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=CLASS/Expression/@EntryValue">getFileNameWithoutExtension()</s:String>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=CLASS/InitialRange/@EntryValue">-1</s:Int64>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=CLASS/Order/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=NAMESPACE/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=NAMESPACE/Expression/@EntryValue">fileDefaultNamespace()</s:String>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=NAMESPACE/InitialRange/@EntryValue">-1</s:Int64>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Field/=NAMESPACE/Order/@EntryValue">0</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Reformat/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Scope/=E8F0594528C33E45BBFEC6CFE851095D/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Scope/=E8F0594528C33E45BBFEC6CFE851095D/Type/@EntryValue">InCSharpProjectFile</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/ShortenQualifiedReferences/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=79EA624A2C449D47A498E55EC51D5AE2/Text/@EntryValue">using System;

namespace $NAMESPACE$;

public partial class $CLASS$
{
public partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
public partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/@KeyIndexDefined">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Applicability/=Live/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Description/@EntryValue">AoC Day Class</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Field/=Num/@KeyIndexDefined">True</s:Boolean>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Field/=Num/Order/@EntryValue">0</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Reformat/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Scope/=C3001E7C0DA78E4487072B7E050D86C5/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Scope/=C3001E7C0DA78E4487072B7E050D86C5/CustomProperties/=minimumLanguageVersion/@EntryIndexedValue">2.0</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Scope/=C3001E7C0DA78E4487072B7E050D86C5/Type/@EntryValue">InCSharpFile</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Shortcut/@EntryValue">aocday</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/ShortenQualifiedReferences/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=ADEF6E24C2A62A4390FF05C7D98D6F7B/Text/@EntryValue">
public partial class Day$Num$
{
public partial class Part1
{
$END$
public string Solve(string input)
{
throw new NotImplementedException();
}
}

public partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
</s:String></wpf:ResourceDictionary>
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "8.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Advent of Code Agent Template

Advent of Code Template based on [Advent of Code Agent](https://github.com/mazharenko/aoc-agent) project. It has all required references, contains drafts for all 25 days and a test project.

It also includes a few helpful predefined ReSharper code templates:
1. AoC Day file template
2. AoC Day live template `aocday`
3. AoC Part Example live template `aocex`

Compared to [aoc-agent-template](https://github.com/mazharenko/aoc-agent-template), this one assumes the repository will contain solutions for multiple years. The Agent library will know which year a day belongs to by its namespace &ndash; it must contain a segment like `YearXXXX`. Which year is run by the Agent is determined by the `[GenerateEntryPoint]` attribute on the correspondingly called class.
6 changes: 6 additions & 0 deletions src/aoc/EntryPoint/Year2023.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using mazharenko.AoCAgent.Generator;

namespace aoc.EntryPoint;

[GenerateEntryPoint]
public partial class Year2023;
19 changes: 19 additions & 0 deletions src/aoc/Year2023/Day01/Day01.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace aoc.Year2023.Day01;

internal partial class Day01
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day02/Day02.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day02;

internal partial class Day02
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day03/Day03.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day03;

internal partial class Day03
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day04/Day04.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day04;

internal partial class Day04
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day05/Day05.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day05;

internal partial class Day05
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day06/Day06.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day06;

internal partial class Day06
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day07/Day07.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day07;

internal partial class Day07
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
20 changes: 20 additions & 0 deletions src/aoc/Year2023/Day08/Day08.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace aoc.Year2023.Day08;

internal partial class Day08
{
internal partial class Part1
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}

internal partial class Part2
{
public string Solve(string input)
{
throw new NotImplementedException();
}
}
}
Loading

0 comments on commit 9dfef6c

Please sign in to comment.