${{ runner.os }}-pip-
- name: Install requirements
- # NOTE: container lacks OS dist for testresources/launchpadlib
run: |
pip install coveralls==3.3.1
- pip install testresources==2.0.1
pip install -r requirements.txt
pip install -r requirements-test.txt
uses: actions/cache@v3
with:
path: ~/.cache/pip
- key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements*.txt') }}
+ key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
- ${{ runner.os }}-pip-
-
- # NOTE: These are the last supported versions on Python 3.4
- - name: Install requirements (Python 3.4)
- if: matrix.python-version == '3.4.10'
- run: |
- pip install colorama==0.4.1
+ ${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install CLI
env:
---
name: test-win32
+
"on":
push: {}
.. code-block:: bash
mkdir -p $HOME/.bash_completion.d
- activate-global-python-argcomplete --dest=$HOME/.bash_completion.d
+ activate-global-python-argcomplete --user
And my ``~/.bashrc`` file looks like this.
# Package info
__title__ = "nutra"
-__version__ = "0.2.5.dev0"
+__version__ = "0.2.5.dev1"
__author__ = "Shane Jaroch"
__email__ = "chown_tee@proton.me"
__license__ = "GPL v3"
################################################################################
servings_rows = []
nutrients_rows = []
- for food_id in analyses:
- food_name = food_des[food_id][2]
+ for food_id, food_des_tuple in analyses.items():
+ food_name = food_des_tuple[2]
print(
"\n======================================\n"
+ "==> {0} ({1})\n".format(food_name, food_id)
################################################################################
headers = ["id", "nutrient", "rda", "amount", "units"]
nutrient_rows = []
- for nutrient_id, amount in analyses[food_id]:
+ for nutrient_id, amount in food_des_tuple:
# Skip zero values
if not amount:
continue
"""Constants and default settings"""
-from colorama import Fore
+from colorama import Fore, Style
################################################################################
# Colors and buffer settings
COLOR_CRIT = Fore.RED
THRESH_OVER = 1.9
-COLOR_OVER = Fore.MAGENTA # Fore.LIGHTMAGENTA_EX, Fore.LIGHTBLACK_EX
+COLOR_OVER = Style.DIM + Fore.MAGENTA
-COLOR_DEFAULT = Fore.LIGHTCYAN_EX # Fore.BLUE, Fore.LIGHTBLUE_EX
+COLOR_DEFAULT = Style.BRIGHT + Fore.CYAN
################################################################################
# Nutrient IDs
-argcomplete>=1.12.3
-colorama>=0.4.1
-fuzzywuzzy==0.18.0
-tabulate>=0.8.9
+argcomplete<=1.12.3,>=1.8.0
+colorama<=0.4.1,>=0.1.16
+fuzzywuzzy<=0.18.0,>=0.3.0
+tabulate<=0.8.9,>=0.4.3