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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build #50

Merged
merged 29 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 16 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
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Licini marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ on:
- main

jobs:
build_ubuntu:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: ubuntu-latest
strategy:
matrix:
python: [ '3.9', '3.11','3.13']
steps:
- uses: compas-dev/compas-actions.build@v3
with:
python: ${{ matrix.python }}
invoke_lint: true
invoke_test: true
- name: install libglu
run: apt-get install libglu
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to run it before the build step


build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.8', '3.9', '3.10']
os: [macos-latest, windows-latest]
python: [ '3.9', '3.11','3.13']

steps:
- uses: compas-dev/compas-actions.build@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added `NetworkObject`.

### Changed
* Update the dependency of `compas`.
* The `Index` page.
* Typing hints improved, now `compas_viewer` only support Python 3.9+.
* Introduce decorator @lru_cache() to reduce duplicate calculations.
Expand Down
6 changes: 6 additions & 0 deletions docs/api/compas_viewer.actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ Classes
Action
ZoomSelected
GLInfo
SelectAll
ViewRight
ViewFront
ViewTop
ViewPerspective
DeleteSelected
8 changes: 8 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Viewer
.. toctree::
:maxdepth: 1
:titlesonly:
:caption: viewer

compas_viewer.viewer

Expand All @@ -21,6 +22,8 @@ Scene and Objects
.. toctree::
:maxdepth: 1
:titlesonly:
:caption: Scene and Objects


compas_viewer.scene

Expand All @@ -31,6 +34,8 @@ Controller and Actions
.. toctree::
:maxdepth: 1
:titlesonly:
:caption: Controller and Actions


compas_viewer.controller
compas_viewer.actions
Expand All @@ -42,6 +47,7 @@ Components and Configurations
.. toctree::
:maxdepth: 1
:titlesonly:
:caption: Components and Configurations

compas_viewer.components
compas_viewer.configurations
Expand All @@ -52,6 +58,7 @@ Layout and UI
.. toctree::
:maxdepth: 1
:titlesonly:
:caption: Layout and UI

compas_viewer.layout

Expand All @@ -61,6 +68,7 @@ Utilities
.. toctree::
:maxdepth: 1
:titlesonly:
:caption: Utilities

compas_viewer.utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def setup(app):
"version_match": version,
},
"logo": {
"image_light": "_static/compas_icon_white.png", # relative to parent of conf.py
"image_dark": "_static/compas_icon_white.png", # relative to parent of conf.py
"image_light": "_static/compas_icon_white.png",
"image_dark": "_static/compas_icon_white.png",
"text": project,
},
"navigation_depth": 2,
Expand All @@ -155,7 +155,7 @@ def setup(app):
"doc_path": "docs",
}


html_static_path = sphinx_compas2_theme.get_html_static_path() + ["_static"]
html_css_files = []
html_extra_path = []
html_last_updated_fmt = ""
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
compas @ git+https://github.com/compas-dev/compas@main
freetype-py
pyopengl
PySide6

2 changes: 1 addition & 1 deletion src/compas_viewer/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_action_cls(name: str) -> Any:
"GLInfo",
"SelectAll",
"ViewRight",
"ViewLeft",
"ViewFront",
"ViewTop",
"ViewPerspective",
"DeleteSelected",
Expand Down
2 changes: 2 additions & 0 deletions src/compas_viewer/utilities/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def key_mapper(
for v in Qt.KeyboardModifier:
if v.name.replace("Modifier", "").lower() == key:
return Qt.KeyboardModifier(v.value)
if key == "no":
return Qt.KeyboardModifier.NoModifier # Some times the no modifier is not recognized.
raise ValueError(f"Key mapping of {key} not found in Qt.KeyboardModifier. Check your typing?")
elif type == 2:
for v in Qt.MouseButton:
Expand Down
Loading