From c6a68c82795bd0a70326136cbac1b155a00d7e3c Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Fri, 20 Jan 2023 10:51:40 +0100 Subject: [PATCH 1/8] Test GH-Action fix --- .github/workflows/conda-package-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conda-package-build.yml b/.github/workflows/conda-package-build.yml index 1d94539..a7dde4e 100644 --- a/.github/workflows/conda-package-build.yml +++ b/.github/workflows/conda-package-build.yml @@ -2,7 +2,7 @@ name: build_publish_anaconda on: push: - branches: [ master ] + branches: [ * ] pull_request: branches: [ master ] @@ -55,7 +55,7 @@ jobs: if_true: 'true' if_false: 'false' - name: Build and Publish - uses: openalea/action-build-publish-anaconda@v0.1.3 + uses: openalea/action-build-publish-anaconda@7-failure-when-trying-to-install-mamba-with-version with: conda: conda mamba: true @@ -64,4 +64,4 @@ jobs: channels: openalea3, conda-forge token: ${{ secrets.ANACONDA_TOKEN }} publish: ${{ steps.publish.outputs.value }} - label: main \ No newline at end of file + label: main From a688ecbdd729069bcff22d19dfd2477bf191bee6 Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Fri, 20 Jan 2023 10:54:00 +0100 Subject: [PATCH 2/8] Fix yaml syntax from previous commit --- .github/workflows/conda-package-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-package-build.yml b/.github/workflows/conda-package-build.yml index a7dde4e..a996157 100644 --- a/.github/workflows/conda-package-build.yml +++ b/.github/workflows/conda-package-build.yml @@ -2,7 +2,7 @@ name: build_publish_anaconda on: push: - branches: [ * ] + branches: [ master, test_GHaction ] pull_request: branches: [ master ] From c90e2a6324a4fd53b31cf1e6a7418937d825a777 Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Mon, 22 Jan 2024 16:41:00 +0100 Subject: [PATCH 3/8] Update for new namespaces --- setup.py | 8 ++++---- src/openalea/__init__.py | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 src/openalea/__init__.py diff --git a/setup.py b/setup.py index 1911b48..ac9adea 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # format setup arguments -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages from io import open @@ -19,7 +19,7 @@ version = _version["__version__"] # find packages -pkgs = find_packages('src') +pkgs = find_namespace_packages('src', include=['openalea', 'openalea.*']) setup_kwds = dict( name='openalea.core', @@ -29,11 +29,11 @@ author="Christophe Pradal", author_email="christophe dot pradal at cirad dot fr", url='https://github.com/openalea/core', - license='cecill-c', + license='CeCILL-C', zip_safe=False, packages=pkgs, - #namespace_packages=['openalea'], + namespace_packages=['openalea'], package_dir={'': 'src'}, entry_points={}, keywords='openalea', diff --git a/src/openalea/__init__.py b/src/openalea/__init__.py deleted file mode 100644 index a9a6a7a..0000000 --- a/src/openalea/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ - -# {#pkglts, -__import__('pkg_resources').declare_namespace(__name__) -# #} From bafaba96e054596fab117ec8b5ee832a1cb22155 Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Mon, 22 Jan 2024 17:05:01 +0100 Subject: [PATCH 4/8] Update version --- src/openalea/core/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openalea/core/version.py b/src/openalea/core/version.py index 8b527fe..897f891 100644 --- a/src/openalea/core/version.py +++ b/src/openalea/core/version.py @@ -8,7 +8,7 @@ MAJOR = 2 """(int) Version major component.""" -MINOR = 2 +MINOR = 3 """(int) Version minor component.""" POST = 0 From 0b7fe4a0ecd74b6c902636c632c11a86a4b580b6 Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Mon, 22 Jan 2024 17:17:35 +0100 Subject: [PATCH 5/8] Update GH-Actions --- .github/workflows/conda-package-build.yml | 72 ++++------------------- 1 file changed, 11 insertions(+), 61 deletions(-) diff --git a/.github/workflows/conda-package-build.yml b/.github/workflows/conda-package-build.yml index a996157..2a6cfa5 100644 --- a/.github/workflows/conda-package-build.yml +++ b/.github/workflows/conda-package-build.yml @@ -2,66 +2,16 @@ name: build_publish_anaconda on: push: - branches: [ master, test_GHaction ] + branches: + - '**' + tags: + - 'v*' pull_request: - branches: [ master ] - -jobs: - build-and-publish: - name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - max-parallel: 3 - matrix: - os: [ ubuntu-latest] - python-minor-version: [9] - isMaster: - - ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/dev') }} - exclude: - - isMaster: false - os: ubuntu-latest - python-minor-version: 7 - - isMaster: false - os: ubuntu-latest - python-minor-version: 8 - - isMaster: false - os: macos-latest - python-minor-version: 7 - - isMaster: false - os: macos-latest - python-minor-version: 8 - - isMaster: false - os: macos-latest - python-minor-version: 9 - - isMaster: false - os: windows-latest - python-minor-version: 7 - - isMaster: false - os: windows-latest - python-minor-version: 8 - - isMaster: false - os: windows-latest - python-minor-version: 9 + branches: + - '**' - steps: - - name: Chekout - uses: actions/checkout@v3 - - name: Determine publish - uses: haya14busa/action-cond@v1 - id: publish - with: - cond: ${{ contains(github.ref, 'master') || startsWith(github.ref, 'refs/heads/v') }} - if_true: 'true' - if_false: 'false' - - name: Build and Publish - uses: openalea/action-build-publish-anaconda@7-failure-when-trying-to-install-mamba-with-version - with: - conda: conda - mamba: true - python: ${{ matrix.python-minor-version }} - numpy: '20.0' - channels: openalea3, conda-forge - token: ${{ secrets.ANACONDA_TOKEN }} - publish: ${{ steps.publish.outputs.value }} - label: main +jobs: + build: + uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@main + secrets: + anaconda_token: ${{ secrets.ANACONDA_TOKEN }} From 5f7a48905529b5411496dba32a7c1c8423ad0c9d Mon Sep 17 00:00:00 2001 From: pradal Date: Mon, 22 Jan 2024 21:27:03 +0100 Subject: [PATCH 6/8] Update to v2.4.0 --- src/openalea/core/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openalea/core/version.py b/src/openalea/core/version.py index 897f891..7259586 100644 --- a/src/openalea/core/version.py +++ b/src/openalea/core/version.py @@ -8,7 +8,7 @@ MAJOR = 2 """(int) Version major component.""" -MINOR = 3 +MINOR = 4 """(int) Version minor component.""" POST = 0 From 0c514e09a7a1a11767a1a62d3ecea73086d5345f Mon Sep 17 00:00:00 2001 From: pradal Date: Mon, 22 Jan 2024 22:57:51 +0100 Subject: [PATCH 7/8] Fix syntax errors : is is depracated --- src/openalea/core/compositenode.py | 2 +- src/openalea/core/vlab.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openalea/core/compositenode.py b/src/openalea/core/compositenode.py index 884ce53..b59b944 100644 --- a/src/openalea/core/compositenode.py +++ b/src/openalea/core/compositenode.py @@ -836,7 +836,7 @@ def to_factory(self, sgfactory, listid = None, auto_io=False): # Copy value sgfactory.elt_value[vid] = [] for port in range(node.get_nb_input()): - if node.input_states[port] is not "connected": + if node.input_states[port] != "connected": val = node.get_input(port) if "pyqt" in repr(val).lower(): val = str(val) diff --git a/src/openalea/core/vlab.py b/src/openalea/core/vlab.py index 9fa88bb..435bbb6 100644 --- a/src/openalea/core/vlab.py +++ b/src/openalea/core/vlab.py @@ -164,7 +164,7 @@ def read_specification(self): def read_files(self, f): pattern ='\w+\.\w+' for l in f: - if 'ignore:' in l or l is '*': + if 'ignore:' in l or l == '*': break fn = l.strip() if ':' not in fn and re.match(pattern, fn): @@ -396,7 +396,7 @@ def __init__(self, *args, **kwds): def read_files(self, f): pattern ='\w+\.\w+' for l in f: - if 'ignore:' in l or l is '*': + if 'ignore:' in l or l == '*': break fn = l.strip() if re.match(pattern, fn) and fn[-1] != ':': From 8a387c341e4157eadee0b97a5b885b252fffad9a Mon Sep 17 00:00:00 2001 From: pradal Date: Tue, 23 Jan 2024 09:25:37 +0100 Subject: [PATCH 8/8] Fix namespace package definition --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index cd2231f..7eacee7 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ version = _version["__version__"] # find packages -pkgs = find_namespace_packages('src', include=['openalea', 'openalea.*']) +pkgs = find_namespace_packages('src', include=['openalea.*']) setup_kwds = dict( name='openalea.core', @@ -33,7 +33,7 @@ zip_safe=False, packages=pkgs, - namespace_packages=['openalea'], + #namespace_packages=['openalea'], package_dir={'': 'src'}, package_data = {'openalea.core' : ['*.txt'],}, include_package_data = True,