Skip to content

Commit 4c0e958

Browse files
rheonedrewantonich
andauthored
Refactors Arcus repository for an "intermediate" 3.x.y release (#60)
* updates project structure * automated code formatting and non api destructive code improvements The is a known broken test case for Arcus.Tests.IPAddressCompatibilityTests.IPAddressTryParseSuccessTest for the input `abcd::%` * documentation tweaks * spelling * updates docs * modifies github templated * addresses simple warnings * removes limited use of Moq and replaces with NSubstitute * cleaning test warnings; trying to get .NET 4.8 tests to compelte * fixes testing issues * Cleaned up comparison logic for IPAddressRange and Subnet * updates packages * Now using xUnit.v3 and added IXunitSerializer to help debug failing tests * fixes copy/paste error Subnet.Equals(object obj) addressing failed test * clarified .NET targeting IP Address parse expectations * renames test file to match convention * package updates * updates readme with modern info * Addressing known bug in Subnet.TryIPv4FromPartial(string, out Subnet) #59 - Subnet.TryIPv4FromPartial(string , out Subnet) throws FormatException if the string input contains a malformed 0-prefixed octet that is not a valid octal number. * updated ReadTheDocs based on breaking changes * removes Roslynator.Testing.CSharp.Xunit I made a bad assumption, `Roslynator.Testing.CSharp.Xunit` is not relevant * Update README.md Co-authored-by: Drew Antonich <[email protected]> --------- Co-authored-by: Drew Antonich <[email protected]>
1 parent c752ea1 commit 4c0e958

File tree

80 files changed

+10755
-9402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+10755
-9402
lines changed

.config/dotnet-tools.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"csharpier": {
6+
"version": "0.30.6",
7+
"commands": [
8+
"dotnet-csharpier"
9+
],
10+
"rollForward": false
11+
},
12+
"dotnet-outdated-tool": {
13+
"version": "4.6.7",
14+
"commands": [
15+
"dotnet-outdated"
16+
],
17+
"rollForward": false
18+
},
19+
"husky": {
20+
"version": "0.7.2",
21+
"commands": [
22+
"husky"
23+
],
24+
"rollForward": false
25+
}
26+
}
27+
}

.editorconfig

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Root .editorconfig as of 2025-02-03
2+
3+
root = true
4+
5+
# All files
6+
[*]
7+
charset = utf-8-bom
8+
end_of_line = lf
9+
indent_size = 4
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
spelling_languages = en-us
15+
spelling_checkable_types = strings,identifiers,comments
16+
spelling_error_severity = information
17+
spelling_exclusion_path = .\dictionary.dic
18+
19+
# json
20+
[*.json]
21+
indent_size = 2
22+
23+
# YAML Files
24+
[*.{yml,yaml}]
25+
indent_size = 2
26+
27+
# Bash Files
28+
[*.sh]
29+
end_of_line = lf
30+
31+
# Batch Files
32+
[*.{cmd,bat,ps1}]
33+
end_of_line = crlf
34+
35+
# XML
36+
[*.xml]
37+
indent_size = 2

.gitattributes

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
# intervention with every merge. To do so, just uncomment the entries below
2424
###############################################################################
2525
*.sln merge=binary
26-
*.csproj merge=binary
27-
#*.vbproj merge=binary
26+
*.csproj merge=binary

.github/ISSUE_TEMPLATE/bug_report.md

+10-25
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,26 @@
11
---
2-
name: Bug report
3-
about: Create a bug report to help us improve
2+
name: Bug Report
3+
about: Create a report to help us improve
44
title: "[BUG]"
55
labels: bug
66
assignees: ''
77

88
---
99

10-
# Describe the bug
10+
# Bug Report
1111

12-
A clear and concise description of what the bug is.
13-
If available include the exception that is thrown, including the type and the included message and stack trace.
12+
## Describe the bug
1413

15-
# Expected behavior
14+
A clear and concise description of what the bug is.
1615

17-
A clear and concise description of what you expected to happen.
18-
19-
# Example of how to Reproduce
20-
21-
Provide the steps to reproduce the behavior by including a code example either inline or via a [Gist](https://gist.github.com/) link.
22-
If a code example is not possible, or too complex for the context of the issue describe in detail
23-
24-
# Code Information
16+
## How to Reproduce
2517

26-
- Runtime Information [e.g. netcore2.0, netstandard2.1]
27-
- SDK / Runtime Version [e.g. Core 2.2 SDK 2.2.402]
28-
- Language Version [e.g. C# 7.3, F# 4.6]
29-
- Operating System [e.g. Linux, Windows 10, Mac]
18+
Steps to reproduce the behavior.
3019

31-
# Proposed solutions
20+
## Expected Behavior
3221

33-
Do you have a solution that may fix this issue?
34-
35-
# Can you help?
36-
37-
Let us know if you are interested in helping, and in what capacity. e.g.: I want to write code and create a pull request, I can provide test cases, I have a suggestion on how it can be done, etc.
22+
A clear and concise description of what you expected to happen.
3823

39-
# Additional context
24+
## Additional context
4025

4126
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/documentation-needed.md

-30
This file was deleted.
+13-16
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
---
2-
name: Feature request
2+
name: Feature Request
33
about: Suggest an idea for this project
4-
title: "[Feature Request]"
4+
title: "[REQUEST]"
55
labels: enhancement
66
assignees: ''
77

88
---
99

10-
# Description
10+
# Feature Request
1111

12-
A clear and concise description of what the desired feature is.
12+
## Is your feature request related to missing applicable functionality?
1313

14-
Is your feature request related to an existing problem? Please describe it and/or provide an issue number.
14+
A clear and concise description of what the missing functionality. Please include RFCs or references as appropriate.
1515

16-
# Proposed solutions
16+
## Proposed Solutions
1717

18-
Do you have a solution, what would you recommend to fix it?
19-
If you don't have a solution what would you like the end result to be?
18+
A clear and concise description of what you would like to see as a result.
2019

21-
# Can you help?
22-
23-
Let us know if you are interested in helping, and in what capacity. e.g.: I want to write code and create a pull request, I can provide test cases, I have a suggestion on how it can be done, etc.
20+
## Describe alternatives you've considered
2421

22+
A clear and concise description of any alternative solutions or features you've considered.
2523

26-
# Describe alternatives you've considered
24+
# Can you help?
2725

28-
Did you consider any alternatives solutions or features?
29-
Did you have a workaround that met your needs?
26+
Let us know if you are interested in helping, and in what capacity. e.g.: I want to write code and create a pull request, I can provide test cases, I have a suggestion on how it can be done, etc.
3027

31-
# Additional context
28+
## Additional context
3229

33-
Add any other context about the problem here.
30+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/technical-debt.md

-36
This file was deleted.

.github/dependabot.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Dependabot Configuration for .NET Project
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: "nuget"
6+
directory: "/src"
7+
schedule:
8+
interval: "weekly"
9+
day: "sunday"
10+
allow:
11+
- dependency-type: direct
12+
ignore:
13+
- dependency-name: "*"
14+
update-types:
15+
- "version-update:semver-patch"
16+
commit-message:
17+
prefix: "Dependabot package update"
18+
open-pull-requests-limit: 5
19+
- package-ecosystem: "github-actions"
20+
directory: "/"
21+
schedule:
22+
interval: "weekly"
23+
day: "sunday"

.github/pull_request_template.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
Hello, and welcome! Thanks you for your contribution to **Arcus**.
1+
# Arcus Pull Request
2+
3+
Thank you for your contribution to **Arcus**. Please answer the following questions regarding your pull request:
4+
5+
---
26

37
1. Please let us know about the contribution you are making
48
- [ ] Does this contribution update documentation?
59
- [ ] Does this contribution update code?
610
- [ ] Does it fix a bug?
7-
- [ ] Does it add new functionality?
11+
- [ ] Does it add new functionality?
812

9-
2. Assuming there is a code change in this contribution
13+
1. Assuming there is a code change in this contribution
1014
- [ ] Have you included unit test(s) to verify the change?
1115
- [ ] Do all pre-existing unit tests pass as expected?
1216
- [ ] Does the change break existing functionality, if so have you explained why doing so is necessary?
13-
- [ ] Have you listed the possible side-effects or negative impacts of the code change.
17+
- [ ] Have you listed the possible side-effects or negative impacts of code changes.
18+
19+
1. Put `closes #XXXX` in your comment, where `XXXX` is the the issue that your PR addresses.
20+
21+
- If and issue does not yet exist, please create one before continuing
1422

15-
3. Put `closes #XXXX` in your comment, where XXXX is the the issue that your PR fixes.
16-
4. Provide any other information that pertinent to the PR you're making.
17-
5. Click "Create pull request".
23+
1. Provide any other information that pertinent to the PR you're making.
24+
1. Submit your Pull Request
1825

1926
Thanks again, we'll review your PR and and act accordingly.

.github/workflows/build.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# .NET Build and Test Workflow
2+
3+
name: Build and Test
4+
5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
9+
on:
10+
push:
11+
branches: ["main"]
12+
pull_request:
13+
branches: ["main"]
14+
15+
jobs:
16+
build:
17+
runs-on: windows-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup .NET SDKs
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
# .net 4.8.x is included by default in windows-latest
27+
dotnet-version: |
28+
8.0.x
29+
9.0.x
30+
31+
- name: Restore dotnet tools
32+
run: dotnet tool restore
33+
34+
- name: Restore dependencies
35+
run: dotnet restore ./src
36+
37+
- name: Build
38+
run: dotnet build ./src --no-restore -p:VersionFromCI="0.0.0-cibuild"
39+
40+
- name: Test
41+
run: dotnet test ./src --no-build --verbosity normal

.github/workflows/publish.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# .NET Publish semver tag Workflow
2+
3+
name: Publish .NET Package
4+
5+
permissions:
6+
contents: read
7+
packages: write
8+
pull-requests: write
9+
10+
on:
11+
push:
12+
tags:
13+
- "v*.*.*"
14+
- "v*.*.*-*"
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup .NET
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: 9.0.x
28+
29+
- name: Extract version
30+
id: extract_version
31+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
32+
33+
- name: Restore dotnet tools
34+
run: dotnet tool restore
35+
36+
- name: Restore dependencies
37+
run: dotnet restore ./src
38+
39+
- name: Build
40+
run: dotnet build ./src --no-restore --configuration Release /p:VersionFromCI=${{ env.VERSION }}
41+
42+
- name: Pack
43+
run: dotnet pack ./src/Gulliver/Gulliver.csproj --configuration Release --no-build --output ./packages /p:VersionFromCI=${{ env.VERSION }}
44+
45+
- name: Publish to GitHub Packages
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/sandialabs/index.json" --api-key $GITHUB_TOKEN --skip-duplicate
49+
50+
- name: Publish to nuget.org
51+
env:
52+
NUGET_ORG_APIKEY: ${{ secrets.NUGET_ORG_APIKEY }}
53+
run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key $NUGET_ORG_APIKEY --skip-duplicate

0 commit comments

Comments
 (0)