From 563cc012d2b08dbcf2eb88b8356bc02093a9b77a Mon Sep 17 00:00:00 2001 From: Guillaume De Saint Martin Date: Tue, 25 Nov 2025 22:40:29 +0100 Subject: [PATCH 1/2] [Requirements] add full requirements --- .github/workflows/main.yml | 5 ++++- MANIFEST.in | 1 + full_requirements.txt | 14 ++++++++++++++ .../creators/tentacle_creator.py | 14 +++++++++++++- .../exporters/artifact_exporter.py | 13 ++++++++++++- .../exporters/tentacle_package_exporter.py | 13 ++++++++++++- octobot_tentacles_manager/uploaders/s3_uploader.py | 14 +++++++++++++- requirements.txt | 12 +----------- setup.py | 4 ++++ 9 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 full_requirements.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ecda90e..e9f813f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ jobs: uses: Drakkar-Software/.github/.github/workflows/python3_lint_workflow.yml@master with: project_main_package: octobot_tentacles_manager + use_full_requirements: true tests: needs: lint @@ -31,7 +32,7 @@ jobs: architecture: ${{ matrix.arch }} - name: Install dependencies - run: pip install --prefer-binary -r dev_requirements.txt -r requirements.txt + run: pip install --prefer-binary -r dev_requirements.txt -r requirements.txt -r full_requirements.txt - name: Pytests run: | @@ -62,6 +63,8 @@ jobs: needs: tests if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: Drakkar-Software/.github/.github/workflows/python3_sdist_workflow.yml@master + with: + use_full_requirements: true secrets: PYPI_OFFICIAL_UPLOAD_URL: ${{ secrets.PYPI_OFFICIAL_UPLOAD_URL }} PYPI_USERNAME: __token__ diff --git a/MANIFEST.in b/MANIFEST.in index 472471f0..692d8cf4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,3 +5,4 @@ include README.md include LICENSE include CHANGELOG.md include requirements.txt +include full_requirements.txt diff --git a/full_requirements.txt b/full_requirements.txt new file mode 100644 index 00000000..6f0292fc --- /dev/null +++ b/full_requirements.txt @@ -0,0 +1,14 @@ +# Drakkar-Software requirements +OctoBot-Commons[full]>=1.9.88, <1.10 + +# Tentacles compilation requirements +cython==0.29.32 + +# Templating requirements +jinja2>=3.0.3 + +# artifact metadata +pyyaml>=6.0 + +# s3 +aioboto3==12.1.0 diff --git a/octobot_tentacles_manager/creators/tentacle_creator.py b/octobot_tentacles_manager/creators/tentacle_creator.py index e619b14b..f25eea19 100644 --- a/octobot_tentacles_manager/creators/tentacle_creator.py +++ b/octobot_tentacles_manager/creators/tentacle_creator.py @@ -16,7 +16,19 @@ import os import os.path as path import logging -import jinja2.nativetypes as nativetypes +import octobot_commons.constants +try: + import jinja2.nativetypes as nativetypes +except ImportError: + if octobot_commons.constants.USE_MINIMAL_LIBS: + # mock jsonschema imports + class NativetypesImportMock: + class NativeEnvironment: + def __init__(self, *args): + raise ImportError("jinja2 not installed") + nativetypes = NativetypesImportMock() + else: + raise import octobot_commons.logging as common_logging import octobot_tentacles_manager.constants as constants diff --git a/octobot_tentacles_manager/exporters/artifact_exporter.py b/octobot_tentacles_manager/exporters/artifact_exporter.py index 784280cb..f973fb7c 100644 --- a/octobot_tentacles_manager/exporters/artifact_exporter.py +++ b/octobot_tentacles_manager/exporters/artifact_exporter.py @@ -21,7 +21,18 @@ import aiofiles import octobot_commons.logging as logging -import yaml +import octobot_commons.constants as commons_constants +try: + import yaml +except ImportError: + if commons_constants.USE_MINIMAL_LIBS: + # mock yaml imports + class YamlImportMock: + def dump(self, *args): + raise ImportError("yaml not installed") + yaml = YamlImportMock() + else: + raise import octobot_tentacles_manager.models as models import octobot_tentacles_manager.constants as constants diff --git a/octobot_tentacles_manager/exporters/tentacle_package_exporter.py b/octobot_tentacles_manager/exporters/tentacle_package_exporter.py index 9b21c504..2ce6a349 100644 --- a/octobot_tentacles_manager/exporters/tentacle_package_exporter.py +++ b/octobot_tentacles_manager/exporters/tentacle_package_exporter.py @@ -16,7 +16,18 @@ import os import aiofiles -import yaml +import octobot_commons.constants as commons_constants +try: + import yaml +except ImportError: + if commons_constants.USE_MINIMAL_LIBS: + # mock yaml imports + class YamlImportMock: + def safe_load(self, *args): + raise ImportError("yaml not installed") + yaml = YamlImportMock() + else: + raise import octobot_tentacles_manager.exporters.artifact_exporter as artifact_exporter import octobot_tentacles_manager.models as models diff --git a/octobot_tentacles_manager/uploaders/s3_uploader.py b/octobot_tentacles_manager/uploaders/s3_uploader.py index e95f6a73..f8663816 100644 --- a/octobot_tentacles_manager/uploaders/s3_uploader.py +++ b/octobot_tentacles_manager/uploaders/s3_uploader.py @@ -14,7 +14,19 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library. import os -import aioboto3 +import octobot_commons.constants as commons_constants +try: + import aioboto3 +except ImportError: + if commons_constants.USE_MINIMAL_LIBS: + # mock aioboto3 imports + class Aioboto3ImportMock: + class Session: + def __init__(self, *args): + raise ImportError("aioboto3 not installed") + aioboto3 = Aioboto3ImportMock() + else: + raise import logging import octobot_tentacles_manager.uploaders.uploader as uploader diff --git a/requirements.txt b/requirements.txt index 34da02dd..8504c73b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,8 @@ # Tentacles compilation requirements setuptools -cython==0.29.32 # Drakkar-Software requirements -OctoBot-Commons>=1.9.44, <1.10 +OctoBot-Commons>=1.9.88, <1.10 # async files management aiofiles>=0.6.0, <0.7 @@ -11,14 +10,5 @@ aiofiles>=0.6.0, <0.7 # async http requests aiohttp>=3.9.5 -# Templating requirements -jinja2>=3.0.3 - -# artifact metadata -pyyaml>=6.0 - # version comparison packaging>=25.0 - -# s3 -aioboto3==12.1.0 diff --git a/setup.py b/setup.py index 75f4046d..8e66649b 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ DESCRIPTION = f.read() REQUIRED = open('requirements.txt').readlines() +FULL_REQUIRED = open('full_requirements.txt').readlines() REQUIRES_PYTHON = '>=3.8' setup( @@ -44,6 +45,9 @@ zip_safe=False, data_files=[], install_requires=REQUIRED, + extras_require={ + 'full': FULL_REQUIRED, + }, python_requires=REQUIRES_PYTHON, entry_points={ 'console_scripts': [ From 07e49e3ebbdb1648269f698dbfdd244ce5084ab7 Mon Sep 17 00:00:00 2001 From: Guillaume De Saint Martin Date: Wed, 26 Nov 2025 10:48:01 +0100 Subject: [PATCH 2/2] [Version] v1.9.19 --- CHANGELOG.md | 4 ++++ README.md | 2 +- octobot_tentacles_manager/__init__.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 297b8349..22c0c063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.19] - 2024-11-26 +### Added +[Requirements] [full] requirements installation + ## [2.9.18] - 2025-11-18 ### Updated [Tentacles] add DSL operator type diff --git a/README.md b/README.md index 7ba05996..2ad2c2a5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OctoBot-Tentacles-Manager [2.9.18](https://github.com/Drakkar-Software/OctoBot-Tentacles-Manager/tree/master/CHANGELOG.md) +# OctoBot-Tentacles-Manager [1.9.19](https://github.com/Drakkar-Software/OctoBot-Tentacles-Manager/tree/master/CHANGELOG.md) [![PyPI](https://img.shields.io/pypi/v/OctoBot-Tentacles-Manager.svg)](https://pypi.python.org/pypi/OctoBot-Tentacles-Manager/) [![Downloads](https://pepy.tech/badge/OctoBot-Tentacles-Manager/month)](https://pepy.tech/project/OctoBot-Tentacles-Manager) [![Github-Action-CI](https://github.com/Drakkar-Software/OctoBot-Tentacles-Manager/workflows/OctoBot-Tentacles-Manager-CI/badge.svg)](https://github.com/Drakkar-Software/OctoBot-Tentacles-Manager/actions) diff --git a/octobot_tentacles_manager/__init__.py b/octobot_tentacles_manager/__init__.py index 94100d01..adae1157 100644 --- a/octobot_tentacles_manager/__init__.py +++ b/octobot_tentacles_manager/__init__.py @@ -14,5 +14,5 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library. -VERSION = "2.9.18" +VERSION = "1.9.19" PROJECT_NAME = "OctoBot-Tentacles-Manager"