From bf28e07703783ceecc18c117b3a978fc54e22640 Mon Sep 17 00:00:00 2001 From: Serge Koudoro Date: Mon, 8 Jan 2024 22:44:47 -0500 Subject: [PATCH 1/3] simplify CI --- .github/workflows/test.yml | 7 ++----- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9026e01..7e0c8a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - python-version: [3.9, '3.10', 3.11] + python-version: [3.9, '3.10', 3.11, 3.12] os: [ubuntu-latest, macos-latest, windows-latest] @@ -24,10 +24,7 @@ jobs: - name: Install the package and its dependencies run: | python -m pip install --upgrade pip - pip install .[docs,test,demo] - - name: Check Dependencies - run: | - pipconflictchecker + pip install .[test] - name: Lint run: | flake8 . diff --git a/pyproject.toml b/pyproject.toml index 1273834..cf7515d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,10 +18,10 @@ classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ From 8937859897a1b4f78e04012f20d0ea81d45fda44 Mon Sep 17 00:00:00 2001 From: Serge Koudoro Date: Mon, 8 Jan 2024 23:01:38 -0500 Subject: [PATCH 2/3] add dependabot --- .github/dependabot.yml | 10 ++++++++++ .github/workflows/test.yml | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..11eb345 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e0c8a8..83bdecd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,15 +16,15 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install the package and its dependencies run: | python -m pip install --upgrade pip - pip install .[test] + pip install ".[test]" - name: Lint run: | flake8 . From a54e7720b402e8228dd3190a0a903290777845c8 Mon Sep 17 00:00:00 2001 From: Serge Koudoro Date: Mon, 8 Jan 2024 23:05:45 -0500 Subject: [PATCH 3/3] simplify installation --- .github/workflows/test.yml | 4 +++- gapps/cardservice/utilities.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83bdecd..8af3a5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,10 +24,12 @@ jobs: - name: Install the package and its dependencies run: | python -m pip install --upgrade pip - pip install ".[test]" + pip install . - name: Lint run: | + pip install flake8 flake8 . - name: Test run: | + pip install pytest cd && mkdir for_test && cd for_test && pytest -svv --pyargs gapps --durations=0 \ No newline at end of file diff --git a/gapps/cardservice/utilities.py b/gapps/cardservice/utilities.py index 8fc6f9b..03b8a70 100644 --- a/gapps/cardservice/utilities.py +++ b/gapps/cardservice/utilities.py @@ -129,7 +129,9 @@ def floats2hex(rgb): """Takes an RGB tuple or list and returns a hex RGB string.""" if not rgb or not isinstance(rgb, (tuple, list)): return None - return f'#{int(rgb[0]*255):02x}{int(rgb[1]*255):02x}{int(rgb[2]*255):02x}' + str_hex = f'#{int(rgb[0] * 255):02x}{int(rgb[1] * 255):02x}' + str_hex += f'{int(rgb[2] * 255):02x}' + return str_hex def get_form_value(form, key):