# AutoSubmit Python-Bundle Integration
#
# Based on "autosubmit-dev-foss-2021b-Python-3.9.6.eb"
# Reviewed by Stamen Miroslavov (Barcelona Supercomputing Center), 2024

easyblock = 'PythonBundle'

name = 'autosubmit'
version = '4.1.11'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://autosubmit.readthedocs.io/en/master/'
description = """Autosubmit is a lightweight workflow manager designed to meet climate research necessities. Unlike other workflow solutions in the domain, it integrates the capabilities of an experiment manager, workflow orchestrator and monitor in a self-contained application.

It is a Python package available at PyPI. The source code in Git contains a Dockerfile used in cloud environments with Kubernetes, and there are examples of how to install Autosubmit with Conda."""

toolchain = {'name': 'foss', 'version': '2021b'}

dependencies = [
    ('Python', '3.9.6'),
    ('python-xxhash','3.4.1', versionsuffix),
    ('bscearth.utils', '0.5.2', versionsuffix),
    ('networkx', '2.6.3', versionsuffix),
    ('tornado', '6.4', versionsuffix),
    ('coverage', '7.6.3', versionsuffix),
    ('BeautifulSoup', '4.11.1', versionsuffix),
    ('Pygments', '2.18.0', versionsuffix),
    ('libpng','1.6.37'),
    ('Graphviz', '2.50.0'),
    ('cryptography', '41.0.1', versionsuffix),
    ('setuptools', '64.0.3'),
    ('requests', '2.28.1', versionsuffix),
    ('paramiko', '3.4.0', versionsuffix),
    ('matplotlib', '3.8.2', versionsuffix),
    ('packaging', '21.3', versionsuffix),
    ('psycopg2', '2.9.9', versionsuffix),
    ('Sphinx','5.3.0', versionsuffix),
    ('Sphinx-RTD-Theme', '2.0.0', versionsuffix),
    ('rich', '13.8.1', versionsuffix),
    ('pytest', '8.2.2', versionsuffix),
    ('numpy', '1.23.3', versionsuffix),
    ('typing-extensions', '4.9.0'),
]

use_pip = True
sanity_pip_check = True
download_dep_fail = True

exts_list = [
    ('autosubmitconfigparser', '1.0.73', {
        'checksums': ['d22b6dd2a0cb34f32e358a0c4fd48638c1f0fca7b079eaf1aa7aa082d4f077fc'],
    }),
    ('python-xlib', '0.33', {
        'modulename': 'Xlib',
        'checksums': ['55af7906a2c75ce6cb280a584776080602444f75815a7aff4d287bb2d7018b32'],
    }),
    ('portalocker', '2.7.0', {
        'checksums': ['032e81d534a88ec1736d03f780ba073f047a06c478b06e2937486f334e955c51'],
    }),
    ('pyparsing', '3.1.1', {
        'checksums': ['ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db'],
    }),
    ('psutil', '5.6.1', {
        'checksums': ['fa0a570e0a30b9dd618bffbece590ae15726b47f9f1eaf7518dfb35f4d7dcd21'],
    }),
    ('rocrate', '0.11.0', {
        'checksums': ['5fa4002446695e2a927ead02eee7be0ecf4e0089312d8127e51aa2175a25fa59'],
    }),
    ('setproctitle', '1.3.3', {
        'checksums': ['c913e151e7ea01567837ff037a23ca8740192880198b7fbb90b16d181607caae'],
    }),
    ('livereload', '2.7.0', {
        'checksums': ['f4ba199ef93248902841e298670eebfe1aa9e148e19b343bc57dbf1b74de0513'],
    }),
    ('nodeenv', '1.9.0', {
        'checksums': ['07f144e90dae547bf0d4ee8da0ee42664a42a04e02ed68e06324348dafe4bdb1'],
    }),
    ('accessible_pygments', '0.0.5', {
        'modulename': 'a11y_pygments',
        'sources': ['accessible_pygments-0.0.5.tar.gz'],
        'checksums': ['40918d3e6a2b619ad424cb91e556bd3bd8865443d9f22f1dcdf79e33c8046872'],
    }),
    ('sphinx-theme-builder', '0.2.0b2', {
        'checksums': ['e9cd98c2bb35bf414fe721469a043cdcc10f0808d1ffcf606acb4a6282a6f288'],
    }),
    ('pydata-sphinx-theme', '0.15.4', {
        'sources': ['pydata_sphinx_theme-0.15.4.tar.gz'],
        'checksums': ['7762ec0ac59df3acecf49fd2f889e1b4565dbce8b88b2e29ee06fdd90645a06d'],
    }),
    ('sphinx-autobuild', '2021.3.14', {
        'checksums': ['de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05'],
    }),
    ('sphinx-reredirects', '0.1.2', {
        'sources': ['sphinx_reredirects-0.1.2.tar.gz'],
        'checksums': ['a0e7213304759b01edc22f032f1715a1c61176fc8f167164e7a52b9feec9ac64'],
    }),
    ('pytest-cov', '5.0.0', {
        'checksums': ['5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857'],
    }),
    ('pytest-mock', '3.14.0', {
        'checksums': ['2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0'],
    }),
    ('ruamel.yaml', '0.18.6', {
        'checksums': ['8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b'],
    }),
    ('paramiko', '3.5.0', {
        'checksums': ['ad11e540da4f55cedda52931f1a3f812a8238a7af7f62a60de538cd80bb28124'],
    }),
    ('invoke', '2.2.0', {
        'checksums': ['ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5'],
    }),



    (name, version, {
        'sources': [{
            'filename': '%(name)s-%(version)s.tar.gz',
            'git_config': {
                'url': 'https://earth.bsc.es/gitlab/es',
                'repo_name': 'autosubmit',
                'tag': v%(version)s,
                'recursive': True,
                'keep_git_dir': True,
            }
        }],
        'checksums': [None],
    }),
]

sanity_check_paths = {
    'files': ['bin/autosubmit'],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = [('autosubmit -v','')]

moduleclass = 'vis'
