Skip to content

Commit

Permalink
Merge pull request #25 from compas-rrc/compas_2.x-compat
Browse files Browse the repository at this point in the history
COMPAS 2.x compatibility
  • Loading branch information
gonzalocasas authored Mar 27, 2024
2 parents 162dcef + 7abcb28 commit 5f3a845
Show file tree
Hide file tree
Showing 40 changed files with 781 additions and 833 deletions.
8 changes: 2 additions & 6 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ message = Bump version to {new_version}
commit = True
tag = True

[bumpversion:file:docs/conf.py]
search = version = release = '{current_version}'
replace = version = release = '{new_version}'

[bumpversion:file:docs/doc_versions.txt]
search = {current_version}
replace = {new_version}
{current_version}

[bumpversion:file:CHANGELOG.rst]
[bumpversion:file:CHANGELOG.md]
search = Unreleased
replace = {new_version}
replace = [{new_version}] {now:%Y-%m-%d}

[bumpversion:file:src/compas_rrc/__version__.py]
search = __version__ = '{current_version}'
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I added a line to the `CHANGELOG.rst` file in the `Unreleased` section under the most fitting heading (e.g. `Added`, `Changed`, `Removed`).
- [ ] I added a line to the `CHANGELOG.md` file in the `Unreleased` section under the most fitting heading (e.g. `Added`, `Changed`, `Removed`).
- [ ] I ran all tests on my computer and it's all green (i.e. `invoke test`).
- [ ] I ran lint on my computer and there are no errors (i.e. `invoke lint`).
- [ ] I have added tests that prove my fix is effective or that my feature works.
Expand Down
64 changes: 8 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,64 +9,16 @@ on:
- main

jobs:
build-cpython:
build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [
"windows-py38",
"macos-py37",
"ubuntu-py36",
]
include:
- name: "windows-py38"
os: windows-latest
python-version: 3.8
- name: "macos-py37"
os: macos-latest
python-version: 3.7
- name: "ubuntu-py36"
os: ubuntu-latest
python-version: 3.6
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: compas-dev/compas-actions.build@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install cython --install-option="--no-cython-compile"
- name: Install
run: |
python -m pip install --no-cache-dir -r requirements-dev.txt
- name: Run linter
run: |
invoke lint
- name: Run tests
run: |
pytest
build-ironpython:
name: windows-ironpython
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
curl -o compas.tar.gz -LJO https://pypi.debian.net/compas/latest
curl -o compas_fab.tar.gz -LJO https://pypi.debian.net/compas_fab/latest
curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/latest
curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest
choco install ironpython --version=2.7.8.1
ipy -X:Frames -m ensurepip
ipy -X:Frames -m pip install --no-deps compas.tar.gz
ipy -X:Frames -m pip install --no-deps compas_fab.tar.gz
ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz
ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz
- name: Run tests
env:
IRONPYTHONPATH: ./src
run: |
ipy tests/ipy_test_runner.py
python: ${{ matrix.python }}
invoke_lint: true
75 changes: 0 additions & 75 deletions .github/workflows/deploy-n-publish.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: docs

on:
push:
branches:
- main
tags:
- 'v*'
pull_request_review:
types: [submitted]

jobs:
docs:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
runs-on: ubuntu-latest
steps:
- uses: compas-dev/compas-actions.docs@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
doc_url: https://compas-rrc.github.io/compas_rrc
45 changes: 45 additions & 0 deletions .github/workflows/ironpython.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ironpython

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: windows-ironpython
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
choco install ironpython --version=2.7.8.1
curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest
curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/latest
curl -o compas.tar.gz -LJO https://pypi.debian.net/compas/latest
curl -o compas_robots.tar.gz -LJO https://pypi.debian.net/compas_robots/latest
curl -o compas_fab.tar.gz -LJO https://pypi.debian.net/compas_fab/latest
ipy -X:Frames -m ensurepip
ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz
ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz
ipy -X:Frames -m pip install --no-deps compas.tar.gz
ipy -X:Frames -m pip install --no-deps compas_robots.tar.gz
ipy -X:Frames -m pip install --no-deps compas_fab.tar.gz
# - uses: NuGet/[email protected]
# - uses: compas-dev/compas-actions.ghpython_components@v5
# with:
# source: src/compas_rrc/ghpython/components
# target: src/compas_rrc/ghpython/components/ghuser
- name: Test import
run: |
ipy -c "import compas_rrc"
env:
IRONPYTHONPATH: ./src
- name: Run tests
run: |
ipy tests/ipy_test_runner.py
env:
IRONPYTHONPATH: ./src
7 changes: 4 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
name: Check Actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Changelog check
uses: Zomzog/changelog-checker@v1.1.0
uses: Zomzog/changelog-checker@v1.2.0
with:
fileName: CHANGELOG.rst
fileName: CHANGELOG.md
checkNotification: Simple
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
push:
tags:
- 'v*'

name: Create Release

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.8', '3.9', '3.10']

steps:
- uses: compas-dev/compas-actions.build@v3
with:
python: ${{ matrix.python }}
invoke_lint: true
check_import: true

publish:
needs: build
runs-on: windows-latest
steps:
- uses: compas-dev/compas-actions.publish@v2
with:
pypi_token: ${{ secrets.PYPI_PASSWORD }}
github_token: ${{ secrets.GITHUB_TOKEN }}
build_ghpython_components: false
# gh_source: src/compas_rrc/ghpython/components
# gh_target: src/compas_rrc/ghpython/components/ghuser
# gh_prefix: "COMPAS RRC: "
gh_interpreter: "ironpython"
release_name_prefix: COMPAS RRC
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ ENV/

# autogenerated sphinx
docs/reference/generated/
docs/api/generated/
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

* Added `to_configuration` and `to_configuration_primitive` to `compas_rrc.ExternalAxes` and `compas_rrc.RobotJoints`

### Changed

* Update minimum requirements to `compas_fab > 1.x` and `compas > 2.x`

### Removed

## 1.1.0

### Added

* Prepared github actions for continuous integration
* Added compas plugin for automatic Rhino install

## 1.0.0

* Initial version
39 changes: 0 additions & 39 deletions CHANGELOG.rst

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include .bumpversion.cfg
include .editorconfig

include AUTHORS.rst
include CHANGELOG.rst
include CHANGELOG.md
include CONTRIBUTING.rst
include LICENSE
include README.rst
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion docs/changelog.rst

This file was deleted.

Loading

0 comments on commit 5f3a845

Please sign in to comment.