Skip to content

Commit

Permalink
v0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Jan 8, 2025
1 parent bc68909 commit e2a42c9
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 53 deletions.
18 changes: 7 additions & 11 deletions PSProjectStatus.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@{
RootModule = 'PSProjectStatus.psm1'
ModuleVersion = '0.16.0'
ModuleVersion = '0.17.0'
CompatiblePSEditions = 'Desktop', 'Core'
GUID = 'ec249544-dc4e-4e24-aae8-4281ec84f54d'
Author = 'Jeff Hicks'
Expand All @@ -27,22 +27,18 @@
ProjectUri = 'https://github.com/jdhitsolutions/PSProjectStatus'
IconUri = 'https://raw.githubusercontent.com./jdhitsolutions/PSProjectStatus/main/images/psproject-icon.png'
ReleaseNotes = @'
## [0.16.0] - 2025-01-07
### Added
- Added localized verbose messaging, help documentation, and a version of the README help to French. Translations were done with GitHub CoPilot so I can't guarantee the quality.
## [0.17.0] - 2025-01-08
### Changed
- Updated `README.md`.
- Updated help documentation.
- Revised PDF layout settings.
- Moved default help PDF to en-US.
- Updates to `README` files.
### Fixed
- Fixed `Get-PSProjectTask` bug. [Issue #14](https://github.com/jdhitsolutions/PSProjectStatus/issues/14).
- Fixed `Open-PSProjectStatusHelp` to make `-AsMarkdown` a dynamic parameter for PowerShell 7. [Issue #13](https://github.com/jdhitsolutions/PSProjectStatus/issues/13)
- Fixed doc links in the French help PDF file. [Issue #16](https://github.com/jdhitsolutions/PSProjectStatus/issues/16)
- Fixed issue trying to open default `README` as markdown. [Issue #15](https://github.com/jdhitsolutions/PSProjectStatus/issues/15)
- Fixed task-related bugs. Rolled class definition and code back to v0.14.0. [Issue #17](https://github.com/jdhitsolutions/PSProjectStatus/issues/17) _This is a potential breaking change._
'@
RequireLicenseAcceptance = $false
}
Expand Down
45 changes: 10 additions & 35 deletions PSProjectStatus.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,13 @@ Class PSProjectRemote {
}
}

Class PSProjectTask {
<#
this class is designed with future enhancements in mind.
Not all properties are utilized in the current version of the module.
#>

[int32]$TaskID
[string]$TaskName
[string]$TaskDescription
[PSProjectTaskPriority]$Priority
[string[]]$TaskTags
[DateTime]$Created = (Get-Date)
[DateTime]$DueDate
[DateTime]$CompletedDate
[ValidateRange(0, 100)]
[Int32]$Progress = 0
[string]$AssignedTo = [System.Environment]::Username
[System.Boolean]$Completed = $false
[string]$ProjectName
[string]$Path

PSProjectTask ([string]$TaskName) {
# $this.TaskID = _getNextTaskID
$this.TaskName = $TaskName
#$this.TaskDescription = $Description
}
PSProjectTask () {

}
}
#7 Jan 2025 - removed PSProjectTask class as this is still a work in progress
#Rolling back related code in the module to 0.14.0
Class PSProject {
[string]$Name = (Split-Path (Get-Location).path -Leaf)
[string]$Path = (Convert-Path (Get-Location).path)
[DateTime]$LastUpdate = (Get-Date)
[PSProjectTask[]]$Tasks = @()
[string[]]$Tasks = @()
[PSProjectStatus]$Status = 'Development'
[Version]$ProjectVersion = (Test-ModuleManifest -Path ".\$(Split-Path $pwd -Leaf).psd1" -Verbose:$False -ErrorAction SilentlyContinue).version
[string]$GitBranch = ''
Expand All @@ -114,7 +86,8 @@ Class PSProject {
$json = Join-Path -Path $this.Path -ChildPath psproject.json
#convert the ProjectVersion to a string in the JSON file
#convert the LastUpdate to a formatted date string
$this | Select-Object -Property @{Name = '$schema'; Expression = { 'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/psproject.schema.json' } },
$this | Select-Object -Property @{Name = '$schema';
Expression = { 'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/psproject.schema.json' } },
Name, Path,
@{Name = 'LastUpdate'; Expression = { '{0:o}' -f $_.LastUpdate } },
@{Name = 'Status'; Expression = { $_.status.toString() } },
Expand Down Expand Up @@ -170,7 +143,8 @@ This would be a major breaking change
#>

<# Class PSProjectTask {
#7 Jan 2025 Restoring the old version until the new PSProjectTask class is ready
Class PSProjectTask {
[string]$ProjectName
[string]$Path
[string]$TaskDescription
Expand All @@ -183,7 +157,8 @@ This would be a major breaking change
$this.TaskDescription = $TaskDescription
$this.ProjectVersion = $ProjectVersion
}
} #>
}


#endregion

Expand Down Expand Up @@ -347,7 +322,7 @@ $PSProjectANSI = @{
Set-Variable -Name PSProjectANSI -Description "a hash table to store ANSI escape sequences for different commands used in verbose output. You can modify settings using ANSI sequences or `$PSStyle"

#Export the module version to a global variable that will be used in Verbose messages
New-Variable -Name PSProjectStatusModule -Value '0.16.0' -Description 'The PSProjectStatus module version used in verbose messaging.'
New-Variable -Name PSProjectStatusModule -Value '0.17.0' -Description 'The PSProjectStatus module version used in verbose messaging.'

Export-ModuleMember -Variable PSProjectStatusModule, PSProjectANSI -Alias 'Update-PSProjectStatus', 'gitstat', 'gpstat', 'npstat', 'spstat'

Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ Class PSProjectRemote {
}
}
Class PSProjectTask {
[string]$ProjectName
[string]$Path
[string]$TaskDescription
[version]$ProjectVersion
[int]$TaskID
PSProjectTask ($TaskDescription,$Path,$ProjectName,$ProjectVersion) {
$this.ProjectName = $ProjectName
$this.Path = $Path
$this.TaskDescription = $TaskDescription
$this.ProjectVersion = $ProjectVersion
}
}
#I have formatted longer lines with artificial line breaks to fit a
#printed page.
Class PSProject {
Expand Down Expand Up @@ -235,7 +250,7 @@ Note that the update time is formatted as a UTC string. The project version will
## Getting a Project Status

The easiest way to view a project status is by using [Get-PSProjectStatus](docs/New-PSProjectStatus.md).
The easiest way to view a project status is by using [Get-PSProjectStatus](docs/Get-PSProjectStatus.md).

```powershell
PS C:\scripts\PSCalendar> Get-PSProjectStatus
Expand Down
16 changes: 15 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

## [Unreleased]

## [0.17.0] - 2025-01-08

### Changed

- Moved default help PDF to en-US.
- Updates to `README` files.

### Fixed

- Fixed doc links in the French help PDF file. [Issue #16](https://github.com/jdhitsolutions/PSProjectStatus/issues/16)
- Fixed issue trying to open default `README` as markdown. [Issue #15](https://github.com/jdhitsolutions/PSProjectStatus/issues/15)
- Fixed task-related bugs. Rolled class definition and code back to v0.14.0. [Issue #17](https://github.com/jdhitsolutions/PSProjectStatus/issues/17) _This is a potential breaking change._

## [0.16.0] - 2025-01-07

### Added
Expand Down Expand Up @@ -255,7 +268,8 @@
- Modified `New-PSProjectStatus` to convert all paths to full filesystem paths and not PSDrives.
- Updated `psproject.format.ps1xml` to adjust table widths. Added a default list view.

[Unreleased]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.16.0..HEAD
[Unreleased]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.17.0..HEAD
[0.17.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.16.0..v0.17.0
[0.16.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.15.0..v0.16.0
[0.15.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/vv0.14.1..v0.15.0
[v0.14.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.14.0..v0.14.1
Expand Down
Binary file not shown.
Binary file modified fr-fr/PSProjectStatus-Help.pdf
Binary file not shown.
17 changes: 16 additions & 1 deletion fr-fr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ Class PSProjectRemote {
}
}
Class PSProjectTask {
[string]$ProjectName
[string]$Path
[string]$TaskDescription
[version]$ProjectVersion
[int]$TaskID
PSProjectTask ($TaskDescription,$Path,$ProjectName,$ProjectVersion) {
$this.ProjectName = $ProjectName
$this.Path = $Path
$this.TaskDescription = $TaskDescription
$this.ProjectVersion = $ProjectVersion
}
}
#J'ai formaté les lignes plus longues avec des sauts de ligne artificiels
#pour tenir sur une page imprimée.
Class PSProject {
Expand Down Expand Up @@ -237,7 +252,7 @@ Notez que l'heure de mise à jour est formatée en tant que chaîne UTC. La vers
## Obtention d'un statut de projet

La façon la plus simple de visualiser un statut de projet est d'utiliser [Get-PSProjectStatus](../docs-fr/New-PSProjectStatus.md).
La façon la plus simple de visualiser un statut de projet est d'utiliser [Get-PSProjectStatus](../docs-fr/Get-PSProjectStatus.md).

```powershell
PS C:\scripts\PSCalendar> Get-PSProjectStatus
Expand Down
8 changes: 7 additions & 1 deletion functions/public/Get-PSProjectTask.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@ Function Get-PSProjectTask {
#define a project task ID number
$i = 1
foreach ($task in $in.tasks) {
<#
7 Jan 2025 Rolling this code back to v0.14.0 until
the new PSProjectTask class is ready
#6 Jan 2024 Fix task constructor. Issue #14
#$taskItem = [PSProjectTask]::New($task,$in.Path,$in.Name,$in.ProjectVersion)
$taskItem = [PSProjectTask]::New($in.Name)
$taskItem.TaskDescription = $task
$taskItem.Path = $in.Path
$taskItem.ProjectName = $in.Name
#$taskItem.ProjectVersion = $in.ProjectVersion #>
#$taskItem.ProjectVersion = $in.ProjectVersion
#>
$taskItem = [PSProjectTask]::New($task,$in.Path, $in.Name, $in.ProjectVersion)
$taskItem.TaskID = $i
if ($TaskID -AND ($TaskID -eq $i)) {
$taskItem
Expand Down
7 changes: 4 additions & 3 deletions functions/public/Open-README.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Function Open-PSProjectStatusHelp {
_verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion)
_verbose -message ($strings.UsingHost -f $host.Name)
_verbose -message ($strings.UsingOS -f $PSVersionTable.OS)
_verbose -message ($strings.UsingModule -f $ModuleVersion)
_verbose -message ($strings.UsingModule -f $PSProjectStatusModule)
}

#write-debug "detected culture $((Get-Culture).Name)"
Expand All @@ -46,7 +46,7 @@ Function Open-PSProjectStatusHelp {
#relative to the module root

#test for localized help
if (Test-Path -Path "$PSScriptRoot\..\..\$((Get-Culture).Name)") {
if (Test-Path -Path "$PSScriptRoot\..\..\$((Get-Culture).Name)\README.md") {
$docPath = "$PSScriptRoot\..\..\$((Get-Culture).Name)\README.md"
}
else {
Expand All @@ -64,14 +64,15 @@ Function Open-PSProjectStatusHelp {
#write-debug "Using en-US help"
$docPath = "$PSScriptRoot\..\..\PSProjectStatus-Help.pdf"
}
#write-debug "using docpath $docPath"
}
#Write-Debug "using docpath $docPath"

} #begin
Process {
$PSDefaultParameterValues['_verbose:block'] = 'Process'
if ($PSBoundParameters.ContainsKey('AsMarkdown')) {
_verbose -Message $strings.OpenMarkdownHelp
_verbose -message $docPath
Show-Markdown -Path $docPath
}
else {
Expand Down

0 comments on commit e2a42c9

Please sign in to comment.