Skip to content

Commit

Permalink
Merge branch 'develop' into additional-cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmine-schoch committed Sep 7, 2023
2 parents 7c45fb8 + f6b8268 commit f6f01d0
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 1,395 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 1. Name of workflow
name: Unit Tests

# 2. When to run workflow
on:
pull_request:
push:
branches:
- develop
merge_group:

# 3. Jobs to run (in parallel)
jobs:

# 3.1. Job name (internal)
test:

# 3.2. Job name (external)
name: Unit Tests

# 3.3. Runner OS (can be Windows, macOS, or Linux)
runs-on: ubuntu-latest

# 3.4. Sequential steps in job
steps:

# 3.4.1. Checkout code
- name: 🛎 Checkout
uses: actions/checkout@v3

# 3.4.2. Install and setup Python
- name: 🐍 Setup Python
uses: actions/setup-python@v4
with:
python-version-file: API/pyproject.toml
# cache: 'pip'

# Install dependencies (if any). They will be cached with saved for next time with the cache command above

- name: Install
run: pip install API/.

# 3.4.3. Run tests (execute arbitrary commands in shell)
- name: 🏃Run tests
run: python -m unittest discover -s API
2 changes: 1 addition & 1 deletion API/oursin.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oursin
Version: 0.4.7
Version: 0.4.8
Summary: Urchin - Universal Renderer Creating Helpful Images for Neuroscience Python API
Author-email: Daniel Birman <[email protected]>
License: GNU GENERAL PUBLIC LICENSE
Expand Down
1 change: 1 addition & 0 deletions API/oursin.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ setup.cfg
oursin/__init__.py
oursin/camera.py
oursin/client.py
oursin/fov.py
oursin/lines.py
oursin/neurons.py
oursin/primitives.py
Expand Down
2 changes: 1 addition & 1 deletion API/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "oursin"
version = "0.4.7"
version = "0.4.9"
authors = [
{ name="Daniel Birman", email="[email protected]" },
]
Expand Down
Binary file removed API/requirements.txt
Binary file not shown.
Empty file added API/tests/__init__.py
Empty file.
20 changes: 20 additions & 0 deletions API/tests/test_urchin_core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from unittest import TestCase
from unittest.mock import Mock

import oursin as urchin


class TestClass(TestCase):
"""Test demo class functions"""

# def setUp(self):
# """Setup class and mock callback function"""
# self.demo = DemoClass('Demo')
# self.mock = Mock()

def test_sanitize_vec3(self):
self.assertEqual(urchin.utils.sanitize_vector3([1,2,3]), [1,2,3])

self.assertEqual(urchin.utils.sanitize_vector3((1,2,3)), [1,2,3])

self.assertRaises(Exception, urchin.utils.sanitize_vector3, (1,2))
15 changes: 15 additions & 0 deletions UnityClient/Assets/Scenes/UnityMouseRenderer.unity
Original file line number Diff line number Diff line change
Expand Up @@ -6052,6 +6052,17 @@ Transform:
m_Father: {fileID: 1716532781}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1463353686 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5076698394702019361, guid: 819c72893569fa442b7683567f3569d6, type: 3}
m_PrefabInstance: {fileID: 5708727189667669680}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: be8deb1d448e6fc4699aef6a399423a5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1469330506
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -9430,6 +9441,10 @@ PrefabInstance:
propertyPath: textParent
value:
objectReference: {fileID: 1648926224}
- target: {fileID: 161993171994875470, guid: 8d78849a732a3e54c8a6dfcda3795ec0, type: 3}
propertyPath: _fovManager
value:
objectReference: {fileID: 1463353686}
- target: {fileID: 161993171994875470, guid: 8d78849a732a3e54c8a6dfcda3795ec0, type: 3}
propertyPath: probeParent
value:
Expand Down
4 changes: 3 additions & 1 deletion UnityClient/Assets/Scripts/SceneInfo/SceneInfoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ void Update()
Vector3 target = cameraController.GetCameraTarget();
Vector3 angles = cameraController.GetAngles();
float zoom = cameraController.GetZoom();

// Note angles y/x flipped so that yaw/pitch/spin is correct
cameraText.text = string.Format("camera target ({0},{1},{2}); camera rotation ({3},{4},{5})\nzoom: {6}",
Mathf.Round(target.x*100)/100,
Mathf.Round(target.y*100)/100,
Mathf.Round(target.z*100)/100,
Mathf.RoundToInt(angles.x),
Mathf.RoundToInt(angles.y),
Mathf.RoundToInt(angles.x),
Mathf.RoundToInt(angles.z),
zoom);

Expand Down
4 changes: 2 additions & 2 deletions UnityClient/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.4.5
bundleVersion: 0.4.6
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand All @@ -155,7 +155,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
Standalone: com.Daniel-Birman---UW.Urchin
Standalone: com.Virtual-Brain-Lab.Urchin
buildNumber:
Standalone: 0
iPhone: 0
Expand Down
Loading

0 comments on commit f6f01d0

Please sign in to comment.