Skip to content

Commit

Permalink
Add windows and mac to test runners (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvail committed Sep 3, 2023
1 parent 07f9105 commit bd43ad2
Show file tree
Hide file tree
Showing 16 changed files with 272 additions and 615 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ on:
- main

jobs:

test:
runs-on: ubuntu-latest

strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}

steps:
- uses: actions/checkout@v3
Expand All @@ -20,11 +26,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v1.4.3
with:
generate-run-shell: true
environment-file: binder/environment.yml
init-shell: bash powershell
- name: Test with pytest
run: |
pytest --disable-pytest-warnings
shell: micromamba-shell {0}
pytest --disable-pytest-warnings
3 changes: 0 additions & 3 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ dependencies:
- toml
- matplotlib
- scipy
- boost
- boost-cpp
- cppyy=2.4
- openalea.lpy
- openalea.plantgl=3.20.1
- openalea.mtg
Expand Down
75 changes: 66 additions & 9 deletions notebooks/simple_simulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "c53a8105-14b5-437b-91ce-604152bb9c61",
"metadata": {
"tags": []
Expand All @@ -17,20 +17,36 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "b74cb80a-cac4-4d6f-ae18-165a52517072",
"metadata": {
"tags": []
},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "47503da9c36d4478af4b36964c741add",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SceneWidget(scenes=[{'id': 'XaKImpeVjzSwKnKEkcfVxz8VN', 'data': b'x\\xdaSLrw\\xf5\\xf7e`Pp\\xe0\\xe5RPVVd\\x00\\x020\\"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"widget = SceneWidget()\n",
"widget"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "f4e4ddad-ba3d-40c8-9ecc-28740c010452",
"metadata": {
"tags": []
Expand All @@ -44,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "89991d0d-2539-478d-8bb5-fe63a9a8095a",
"metadata": {
"tags": []
Expand All @@ -57,7 +73,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "8f50dd49",
"metadata": {
"tags": []
Expand All @@ -70,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "b243f0f4-cf7c-4c35-8fa3-a6e894c36e8b",
"metadata": {
"tags": []
Expand All @@ -84,12 +100,53 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "64f4118d-93ff-4d43-99ed-f919d820003c",
"metadata": {
"tags": []
},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"['edge_type',\n",
" 'label',\n",
" '_axial_id',\n",
" 'growth_units',\n",
" 'year',\n",
" 'inflorescence',\n",
" 'number',\n",
" 'closest_apex',\n",
" 'farthest_apex',\n",
" 'sons_nb',\n",
" 'observation',\n",
" 'parent_observation',\n",
" 'parent_unit_id',\n",
" 'parent_fbr_id',\n",
" 'parent_tree_id',\n",
" 'zone',\n",
" 'cumulated_mass',\n",
" 'radius',\n",
" 'offset',\n",
" 'developped',\n",
" 'phyllotactic_angle',\n",
" 'branching_angle',\n",
" 'rigidity',\n",
" 'age',\n",
" 'length',\n",
" 'trunk',\n",
" 'fruit_age',\n",
" 'fruit_mass',\n",
" 'leaf_age',\n",
" 'leaf_mass',\n",
" 'leaf_area']"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tree.property_names()"
]
Expand Down
1 change: 0 additions & 1 deletion test/notebooks/README.md

This file was deleted.

204 changes: 0 additions & 204 deletions test/notebooks/optimization.ipynb

This file was deleted.

3 changes: 1 addition & 2 deletions test/test_metamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

from vmapplet import Simulation, Options
from vmapplet.organs.metamer import MetamerData, CambialLayer
from vmapplet.optimisation import reaction_wood_target
from vmapplet.organs.wood import Wood
from vmapplet.organs.fruit import AppleFruit
from vmapplet.organs.leaf import AppleLeaf
from vmapplet.organs.internode import Internode
from vmapplet.physics import Frame
from vmapplet.physics import Frame, reaction_wood_target
from vmapplet.enums import FruitState


Expand Down
Loading

0 comments on commit bd43ad2

Please sign in to comment.