Skip to content

Commit

Permalink
Merge pull request #65 from specklesystems/dev
Browse files Browse the repository at this point in the history
Update `dev` with changes from `main`
  • Loading branch information
AlanRynne authored Mar 14, 2024
2 parents 95f51b0 + 92fc894 commit 85b9e88
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 147 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
- run:
name: "Build Data Connector"
command: "msbuild Speckle.proj /restore /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true"
- run:
name: Create Innosetup signing cert
command: |
echo $env:PFX_B64 > "tools\AEC Systems Ltd.txt"
certutil -decode "tools\AEC Systems Ltd.txt" "tools\AEC Systems Ltd.pfx"
- run:
name: Create Signed PFX file
command: .\tools\MakePQX\MakePQX.exe pack -mz bin/Speckle.mez -t bin/Speckle.pqx -c "tools\AEC Systems Ltd.pfx" -p $env:PFX_PSW
- run:
name: Build Installer
command: tools\InnoSetup\ISCC.exe tools\powerbi.iss /Sbyparam=$p
shell: cmd.exe #does not work in powershell
# - run:
# name: Create Innosetup signing cert
# command: |
# echo $env:PFX_B64 > "tools\AEC Systems Ltd.txt"
# certutil -decode "tools\AEC Systems Ltd.txt" "tools\AEC Systems Ltd.pfx"
# - run:
# name: Create Signed PFX file
# command: .\tools\MakePQX\MakePQX.exe pack -mz bin/Speckle.mez -t bin/Speckle.pqx -c "tools\AEC Systems Ltd.pfx" -p $env:PFX_PSW
# - run:
# name: Build Installer
# command: tools\InnoSetup\ISCC.exe tools\powerbi.iss /Sbyparam=$p
# shell: cmd.exe #does not work in powershell
- store_artifacts:
path: ./bin
- persist_to_workspace:
Expand All @@ -40,7 +40,7 @@ jobs:
- bin/*
deploy-connector:
docker:
- image: cibuilds/github:0.10
- image: cibuilds/github:0.13
steps:
- attach_workspace:
at: ./
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Go to the [Releases](https://github.com/specklesystems/speckle-powerbi/releases)
```
YOUR_USER_FOLDER\Documents\Power BI Desktop\Custom Connectors\
```
If the folder doesn't exist, create it.

### Allow custom extensions to run

Expand Down
40 changes: 16 additions & 24 deletions Speckle.pq
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Speckle = [
// This is the custom authentication strategy for our Connector
Authentication = [
OAuth = [
Label = "Speckle.xyz",
Label = "Speckle Account",
StartLogin = (clientApplication, dataSourcePath, state, display) =>
let
server = Text.Combine(
Expand Down Expand Up @@ -86,10 +86,10 @@ Speckle = [
],
Key = [
KeyLabel = "Personal Access Token",
Label = "Private stream"
Label = "Private Project"
],
Implicit = [
Label = "Public stream"
Label = "Public Project"
]
],
Label = "Speckle"
Expand All @@ -103,20 +103,16 @@ shared Speckle.GetByUrl.Structured = Value.ReplaceType(
url as (
Uri.Type meta [
Documentation.FieldCaption = "Gets a Speckle Object preserving it's structure",
Documentation.FieldDescription = "The url of a stream in a Speckle server. You can copy it directly from your browser.",
Documentation.SampleValues = {
"https://speckle.xyz/streams/23401adf",
"https://speckle.xyz/streams/23401adf/branches/main"
}
Documentation.FieldDescription = "The url of a model in a Speckle server project. You can copy it directly from your browser.",
Documentation.SampleValues = {"https://app.speckle.systems/projects/23401adf/models/1234568"}
]
)
) as record meta [
Documentation.Name = "Speckle - Get Structured Object by URL",
Documentation.LongDescription = "Returns the Speckle object the URL points to, while also preserving it's structure.
Supports all types of stream url:#(lf)
- Stream: will get the latest commit on the 'main' branch (i.e. 'https://speckle.xyz/streams/STREAM_ID')#(lf)
- Branch: will get the latest commit on the specified branch (i.e. 'https://speckle.xyz/streams/STREAM_ID/branches/BRANCH_NAME')#(lf)
- Commit: will get a specific commit from the stream (i.e. 'https://speckle.xyz/streams/STREAM_ID/commits/COMMIT_ID')
Supports all types of model url:#(lf)
- Model: will get the latest version of the specified model (i.e. 'https://app.speckle.systems/projects/PROJECT_ID/models/MODEL_ID')#(lf)
- Version: will get a specific version from the project (i.e. 'https://app.speckle.systems/projects/PROJECT_ID/models/MODEL_ID@VERSION_ID')
"
]
);
Expand All @@ -132,21 +128,17 @@ shared Speckle.GetByUrl = Value.ReplaceType(
type function (
url as (
Uri.Type meta [
Documentation.FieldCaption = "Stream URL",
Documentation.FieldDescription = "The url of a stream in a Speckle server. You can copy it directly from your browser.",
Documentation.SampleValues = {
"https://speckle.xyz/streams/23401adf",
"https://speckle.xyz/streams/23401adf/branches/main"
}
Documentation.FieldCaption = "Model URL",
Documentation.FieldDescription = "The url of a model in a Speckle server. You can copy it directly from your browser.",
Documentation.SampleValues = {"https://app.speckle.systems/projects/23401adf/models/1234568"}
]
)
) as table meta [
Documentation.Name = "Speckle - Get stream by URL",
Documentation.LongDescription = "Returns a flat list of all objects contained in a specific Speckle stream/branch/commit/object.
Supports all types of stream url:#(lf)
- Stream: will get the latest commit on the 'main' branch (i.e. 'https://speckle.xyz/streams/STREAM_ID')#(lf)
- Branch: will get the latest commit on the specified branch (i.e. 'https://speckle.xyz/streams/STREAM_ID/branches/BRANCH_NAME')#(lf)
- Commit: will get a specific commit from the stream (i.e. 'https://speckle.xyz/streams/STREAM_ID/commits/COMMIT_ID')
Documentation.Name = "Speckle - Get Model by URL",
Documentation.LongDescription = "Returns a flat list of all objects contained in a Speckle model/version of a specific a project.
Supports all types of model url:#(lf)
- Model: will get the latest version of the specified model (i.e. 'https://app.speckle.systems/projects/PROJECT_ID/models/MODEL_ID')#(lf)
- Version: will get a specific version from the project (i.e. 'https://app.speckle.systems/projects/PROJECT_ID/models/MODEL_ID@VERSION_ID')
"
]
);
Expand Down
169 changes: 87 additions & 82 deletions assets/resources.resx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
<!--
Microsoft ResX Schema
Version 2.0
Expand All @@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing"
mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment>
</data>
Expand Down Expand Up @@ -59,116 +61,119 @@
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="GetByUrl.Help" xml:space="preserve">
<value>Connect to Speckle by Stream URL</value>
</data>
<data name="GetByUrl.Label" xml:space="preserve">
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="GetByUrl.Help" xml:space="preserve">
<value>Connect to Speckle by Model URL</value>
</data>
<data name="GetByUrl.Label" xml:space="preserve">
<value>Speckle</value>
</data>
<data name="GetByUrl.Title" xml:space="preserve">
<value>Speckle - Get stream by URL</value>
<data name="GetByUrl.Title" xml:space="preserve">
<value>Speckle - Get Model by URL</value>
</data>
<data name="GetObjFromBranch.Help" xml:space="preserve">
<value>Connect to Speckle by serer URL, stream ID and branch name</value>
<data name="GetObjFromBranch.Help" xml:space="preserve">
<value>Connect to Speckle by server URL, stream ID and branch name</value>
</data>
<data name="GetObjFromBranch.Label" xml:space="preserve">
<data name="GetObjFromBranch.Label" xml:space="preserve">
<value>Get the latest commit from a stream's branch</value>
</data>
<data name="GetObjFromBranch.Title" xml:space="preserve">
<data name="GetObjFromBranch.Title" xml:space="preserve">
<value>Speckle - Get Stream branch</value>
</data>
<data name="GetObjFromCommit.Help" xml:space="preserve">
<data name="GetObjFromCommit.Help" xml:space="preserve">
<value>Connect to Speckle by server URL, stream ID and commit ID</value>
</data>
<data name="GetObjFromCommit.Label" xml:space="preserve">
<data name="GetObjFromCommit.Label" xml:space="preserve">
<value>A label</value>
</data>
<data name="GetObjFromCommit.Title" xml:space="preserve">
<data name="GetObjFromCommit.Title" xml:space="preserve">
<value>Speckle - Get Stream commit</value>
</data>
<data name="GetStream.Help" xml:space="preserve">
<data name="GetStream.Help" xml:space="preserve">
<value>Connect to Speckle by server URL and stream ID</value>
</data>
<data name="GetStream.Label" xml:space="preserve">
<data name="GetStream.Label" xml:space="preserve">
<value>Speckle</value>
</data>
<data name="GetStream.Title" xml:space="preserve">
<value>Speckle - Get Stream by URL [Structured]</value>
<data name="GetStream.Title" xml:space="preserve">
<value>Speckle - Get Model by URL [Structured]</value>
</data>
<data name="GetObjectAsNavTable.Title" xml:space="preserve">
<data name="GetObjectAsNavTable.Title" xml:space="preserve">
<value>Speckle - Get Object as NavTable</value>
</data>
<data name="GetObjectAsNavTable.Label" xml:space="preserve">
<data name="GetObjectAsNavTable.Label" xml:space="preserve">
<value>Speckle</value>
</data>
<data name="GetObjectAsNavTable.Help" xml:space="preserve">
<data name="GetObjectAsNavTable.Help" xml:space="preserve">
<value>Returns a navigation table for a given object</value>
</data>
<data name="Traverse.Title" xml:space="preserve">
<data name="Traverse.Title" xml:space="preserve">
<value>Traverse an object and populate refs</value>
</data>
<data name="Traverse.Label" xml:space="preserve">
<data name="Traverse.Label" xml:space="preserve">
<value>Traverse</value>
</data>
<data name="Traverse.Help" xml:space="preserve">
<data name="Traverse.Help" xml:space="preserve">
<value>Traverse help</value>
</data>
</root>
10 changes: 5 additions & 5 deletions speckle/GetByUrl.pqm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
let
Fetch = Extension.LoadFunction("Api.Fetch.pqm"),
GetObject = Extension.LoadFunction("Api.GetObject.pqm"),
GetAllObjectChildren = Extension.LoadFunction("Api.GetAllObjectChildren.pqm"),
GetObjectFromCommit = Extension.LoadFunction("GetObjectFromCommit.pqm"),
GetObjectFromBranch = Extension.LoadFunction("GetObjectFromBranch.pqm"),
Expand Down Expand Up @@ -34,10 +35,9 @@ in
GetObjectFromBranch(server, id, stream[branch])
else
GetObjectFromBranch(server, id, "main"),
removeEmpty = Table.RemoveLastN(commitObjectsTable, 1),
addStreamUrl = Table.AddColumn(removeEmpty, "Stream URL", each server & "/streams/" & id),
addStreamUrl = Table.AddColumn(commitObjectsTable, "Model URL", each server & "/streams/" & id),
addParentObjectId = Table.AddColumn(
addStreamUrl, "Commit Object ID", each Value.Metadata(commitObjectsTable)[objectId]
addStreamUrl, "Version Object ID", each Value.Metadata(commitObjectsTable)[objectId]
),
addUrlType = Table.AddColumn(addParentObjectId, "URL Type", each stream[urlType]),
addObjectIdCol = Table.AddColumn(addUrlType, "Object ID", each try[data][id] otherwise null),
Expand All @@ -46,9 +46,9 @@ in
),
final = Table.ReorderColumns(
addSpeckleTypeCol, {
"Stream URL",
"Model URL",
"URL Type",
"Commit Object ID",
"Version Object ID",
"Object ID",
"speckle_type",
"data"
Expand Down
Loading

0 comments on commit 85b9e88

Please sign in to comment.