Skip to content

Commit

Permalink
Add initial code for app/Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ehharvey committed Sep 22, 2024
1 parent 07177c5 commit 400af73
Show file tree
Hide file tree
Showing 15 changed files with 249 additions and 7 deletions.
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/

# Rider
.idea/

# Visual Studio
.vs/

# Fleet
.fleet/

# Code Rush
.cr/

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"ms-dotnettools.csdevkit"
]
}
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/app/bin/Debug/net8.0/app.dll",
"args": [],
"cwd": "${workspaceFolder}/app",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/app/app.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/app/app.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/app/app.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
2 changes: 2 additions & 0 deletions app/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
10 changes: 10 additions & 0 deletions app/app.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions lms-2024.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "app", "app\app.csproj", "{218BACFD-F385-47C4-9DE3-41F115346A2E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{218BACFD-F385-47C4-9DE3-41F115346A2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{218BACFD-F385-47C4-9DE3-41F115346A2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{218BACFD-F385-47C4-9DE3-41F115346A2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{218BACFD-F385-47C4-9DE3-41F115346A2E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F6876004-5E5D-4B34-A4C0-0F2EAC33E6C1}
EndGlobalSection
EndGlobal
3 changes: 2 additions & 1 deletion wiki/.obsidian/app.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"autoPairMarkdown": false
"autoPairMarkdown": false,
"attachmentFolderPath": "screenshots"
}
20 changes: 14 additions & 6 deletions wiki/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"type": "tabs",
"children": [
{
"id": "3f892a1f31d4fa4b",
"id": "fd6d53343faccdc5",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "contributors/Emil Harvey.md",
"file": "development/Typical Development Workflow.md",
"mode": "source",
"source": false
}
Expand Down Expand Up @@ -85,7 +85,7 @@
"state": {
"type": "backlink",
"state": {
"file": "contributors/Emil Harvey.md",
"file": "development/Typical Development Workflow.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -102,7 +102,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "contributors/Emil Harvey.md",
"file": "development/Typical Development Workflow.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -125,7 +125,7 @@
"state": {
"type": "outline",
"state": {
"file": "contributors/Emil Harvey.md"
"file": "development/Typical Development Workflow.md"
}
}
}
Expand All @@ -146,8 +146,16 @@
"command-palette:Open command palette": false
}
},
"active": "3f892a1f31d4fa4b",
"active": "fd6d53343faccdc5",
"lastOpenFiles": [
"development/Getting Started.md",
"development/Typical Development Workflow.md",
"screenshots/Pasted image 20240922184538.png",
"GitHub CLI.md",
"screenshots",
"screenshots/Pasted image 20240922184542.png",
"Git.md",
"reference",
"contributors/Emil Harvey.md",
"contributors",
"create a link.md",
Expand Down
13 changes: 13 additions & 0 deletions wiki/Git.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This page has notes about `git`, including what it is and how to use it.
# Overview
`git` is a tool used to manage code. A `git` "repository" is simply a folder of code that is "version-controlled"; meaning having versions, etc. Software developers use `git` for many reasons, including:
1. Controlling how changes get incorporated into the code. In general, we want to make sure all new changes are double checked!
2. Rolling back changes. Maybe a bug got introduced and we need to rollback!
3. Knowing who made a specific change to the code. This can help us know who to ask about a particular piece of code.
4. `git` != GitHub! GitHub is an "online repository host" for `git`, meaning that it can store your `git` repositories online!
* We sync our code with GitHub to share our code with others. This means that when coding, we continually *pull* changes from GitHub (usually from other people) and *push* changes to GitHub.

# Getting Started
1. Install `git` from [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
2. Set up your identity. See [here](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for instructions
3. Ensure you are authenticated with GitHub. See [[GitHub CLI]] for one way to do this.
11 changes: 11 additions & 0 deletions wiki/GitHub CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The [GitHub CLI](https://cli.github.com/) is a useful command-line tool for working with GitHub. It helps glue `git` with GitHub.
The CLI cooperates with `git`. It is great to use together because the CLI can handle authentication for `git`.
# Getting Started
1. Install the GitHub CLI from the above link
2. Follow these introductory steps [here](https://cli.github.com/manual/)
# Useful commands

| Command | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gh repo clone ...` | Clones a repository from GitHub. Very similar to `git clone`. Fun fact: on GitHub, you can quickly copy commands to use from here:<br>![[Pasted image 20240922184542.png]] |
| | |
33 changes: 33 additions & 0 deletions wiki/development/Getting Started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
This page describes how to get a development environment set up.
# Overview
## Requirements
This project uses:
1. [VS Code](https://code.visualstudio.com/)
2. [Obsidian](https://obsidian.md/)
* This is for this wiki :)
3. [DotNet](https://dotnet.microsoft.com/en-us/download)
* This is used for the app logic (aka business logic, backend)
## Other helpful tools
* This [extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit&WT.mc_id=dotnet-35129-website) for VS Code for C#
* [GitHub CLI](https://cli.github.com/)
* See [[GitHub CLI]] for some notes on how to use this tool
# Procedures
## Setting up development environment
1. Install requirements in [[#Overview]]
2. Make sure `git` is also installed
3. Clone this repository
4. Open VS Code to this repository
5. Open a terminal
6. Navigate the terminal to `app`. This is where our current code lives!
* `cd app`
7. Run `dotnet restore`
## Running project
* You can use VS Code's built-in "Run and Debug" menu.
* You can also use the terminal:
1. Navigate to `app`
2. Run `dotnet run`
## Wiki
1. Open Obsidian
2. Click 'Open folder as vault'
3. Navigate to the `wiki` folder of this repository
4. You'll see a dialog asking you whether to enable third-party extensions. Allow extensions!
27 changes: 27 additions & 0 deletions wiki/development/Typical Development Workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
This page describes how development takes place here!
# Overview
* This project uses **weekly** sprints/iterations. Sprints are when code changes can happen and start on **Wednesday** and end on **Tuesday**
* Changes occur through **pull requests only**. This means you cannot push straight to `main`. Instead, you will create a `git` branch, make changes there, and then create a pull request for others to review
* Work should be organised via **GitHub Issues**. This means that people should assign themselves to an issue before starting work. This is to prevent 2 people from working on the same thing!
* Currently, Emil (@ehharvey) is the one creating issues and managing the direction of the project. As time goes on, this could change!
# Process Specifics
1. Issues are the work to be completed in a given iteration. They will be finalised by Sunday.
2. Monday and Tuesday should be for people to discuss and assign themselves to issues. In general, **one person should work on one issue**, but this can change.
* Some issues are an 'everyone' issue, meaning that everyone will have identical work to complete. There will be 1 sub-issue per person.
3. People should create a **branch** for their issue. This can be done from the Issue web page or via `git`. All branches should be based off `main`
4. People can start coding on Wednesday!
* [[#Coding Standards]] below contains some pointers to think of
5. If people have difficulties, please use your Issue page (specifically the comments) to discuss. This keeps our conversations organised.
6. Emil will check in with people on Friday/Saturday. If needed, Emil will add people to an issue or reassign work if people are falling behind. This can happen from Saturday to Tuesday.
7. New issues will be created throughout the week. People can discuss throughout the week, but actual work should only start in the next iteration!
## Coding Standards
To maintain good project health, this project has several coding standards:
1. Code changes should have accompanying tests to verify them
2. Code changes should have accompanying documentations (on this wiki). Things to include are:
1. Online references used, like instructions and advice
2. Challenges faced
3. New processes (e.g., to test, build, etc.)
3. Pull requests should:
1. Be linked to the relevant Issue (do so in the description of the pull request!)
2. Describe the changes made
3. Be as small as possible (a pull request should only target one issue)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 400af73

Please sign in to comment.