Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(analyze): Improve performance of deconstruct data #379

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
with:
python-version: 3.7
- name: set up node # we need node for for semantic release
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v4
with:
node-version: 14.2.0
node-version: 22.2.0
- name: install python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -29,8 +29,8 @@ jobs:
- name: run semantic release
id: new_release
run: |
nextRelease="`npx semantic-release@^17.0.0 --dryRun | grep -oP 'Published release \K.*? ' || true`"
npx semantic-release@^17.0.0
nextRelease="`npx semantic-release@^23.1.1 --dryRun | grep -oP 'Published release \K.*? ' || true`"
npx semantic-release@^23.1.1
echo "::set-output name=tag::$nextRelease"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 7 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/github",
{
"successComment": false,
"failTitle": false
}
],
[
"@semantic-release/exec",
{
Expand Down
4 changes: 2 additions & 2 deletions ladybug_grasshopper/json/LB_Deconstruct_Data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.0",
"version": "1.8.1",
"nickname": "XData",
"outputs": [
[
Expand Down Expand Up @@ -29,7 +29,7 @@
}
],
"subcategory": "1 :: Analyze Data",
"code": "\ntry:\n from ladybug.datacollection import BaseCollection\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n assert isinstance(_data, BaseCollection), \\\n '_data must be a Data Collection. Got {}.'.format(type(_data))\n header = _data.header\n values = _data.values",
"code": "\ntry:\n from ladybug.datacollection import BaseCollection\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs, \\\n wrap_output_to_number\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n assert isinstance(_data, BaseCollection), \\\n '_data must be a Data Collection. Got {}.'.format(type(_data))\n header = _data.header\n values = wrap_output_to_number(_data.values)",
"category": "Ladybug",
"name": "LB Deconstruct Data",
"description": "Deconstruct a Ladybug DataCollection into a header and values.\n-"
Expand Down
7 changes: 4 additions & 3 deletions ladybug_grasshopper/src/LB Deconstruct Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

ghenv.Component.Name = "LB Deconstruct Data"
ghenv.Component.NickName = 'XData'
ghenv.Component.Message = '1.8.0'
ghenv.Component.Message = '1.8.1'
ghenv.Component.Category = 'Ladybug'
ghenv.Component.SubCategory = '1 :: Analyze Data'
ghenv.Component.AdditionalHelpFromDocStrings = '1'
Expand All @@ -31,7 +31,8 @@
raise ImportError('\nFailed to import ladybug:\n\t{}'.format(e))

try:
from ladybug_rhino.grasshopper import all_required_inputs
from ladybug_rhino.grasshopper import all_required_inputs, \
wrap_output_to_number
except ImportError as e:
raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))

Expand All @@ -40,4 +41,4 @@
assert isinstance(_data, BaseCollection), \
'_data must be a Data Collection. Got {}.'.format(type(_data))
header = _data.header
values = _data.values
values = wrap_output_to_number(_data.values)
Binary file modified ladybug_grasshopper/user_objects/LB Deconstruct Data.ghuser
Binary file not shown.