Skip to content

Commit 3ed8b41

Browse files
authored
Merge pull request #24 from compas-dev/bye_rhino7
Bye rhino7
2 parents 3fc47aa + 08b594f commit 3ed8b41

File tree

21 files changed

+276
-235
lines changed

21 files changed

+276
-235
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
python: ['3.10', '3.11']
18+
python: ['3.10', '3.11', '3.12']
1919

2020
steps:
2121
- uses: compas-dev/compas-actions.build@v4
@@ -49,3 +49,24 @@ jobs:
4949
- name: Tear down docker container
5050
run: |
5151
docker rm -f nanomq
52+
53+
build-cpython-components:
54+
runs-on: windows-latest
55+
56+
steps:
57+
- name: Checkout repo
58+
uses: actions/checkout@v4
59+
60+
- name: Install dependencies
61+
run: |
62+
python -m pip install --upgrade pip
63+
pip install -e .[dev]
64+
65+
- name: Create CPython Grasshopper user objects
66+
run: |
67+
invoke build-cpython-ghuser-components
68+
69+
- uses: actions/upload-artifact@v5
70+
with:
71+
name: compas_eve_components
72+
path: src/compas_eve/ghpython/components/ghuser

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
docs:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: compas-dev/compas-actions.docs@v2
17+
- uses: compas-dev/compas-actions.docs@v4
1818
with:
1919
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
use_conda: false

.github/workflows/release.yml

Lines changed: 13 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ on:
66
- 'v*'
77

88
jobs:
9-
build:
9+
Build:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python: ['3.10', '3.11']
13+
os: [ubuntu-latest]
14+
python: ['3.10']
1515

1616
steps:
1717
- uses: compas-dev/compas-actions.build@v4
1818
with:
19-
python: ${{ matrix.python }}
2019
invoke_lint: true
20+
check_import: false
21+
use_conda: false
2122
invoke_test: false
23+
python: ${{ matrix.python }}
2224
- name: Run unit tests
2325
run: |
2426
pytest tests/unit
@@ -44,81 +46,12 @@ jobs:
4446
docker rm -f nanomq
4547
4648
Publish:
47-
needs: build
48-
runs-on: windows-latest
49+
needs: Build
50+
runs-on: ubuntu-latest
4951
steps:
50-
# The steps should rely on compas-actions.publish
51-
# but this bug is blocking it: https://github.com/compas-dev/compas-actions.publish/issues/1
52-
# so atm, it's a copy of the steps
53-
54-
# - uses: compas-dev/compas-actions.publish@v2
55-
# with:
56-
# pypi_token: ${{ secrets.PYPI }}
57-
# github_token: ${{ secrets.TOKEN }}
58-
# build_ghpython_components: true
59-
# gh_source: src/compas_eve/ghpython/components
60-
# gh_target: src/compas_eve/ghpython/components/ghuser
61-
# release_name_prefix: COMPAS EVE v
62-
63-
- uses: actions/checkout@v3
64-
65-
- name: Get Version From Tag
66-
id: tag_name
67-
run: |
68-
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
69-
shell: bash
70-
71-
- name: Get Changelog Entry
72-
id: changelog_reader
73-
uses: mindsers/changelog-reader-action@v2
74-
with:
75-
version: ${{ steps.tag_name.outputs.current_version }}
76-
path: ./CHANGELOG.md
77-
78-
- name: Assemble Release Name
79-
id: assemble_release_name
80-
shell: bash
81-
run: |
82-
release_name="COMPAS EVE v${{ steps.tag_name.outputs.current_version }}"
83-
echo Using release name: $release_name
84-
echo "release_name=$release_name" >> $GITHUB_OUTPUT
85-
86-
- name: Create Release
87-
id: create_release
88-
uses: ncipollo/release-action@v1
52+
- uses: compas-dev/compas-actions.publish@v3
8953
with:
90-
body: ${{ steps.changelog_reader.outputs.changes }}
91-
token: ${{ secrets.TOKEN }}
92-
name: ${{ steps.assemble_release_name.outputs.release_name }}
93-
94-
- name: Setup Python 3.10
95-
uses: actions/setup-python@v4
96-
with:
97-
python-version: "3.10"
98-
99-
- name: Install CPython dependencies
100-
run: |
101-
python -m pip install --upgrade pip
102-
python -m pip install wheel
103-
104-
- uses: NuGet/[email protected]
105-
- name: Install dependencies
106-
run: |
107-
choco install ironpython --version=2.7.8.1
108-
109-
- uses: compas-dev/compas-actions.ghpython_components@v4
110-
with:
111-
source: src/compas_eve/ghpython/components
112-
target: src/compas_eve/ghpython/components/ghuser
113-
prefix: ""
114-
115-
- shell: bash
116-
run: |
117-
python -m pip install --upgrade pip
118-
pip install setuptools wheel twine
119-
python setup.py clean --all sdist bdist_wheel
120-
twine check dist/*
121-
twine upload dist/* --skip-existing
122-
env:
123-
TWINE_USERNAME: __token__
124-
TWINE_PASSWORD: ${{ secrets.PYPI }}
54+
publish_to_pypi: true
55+
pypi_token: ${{ secrets.PYPI }}
56+
github_token: ${{ secrets.GITHUB_TOKEN }}
57+
python: '3.10'

.github/workflows/yak_publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: publish_yak
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: "Choose deployment environment"
8+
required: true
9+
type: choice
10+
options:
11+
- test
12+
- prod
13+
14+
jobs:
15+
16+
publish_test_yak:
17+
runs-on: windows-latest
18+
19+
steps:
20+
21+
- name: Set test flag based on input
22+
shell: pwsh
23+
run: |
24+
if ("${{ github.event.inputs.environment }}" -eq "test") {
25+
echo "TEST_FLAG=--test-server" | Out-File -FilePath $env:GITHUB_ENV -Append
26+
}
27+
else {
28+
echo "TEST_FLAG=" | Out-File -FilePath $env:GITHUB_ENV -Append
29+
}
30+
31+
- name: Checkout repo
32+
uses: actions/checkout@v4
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -e .[dev]
38+
39+
- name: Create CPython Grasshopper user objects
40+
run: |
41+
invoke build-cpython-ghuser-components
42+
43+
- name: Create Rhino8 Yak package
44+
shell: pwsh
45+
run: |
46+
invoke yakerize -m $Env:YAK_TEMPLATE\manifest.yml -l $Env:YAK_TEMPLATE\icon.png -g $Env:USER_OBJECTS -t rh8
47+
env:
48+
USER_OBJECTS: src\compas_eve\ghpython\components\ghuser
49+
YAK_TEMPLATE: src\compas_eve\ghpython\yak_template
50+
51+
- name: Publish to Yak server (Rhino 8)
52+
shell: pwsh
53+
run: |
54+
$test_flag = if ($Env:TEST_FLAG) { $Env:TEST_FLAG } else { "" }
55+
$file = Get-ChildItem -Path dist\yak_package\*rh8*.yak -File | Select-Object -ExpandProperty Name
56+
$command = "invoke publish-yak -y dist\yak_package\$file $test_flag".Trim()
57+
Invoke-Expression $command
58+
env:
59+
YAK_TOKEN: ${{ secrets.YAK_DF_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Removed
1515

16+
* Removed Rhino7 Grasshopper components and replaced them with Rhino8 ones.
1617

1718
## [2.0.0] 2025-10-30
1819

conftest.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
import pytest
2-
import compas
3-
import compas_eve
1+
from pathlib import Path
42
import math
53
import numpy
4+
import pytest
65

6+
import compas
7+
import compas_eve
78

8-
def pytest_ignore_collect(path):
9-
if "rhino" in str(path):
10-
return True
119

12-
if "blender" in str(path):
10+
def pytest_ignore_collect(collection_path: Path, config):
11+
# Skip anything under rhino/blender/ghpython
12+
parts_lower = {p.lower() for p in collection_path.parts}
13+
if {"rhino", "blender", "ghpython"} & parts_lower:
1314
return True
1415

15-
if "ghpython" in str(path):
16-
return True
16+
# return None -> don't ignore
17+
return None
1718

1819

1920
@pytest.fixture(autouse=True)

pyproject.toml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=66.0"]
33
build-backend = "setuptools.build_meta"
44

55
# ============================================================================
6-
# project info
6+
# Project info
77
# ============================================================================
88

99
[project]
@@ -33,6 +33,11 @@ classifiers = [
3333
"Programming Language :: Python :: 3.14",
3434
]
3535

36+
[tool.setuptools.dynamic]
37+
version = { attr = "compas_eve.__version__" }
38+
dependencies = { file = "requirements.txt" }
39+
optional-dependencies = { dev = { file = "requirements-dev.txt" } }
40+
3641
[project.entry-points.'compas_pb.plugins']
3742
serializers = 'compas_eve.codecs.conversions'
3843

@@ -46,7 +51,7 @@ Forum = "https://forum.compas-framework.org/"
4651

4752

4853
# ============================================================================
49-
# setuptools config
54+
# Linting and formatting
5055
# ============================================================================
5156

5257
[tool.ruff]
@@ -99,4 +104,34 @@ max-doc-length = 179
99104

100105
[tool.ruff.format]
101106
docstring-code-format = true
102-
docstring-code-line-length = "dynamic"
107+
docstring-code-line-length = "dynamic"
108+
109+
# ============================================================================
110+
# Release automation
111+
# ============================================================================
112+
113+
[tool.bumpversion]
114+
current_version = "2.0.0"
115+
message = "Bump version to {new_version}"
116+
commit = true
117+
tag = true
118+
119+
[[tool.bumpversion.files]]
120+
filename = "src/compas_eve/__init__.py"
121+
search = "{current_version}"
122+
replace = "{new_version}"
123+
124+
[[tool.bumpversion.files]]
125+
filename = "docs/installation.rst"
126+
search = "{current_version}"
127+
replace = "{new_version}"
128+
129+
[[tool.bumpversion.files]]
130+
glob = "src/compas_eve/ghpython/components/**/code.py"
131+
search = "# r: compas_eve>={current_version}"
132+
replace = "# r: compas_eve>={new_version}"
133+
134+
[[tool.bumpversion.files]]
135+
filename = "CHANGELOG.md"
136+
search = "Unreleased"
137+
replace = "[{new_version}] {now:%Y-%m-%d}"

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ pytest-mock
99
ruff
1010
sphinx_compas2_theme
1111
twine
12-
wheel
12+
wheel
13+
pythonnet

0 commit comments

Comments
 (0)