Skip to content

Commit

Permalink
Merge pull request #54 from pradal/namespace
Browse files Browse the repository at this point in the history
Native Namespace
  • Loading branch information
pradal authored Jan 22, 2024
2 parents 5380f8f + 8ec78d1 commit 5537d40
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 81 deletions.
77 changes: 15 additions & 62 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,20 @@
name: build_publish_anaconda
name: Building Package

on:
push:
branches: [ master ]
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, macos-latest, windows-latest]
python-minor-version: [7,8,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@v0.1.3
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
with:
conda-channels: openalea3, conda-forge
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from os.path import abspath, normpath, dirname
from os.path import join as pj

from setuptools import setup, find_packages
from setuptools import setup, find_namespace_packages

short_descr = "Python/Visualea interface to Caribu Light model"
readme = open('README.rst').read()
Expand Down Expand Up @@ -50,7 +50,7 @@ def data_rel_pth(pth):
license='INRA_License_agreement',
zip_safe=False,

packages=find_packages('src'),
packages=find_namespace_packages(where='src', include=['alinea', 'alinea.*']),
package_dir={'': 'src'},

include_package_data=True,
Expand Down
15 changes: 0 additions & 15 deletions src/alinea/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/alinea/caribu/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# -*- coding: utf-8 -*-

major = 8
minor = 0
post = 10
minor = 1
post = 0

__version__ = ".".join([str(s) for s in (major, minor, post)])
# #}

0 comments on commit 5537d40

Please sign in to comment.