Skip to content

Commit

Permalink
Release/10.2.12 (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
psarras authored Oct 21, 2024
2 parents bd6e511 + 299f18b commit 0790c8e
Show file tree
Hide file tree
Showing 864 changed files with 7,208 additions and 2,450 deletions.
100 changes: 51 additions & 49 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ tab_width = 1

# New line preferences
end_of_line = lf
insert_final_newline = true:error
insert_final_newline = true

#### .NET Coding Conventions ####

# Organize usings
dotnet_separate_import_directive_groups = true:error
dotnet_sort_system_directives_first = true:error
dotnet_separate_import_directive_groups = true
dotnet_sort_system_directives_first = true
file_header_template = unset

# this. and Me. preferences
Expand Down Expand Up @@ -48,7 +48,7 @@ dotnet_style_explicit_tuple_names = true:error
dotnet_style_namespace_match_folder = true:error
dotnet_style_null_propagation = true:error
dotnet_style_object_initializer = true:error
dotnet_style_operator_placement_when_wrapping = beginning_of_line:error
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:error
dotnet_style_prefer_compound_assignment = true:error
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
Expand Down Expand Up @@ -139,45 +139,45 @@ csharp_style_allow_embedded_statements_on_same_line_experimental = true:error
#### C# Formatting Rules ####

# New line preferences
csharp_new_line_before_open_brace = none:error
csharp_new_line_before_catch = false:error
csharp_new_line_before_else = false:error
csharp_new_line_before_finally = false:error
csharp_new_line_before_members_in_anonymous_types = false:error
csharp_new_line_before_members_in_object_initializers = false:error
csharp_new_line_between_query_expression_clauses = false:error
csharp_new_line_before_open_brace = none
csharp_new_line_before_catch = false
csharp_new_line_before_else = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_between_query_expression_clauses = false

# Indentation preferences
csharp_indent_block_contents = true:error
csharp_indent_braces = false:error
csharp_indent_case_contents = true:error
csharp_indent_case_contents_when_block = true:error
csharp_indent_labels = one_less_than_current:error
csharp_indent_switch_labels = true:error
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = no_change
csharp_indent_switch_labels = true

# Space preferences
csharp_space_after_cast = false:error
csharp_space_after_colon_in_inheritance_clause = true:error
csharp_space_after_comma = true:error
csharp_space_after_dot = false:error
csharp_space_after_keywords_in_control_flow_statements = true:error
csharp_space_after_semicolon_in_for_statement = true:error
csharp_space_around_binary_operators = before_and_after:error
csharp_space_around_declaration_statements = false:error
csharp_space_before_colon_in_inheritance_clause = true:error
csharp_space_before_comma = false:error
csharp_space_before_dot = false:error
csharp_space_before_open_square_brackets = false:error
csharp_space_before_semicolon_in_for_statement = false:error
csharp_space_between_empty_square_brackets = false:error
csharp_space_between_method_call_empty_parameter_list_parentheses = false:error
csharp_space_between_method_call_name_and_opening_parenthesis = false:error
csharp_space_between_method_call_parameter_list_parentheses = false:error
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false:error
csharp_space_between_method_declaration_name_and_open_parenthesis = false:error
csharp_space_between_method_declaration_parameter_list_parentheses = false:error
csharp_space_between_parentheses = false:error
csharp_space_between_square_brackets = false:error
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Wrapping preferences
csharp_preserve_single_line_blocks = true
Expand All @@ -203,26 +203,26 @@ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

# ReSharper properties
Expand Down Expand Up @@ -256,7 +256,7 @@ resharper_braces_for_ifelse = required
resharper_braces_for_while = required
resharper_csharp_keep_blank_lines_in_code = 1
resharper_csharp_keep_blank_lines_in_declarations = 1
resharper_csharp_max_line_length = 100
resharper_csharp_max_line_length = 120
resharper_csharp_wrap_arguments_style = wrap_if_long
resharper_csharp_wrap_before_binary_opsign = true
resharper_csharp_wrap_multiple_declaration_style = chop_always
Expand Down Expand Up @@ -292,7 +292,7 @@ resharper_place_simple_anonymousmethod_on_single_line = false
resharper_place_simple_case_statement_on_same_line = if_owner_is_single_line
resharper_place_simple_embedded_statement_on_same_line = false
resharper_place_simple_enum_on_single_line = true
resharper_place_simple_initializer_on_single_line = false
resharper_place_simple_initializer_on_single_line = true
resharper_place_simple_method_on_single_line = true
resharper_show_autodetect_configure_formatting_tip = false
resharper_trailing_comma_in_multiline_lists = true
Expand Down Expand Up @@ -345,3 +345,5 @@ resharper_place_field_attribute_on_same_line = if_owner_is_single_line
resharper_place_linq_into_on_new_line = false
resharper_remove_blank_lines_near_braces_in_declarations = false
resharper_alignment_tab_fill_style = use_spaces
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
csharp_style_prefer_primary_constructors = true:suggestion
2 changes: 1 addition & 1 deletion .github/workflows/github-release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:

- name: Push nupkg file to nuget.org
run: |
dotnet nuget push "*.nupkg" --api-key ${{ SECRETS.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
dotnet nuget push "*.nupkg" --api-key ${{ SECRETS.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
2 changes: 1 addition & 1 deletion .github/workflows/jira-check-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
- uses: arup-group/actions-composite-oasys-jira-check/branch@main
if: startsWith( github.ref, 'refs/heads/release') == false
with:
valid-branch-names: task|test|bugfix|feature|hotfix|epic
valid-branch-names: task|test|bugfix|feature|hotfix|epic|feat
jira-username: [email protected]
jira-password: ${{ secrets.JIRA_PASSWORD }}
1 change: 1 addition & 0 deletions .github/workflows/jira-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
types: [opened, edited, reopened, synchronize]
branches:
- main
- 'release/**'

jobs:
# This workflow contains a single job called "check-jira"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

.venv/
results/

# User-specific files
*.rsuser
*.suo
Expand Down
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
default_stages: [pre-commit]

repos:
# - repo: local
# hooks:
#
# - id: dotnet-format
# name: Format
# entry: dotnet format --exclude-diagnostics --verify-no-changes --verbosity diagnostic
# language: system
# pass_filenames: false
# always_run: true

# - id: dotnet-test-coverage
# name: Run dotnet tests with coverage
# entry: powershell.exe -NoProfile -ExecutionPolicy Bypass -File coverage.ps1
# stages: [pre-commit]
# language: system
# pass_filenames: false

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
stages: [commit-msg]

# this should go last since it will fix line endings broken by other tools
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
#- id: check-case-conflict
- id: check-yaml
- id: check-ast
- id: check-merge-conflict
- id: double-quote-string-fixer
- id: trailing-whitespace
exclude: .github
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
76 changes: 76 additions & 0 deletions BumpVersion.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

function Has-Version {
param ($version)

# Check if the version argument is provided
if ($version.Count -eq 0) {
Write-Host "Please provide the version number as an argument. Usage: .\bump-version.ps1 <new-version>"
exit
}

# Get the new version from the CLI argument
return $version[0]
}

$newVersion = Has-Version($args)

# Function to validate the version format (X.X.X where X is a number)
function Validate-VersionFormat {
param (
[string]$version
)

# Regex pattern for validating version format (X.X.X)
$versionPattern = '^\d+\.\d+\.\d+$'

# Check if version matches the pattern
return $version -match $versionPattern
}

# Function to update version in a file
function Update-Version {
param (
[string]$filePath,
[string]$searchPattern,
[string]$newVersion,
[string]$replacementPattern
)

# Read the content of the file
$content = Get-Content $filePath

# Replace the version based on the provided pattern and replacement
$updatedContent = $content -replace $searchPattern, $replacementPattern

# Write the updated content back to the file
Set-Content $filePath -Value $updatedContent

Write-Host "Updated version in $filePath to $newVersion"
}

# Check if the version format is valid
if (-not (Validate-VersionFormat $newVersion)) {
Write-Host "Invalid version format. Please use the format: X.X.X where X is a number."
exit
}

# Define the paths and patterns for each file
$filesToUpdate = @(
@{
FilePath = ".\GsaGH\GsaGH.csproj"
SearchPattern = '<Version>(.*?)<\/Version>'
ReplacementPattern = "<Version>$newVersion</Version>"
},
@{
FilePath = ".\GsaGH\GsaGHInfo.cs"
SearchPattern = 'string GrasshopperVersion = "(.*?)"'
ReplacementPattern = 'string GrasshopperVersion = "' + $newVersion + '"'
}
)

# Loop through each file and update the version
foreach ($file in $filesToUpdate) {
Update-Version -filePath $file.FilePath -searchPattern $file.SearchPattern -newVersion $newVersion -replacementPattern $file.ReplacementPattern
}

Write-Host "Version update completed."
2 changes: 2 additions & 0 deletions DocsGeneration/Data/Component.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;

using DocsGeneration.Data.Helpers;

using Grasshopper.Kernel;

namespace DocsGeneration.Data {
Expand Down
6 changes: 4 additions & 2 deletions DocsGeneration/Data/Parameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
using System.Reflection;
using System.Text.RegularExpressions;
using System.Xml;

using DocsGeneration.Data.Helpers;
using DocsGeneration.Helpers;

using Grasshopper.Kernel;

using OasysUnits;

namespace DocsGeneration.Data {
Expand Down Expand Up @@ -156,8 +159,7 @@ public static List<Parameter> GetParameters(Type[] typelist, List<Component> com
parameters.Add(param);
Console.WriteLine($"Added {param.Name} parameter");
}
}
catch (Exception) {
} catch (Exception) {
continue;
}
}
Expand Down
4 changes: 3 additions & 1 deletion DocsGeneration/MarkDowns/Components.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;

using DocsGeneration.Data;
using DocsGeneration.MarkDowns.Helpers;

using GsaGH.Components.Helpers;
using GsaGH.Helpers;

Expand Down Expand Up @@ -97,7 +99,7 @@ private static void CreateComponent(Component component, List<string> parmeterNa
FileHelper.CreateIconLink(property),
FileHelper.CreateParameterLink(property, parmeterNames),
StringHelper.MakeBold(property.Name),
property.Description.Replace("GSA ", string.Empty),
property.Description.Replace(StringHelper.PrefixBetweenTypes, string.Empty),
});
}

Expand Down
2 changes: 2 additions & 0 deletions DocsGeneration/MarkDowns/Helpers/FileHelper.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

using DocsGeneration.Data;

using GsaGH.Helpers;

namespace DocsGeneration.MarkDowns.Helpers {
Expand Down
Loading

0 comments on commit 0790c8e

Please sign in to comment.