10 Commits

Author SHA1 Message Date
Jonathon Broughton b45e657e6a Update commit_id to use the version_id from the payload
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
The code change updates the commit_id in the commit_details dictionary to use the version_id from the payload instead of using the project_id. This ensures that the correct version is used for committing changes.
2024-08-03 21:24:11 +01:00
Jonathon Broughton ca22b093f3 Merge remote-tracking branch 'origin/main'
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2024-08-03 20:05:02 +01:00
Jonathon Broughton 9298d8a14e Print automation run data in automate_function
- Add print statement to display automation run data
- Helps with debugging and understanding the context of the function
2024-08-03 20:04:36 +01:00
dependabot[bot] 8126ee5776 Bump actions/checkout from 3.4.0 to 4.1.7 (#1)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.4.0...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 19:42:16 +01:00
dependabot[bot] e14ad4e801 Bump specklesystems/speckle-automate-github-composite-action (#2)
Bumps [specklesystems/speckle-automate-github-composite-action](https://github.com/specklesystems/speckle-automate-github-composite-action) from 0.7.4 to 0.8.1.
- [Release notes](https://github.com/specklesystems/speckle-automate-github-composite-action/releases)
- [Commits](https://github.com/specklesystems/speckle-automate-github-composite-action/compare/0.7.4...0.8.1)

---
updated-dependencies:
- dependency-name: specklesystems/speckle-automate-github-composite-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 19:42:00 +01:00
Jonathon Broughton 3baff49f80 Create dependabot.yml 2024-08-03 19:40:12 +01:00
Jonathon Broughton f08d75b3a6 urgh
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2024-08-03 19:36:33 +01:00
Jonathon Broughton c9cf67f876 Add specklepy version print statement
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
The code changes include adding an import statement for the "specklepy" module and printing its version.
2024-08-03 19:31:51 +01:00
Jonathon Broughton d85ad61507 Update pyproject.toml dependencies
- Update pydantic version to "^2.8.2"
- No longer require pydantic version "^2.4.2" in dev dependencies

This commit updates the dependencies in the pyproject.toml file. The pydantic version has been updated to "^2.8.2", and the previous requirement of "^2.4.2" for dev dependencies has been removed.
2024-08-03 19:23:37 +01:00
Jonathon Broughton 32df80fdce Housekeeping 2024-08-03 19:19:57 +01:00
9 changed files with 98 additions and 1056 deletions
+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
+2 -2
View File
@@ -11,7 +11,7 @@ jobs:
FUNCTION_SCHEMA_FILE_NAME: functionSchema.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.4.0
- uses: actions/checkout@v4.1.7
- uses: actions/setup-python@v5
with:
python-version: '3.11'
@@ -29,7 +29,7 @@ jobs:
run: |
python main.py generate_schema ${HOME}/${{ env.FUNCTION_SCHEMA_FILE_NAME }}
- name: Speckle Automate Function - Build and Publish
uses: specklesystems/speckle-automate-github-composite-action@0.7.4
uses: specklesystems/speckle-automate-github-composite-action@0.8.1
with:
speckle_automate_url: ${{ env.SPECKLE_AUTOMATE_URL || 'https://automate.speckle.dev' }}
speckle_token: ${{ secrets.SPECKLE_FUNCTION_TOKEN }}
+8
View File
@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
+51
View File
@@ -0,0 +1,51 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<Languages>
<language minSize="68" name="Python" />
</Languages>
</inspection_tool>
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ourVersions">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="3.12" />
<item index="1" class="java.lang.String" itemvalue="3.11" />
<item index="2" class="java.lang.String" itemvalue="3.10" />
<item index="3" class="java.lang.String" itemvalue="3.8" />
<item index="4" class="java.lang.String" itemvalue="3.9" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyInterpreterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="numpy" />
<item index="1" class="java.lang.String" itemvalue="httpcore" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyShadowingBuiltinsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredNames">
<list>
<option value="id" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="specklepy.objects.base.Base.displayValue" />
<option value="Utilities.utilities.HealthObject" />
<option value="Utilities.reporting.reportlab" />
<option value="meshlib.mrmeshpy" />
</list>
</option>
</inspection_tool>
</profile>
</component>
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.11.4 WSL (UbuntuDev): (/home/jsdbroughton/.virtualenvs/speckle_automate-mesh_density_checker/bin/python)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="py.test" />
</component>
</module>
+4 -2
View File
@@ -20,11 +20,11 @@ from Objects.objects import (
from Utilities.reporting import Report
from Utilities.utilities import Utilities
## new render materials for objects passing/failing
## swap those into the original commit object
## send that back to the server
class FunctionInputs(AutomateBase):
"""Definition of user inputs for this function.
@@ -91,9 +91,11 @@ def automate_function(
threshold = function_inputs.density_level
data, all_densities, all_areas = density_summary(health_objects)
print(dir(automate_context.automation_run_data))
commit_details = {
"stream_id": automate_context.automation_run_data.project_id,
"commit_id": automate_context.automation_run_data.version_id,
"commit_id": automate_context.automation_run_data.triggers[0].payload.version_id,
"server_url": automate_context.automation_run_data.speckle_server_url,
}
Generated
+2 -2
View File
@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]]
name = "annotated-types"
@@ -1880,4 +1880,4 @@ multidict = ">=4.0"
[metadata]
lock-version = "2.0"
python-versions = "^3.11"
content-hash = "5ae6ecb970e7bc7e288ce63b8246bbafef4c3bbcd46e8665c9654100264df288"
content-hash = "fa9a19381de95ee7cd6798a3b4707ed3fbe2f2845e449cdcd652d5670e4038cf"
+8 -8
View File
@@ -7,18 +7,18 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
specklepy = "^2.19.5"
matplotlib = "^3.8.0"
seaborn = "^0.13.0"
reportlab = "^4.0.6"
mypy = "^1.11.1"
pydantic = "^2.8.2"
specklepy = "^2.19.5"
[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
mypy = "^1.3.0"
ruff = "^0.0.271"
pytest = "^7.4.2"
python-dotenv = "^1.0.0"
pydantic = "^2.4.2"
[build-system]
requires = ["poetry-core"]
@@ -26,11 +26,11 @@ build-backend = "poetry.core.masonry.api"
[tool.ruff]
select = [
"E", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"D", # pydocstyle
"I", # isort
"E", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"D", # pydocstyle
"I", # isort
]
[tool.ruff.pydocstyle]
-1042
View File
File diff suppressed because it is too large Load Diff