Bring into WoofWare brand (#14)

This commit is contained in:
Patrick Stevens
2023-12-27 20:57:16 +00:00
committed by GitHub
parent 23d31d67bb
commit c4bfd5eedb
17 changed files with 75 additions and 72 deletions

View File

@@ -5,7 +5,7 @@
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<MyriadSdkGenerator Include="$(MSBuildThisFileDirectory)..\MyriadPlugin\bin\$(Configuration)\net6.0\MyriadPlugin.dll" /> <MyriadSdkGenerator Include="$(MSBuildThisFileDirectory)..\WoofWare.Myriad.Plugins\bin\$(Configuration)\net6.0\WoofWare.Myriad.Plugins.dll" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -28,7 +28,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\MyriadPlugin\MyriadPlugin.fsproj" /> <ProjectReference Include="..\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj" />
<PackageReference Include="Myriad.Sdk" Version="0.8.3" /> <PackageReference Include="Myriad.Sdk" Version="0.8.3" />
<PackageReference Include="Myriad.Core" Version="0.8.3" /> <PackageReference Include="Myriad.Core" Version="0.8.3" />
</ItemGroup> </ItemGroup>

View File

@@ -6,7 +6,7 @@ module Literals =
[<Literal>] [<Literal>]
let something = "something" let something = "something"
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type InnerType = type InnerType =
{ {
[<JsonPropertyName(Literals.something)>] [<JsonPropertyName(Literals.something)>]
@@ -14,7 +14,7 @@ type InnerType =
} }
/// My whatnot /// My whatnot
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type JsonRecordType = type JsonRecordType =
{ {
/// A thing! /// A thing!

View File

@@ -6,7 +6,7 @@ open System
open System.Text.Json.Serialization open System.Text.Json.Serialization
/// Describes the opening hours of a given gym. /// Describes the opening hours of a given gym.
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type GymOpeningHours = type GymOpeningHours =
{ {
/// If this is true, there should be no OpeningHours (but nothing enforces that). /// If this is true, there should be no OpeningHours (but nothing enforces that).
@@ -23,7 +23,7 @@ type GymOpeningHours =
this.OpeningHours |> String.concat ", " this.OpeningHours |> String.concat ", "
/// How a human can authenticate with a gym when they physically try to enter it /// How a human can authenticate with a gym when they physically try to enter it
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type GymAccessOptions = type GymAccessOptions =
{ {
/// This gym has PIN entry pads /// This gym has PIN entry pads
@@ -33,7 +33,7 @@ type GymAccessOptions =
} }
/// Where a gym is on the Earth /// Where a gym is on the Earth
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type GymLocation = type GymLocation =
{ {
/// Measured in degrees /// Measured in degrees
@@ -45,7 +45,7 @@ type GymLocation =
} }
/// The postal address of a gym /// The postal address of a gym
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type GymAddress = type GymAddress =
{ {
/// E.g. "Canterbury Court" /// E.g. "Canterbury Court"
@@ -80,7 +80,7 @@ type GymAddress =
|> String.concat "\n" |> String.concat "\n"
/// Metadata about a physical gym /// Metadata about a physical gym
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type Gym = type Gym =
{ {
// The following fields are returned but are always null // The following fields are returned but are always null
@@ -135,7 +135,7 @@ Opening hours: %s{string<GymOpeningHours> this.GymOpeningHours}
""" """
/// A human member of PureGym /// A human member of PureGym
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type Member = type Member =
{ {
/// This member's ID. This is a fairly large number. /// This member's ID. This is a fairly large number.
@@ -171,7 +171,7 @@ type Member =
} }
/// Statistics for how many people are currently at a gym /// Statistics for how many people are currently at a gym
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type GymAttendance = type GymAttendance =
{ {
/// This appears always to be just equal to TotalPeopleInGym, but a string. /// This appears always to be just equal to TotalPeopleInGym, but a string.
@@ -216,7 +216,7 @@ type MemberActivityThisMonth =
} }
/// Don't use this type. It's public because System.Text.Json can't do private types. /// Don't use this type. It's public because System.Text.Json can't do private types.
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type MemberActivityDto = type MemberActivityDto =
{ {
[<JsonRequired>] [<JsonRequired>]
@@ -243,7 +243,7 @@ type MemberActivityDto =
LastRefreshed = this.LastRefreshed LastRefreshed = this.LastRefreshed
} }
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type SessionsAggregate = type SessionsAggregate =
{ {
/// Number of gym "activities" within some query-defined time period; presumably this is like classes? /// Number of gym "activities" within some query-defined time period; presumably this is like classes?
@@ -256,7 +256,7 @@ type SessionsAggregate =
} }
/// The DTO for gym info returned from the Sessions endpoint. /// The DTO for gym info returned from the Sessions endpoint.
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type VisitGym = type VisitGym =
{ {
// Omitting Location, GymAccess, ContactInfo, TimeZone because these were all null for me // Omitting Location, GymAccess, ContactInfo, TimeZone because these were all null for me
@@ -269,7 +269,7 @@ type VisitGym =
} }
/// Summary of a single visit to a gym. /// Summary of a single visit to a gym.
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type Visit = type Visit =
{ {
// Omitted Name because it always was null for me // Omitted Name because it always was null for me
@@ -289,7 +289,7 @@ type Visit =
$"%s{this.Gym.Name}: %s{startTime} (%i{this.Duration} minutes)" $"%s{this.Gym.Name}: %s{startTime} (%i{this.Duration} minutes)"
/// Aggregate statistics for gym visits across a time period. /// Aggregate statistics for gym visits across a time period.
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type SessionsSummary = type SessionsSummary =
{ {
/// Aggregate stats for gym visits within the query-dependent time period. /// Aggregate stats for gym visits within the query-dependent time period.
@@ -302,7 +302,7 @@ type SessionsSummary =
override this.ToString () = override this.ToString () =
$"%i{this.Total.Visits} visits, totalling %i{this.Total.Duration} minutes" $"%i{this.Total.Visits} visits, totalling %i{this.Total.Duration} minutes"
[<MyriadPlugin.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type Sessions = type Sessions =
{ {
Summary : SessionsSummary Summary : SessionsSummary

View File

@@ -5,7 +5,7 @@ type ParseState =
| AwaitingValue of string | AwaitingValue of string
/// My whatnot /// My whatnot
[<MyriadPlugin.RemoveOptions>] [<WoofWare.Myriad.Plugins.RemoveOptions>]
type RecordType = type RecordType =
{ {
/// A thing! /// A thing!

View File

@@ -5,6 +5,8 @@
<NetCoreTargetingPackRoot>[UNDEFINED]</NetCoreTargetingPackRoot> <NetCoreTargetingPackRoot>[UNDEFINED]</NetCoreTargetingPackRoot>
<DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder> <DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarnOn>FS3559</WarnOn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.128" PrivateAssets="all" /> <PackageReference Include="Nerdbank.GitVersioning" Version="3.6.128" PrivateAssets="all" />

View File

@@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\MyriadPlugin\MyriadPlugin.fsproj" /> <ProjectReference Include="..\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj" />
<ProjectReference Include="..\ConsumePlugin\ConsumePlugin.fsproj" /> <ProjectReference Include="..\ConsumePlugin\ConsumePlugin.fsproj" />
</ItemGroup> </ItemGroup>

View File

@@ -1,7 +1,7 @@
namespace MyriadPlugin.Test namespace MyriadPlugin.Test
open NUnit.Framework open NUnit.Framework
open MyriadPlugin open WoofWare.Myriad.Plugins
open ApiSurface open ApiSurface
[<TestFixture>] [<TestFixture>]

View File

@@ -1,8 +0,0 @@
MyriadPlugin.JsonParseAttribute inherit System.Attribute
MyriadPlugin.JsonParseAttribute..ctor [constructor]: unit
MyriadPlugin.JsonParseGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
MyriadPlugin.JsonParseGenerator..ctor [constructor]: unit
MyriadPlugin.RemoveOptionsAttribute inherit System.Attribute
MyriadPlugin.RemoveOptionsAttribute..ctor [constructor]: unit
MyriadPlugin.RemoveOptionsGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
MyriadPlugin.RemoveOptionsGenerator..ctor [constructor]: unit

View File

@@ -1,4 +1,4 @@
namespace MyriadPlugin namespace WoofWare.Myriad.Plugins
open Fantomas.FCS.Syntax open Fantomas.FCS.Syntax
open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.SyntaxTrivia

View File

@@ -1,4 +1,4 @@
namespace MyriadPlugin namespace WoofWare.Myriad.Plugins
open System open System
open System.Text open System.Text

View File

@@ -1,4 +1,4 @@
namespace MyriadPlugin namespace WoofWare.Myriad.Plugins
open System open System
open Fantomas.FCS.Syntax open Fantomas.FCS.Syntax

View File

@@ -0,0 +1,8 @@
WoofWare.Myriad.Plugins.JsonParseAttribute inherit System.Attribute
WoofWare.Myriad.Plugins.JsonParseAttribute..ctor [constructor]: unit
WoofWare.Myriad.Plugins.JsonParseGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
WoofWare.Myriad.Plugins.JsonParseGenerator..ctor [constructor]: unit
WoofWare.Myriad.Plugins.RemoveOptionsAttribute inherit System.Attribute
WoofWare.Myriad.Plugins.RemoveOptionsAttribute..ctor [constructor]: unit
WoofWare.Myriad.Plugins.RemoveOptionsGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
WoofWare.Myriad.Plugins.RemoveOptionsGenerator..ctor [constructor]: unit

View File

@@ -12,6 +12,7 @@
<PackageTags>myriad;fsharp;source-generator;source-gen;json</PackageTags> <PackageTags>myriad;fsharp;source-generator;source-gen;json</PackageTags>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarnOn>FS3559</WarnOn> <WarnOn>FS3559</WarnOn>
<PackageId>WoofWare.Myriad.Plugins</PackageId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.2", "version": "1.0",
"publicReleaseRefSpec": [ "publicReleaseRefSpec": [
"^refs/heads/main$" "^refs/heads/main$"
], ],

View File

@@ -2,7 +2,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ConsumePlugin", "ConsumePlugin\ConsumePlugin.fsproj", "{0D174482-9CB2-448A-8BA8-846FAEC65579}" Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ConsumePlugin", "ConsumePlugin\ConsumePlugin.fsproj", "{0D174482-9CB2-448A-8BA8-846FAEC65579}"
EndProject EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyriadPlugin", "MyriadPlugin\MyriadPlugin.fsproj", "{DB86C53B-4090-4791-884B-024C5759855F}" Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins", "WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj", "{DB86C53B-4090-4791-884B-024C5759855F}"
EndProject EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyriadPlugin.Test", "MyriadPlugin.Test\MyriadPlugin.Test.fsproj", "{13370CA7-2A80-4B4D-8DEB-F1AA77F206C4}" Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyriadPlugin.Test", "MyriadPlugin.Test\MyriadPlugin.Test.fsproj", "{13370CA7-2A80-4B4D-8DEB-F1AA77F206C4}"
EndProject EndProject

View File

@@ -48,8 +48,8 @@
src = ./nix/fetchDeps.sh; src = ./nix/fetchDeps.sh;
pname = pname; pname = pname;
binPath = pkgs.lib.makeBinPath [pkgs.coreutils dotnet-sdk (pkgs.nuget-to-nix.override {inherit dotnet-sdk;})]; binPath = pkgs.lib.makeBinPath [pkgs.coreutils dotnet-sdk (pkgs.nuget-to-nix.override {inherit dotnet-sdk;})];
projectFiles = toString ["./MyriadPlugin/MyriadPlugin.fsproj" "./ConsumePlugin/ConsumePlugin.fsproj"]; projectFiles = toString ["./WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj" "./ConsumePlugin/ConsumePlugin.fsproj"];
testProjectFiles = ["./MyriadPlugin.Test/MyriadPlugin.Test.fsproj"]; testProjectFiles = ["./WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj"];
rids = pkgs.lib.concatStringsSep "\" \"" runtimeIds; rids = pkgs.lib.concatStringsSep "\" \"" runtimeIds;
packages = dotnet-sdk.packages; packages = dotnet-sdk.packages;
storeSrc = pkgs.srcOnly { storeSrc = pkgs.srcOnly {
@@ -63,7 +63,7 @@
name = "argument-helpers"; name = "argument-helpers";
version = version; version = version;
src = ./.; src = ./.;
projectFile = "./MyriadPlugin/MyriadPlugin.fsproj"; projectFile = "./WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj";
nugetDeps = ./nix/deps.nix; nugetDeps = ./nix/deps.nix;
doCheck = true; doCheck = true;
dotnet-sdk = dotnet-sdk; dotnet-sdk = dotnet-sdk;

View File

@@ -2,8 +2,8 @@
dotnet \ dotnet \
"/Users/patrick/.nuget/packages/myriad.sdk/0.8.3/build/../tools/net6.0/any/Myriad.dll" \ "/Users/patrick/.nuget/packages/myriad.sdk/0.8.3/build/../tools/net6.0/any/Myriad.dll" \
--inputfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/RecordFile.fs" \ --inputfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/RecordFile.fs" \
--outputfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/Generated.fs" \ --outputfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/Generated.fs" \
--configfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/myriad.toml" \ --configfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/myriad.toml" \
--contextfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/obj/myriad.context.toml" \ --contextfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/obj/myriad.context.toml" \
--plugin "/Users/patrick/Documents/GitHub/MyriadPlugin/MyriadPlugin/bin/Debug/net8.0/MyriadPlugin.dll" --plugin "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins/bin/Debug/net8.0/WoofWare.Myriad.Plugins.dll"