Skip to content

Commit

Permalink
Moved colorama dependency to platform dependent in requirements.txt (#…
Browse files Browse the repository at this point in the history
…219)

* Moved colorama dependency to platform dependent in requirements.txt

* Fix syntax for platform dependent package
  • Loading branch information
remyroy authored Oct 23, 2024
1 parent 06a5a44 commit 126bfe0
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 24 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install -r requirements.txt -r requirements_test.txt
- name: Run type checker
run: python -m mypy --config-file mypy.ini -p ethstaker_deposit
- name: Run linter
Expand Down Expand Up @@ -55,8 +54,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install -r requirements.txt -r requirements_test.txt
- name: Run tests
run: |
coverage run --data-file=.coverage.${{ matrix.os }}.${{ matrix.python-version }} -m pytest tests
Expand Down Expand Up @@ -85,8 +83,7 @@ jobs:
id: merge
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install -r requirements.txt -r requirements_test.txt
coverage combine coverage*
coverage html
- name: Upload final coverage html report
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ clean:

$(VENV_NAME)/bin/activate: requirements.txt
@test -d $(VENV_NAME) || python3 -m venv --clear $(VENV_NAME)
${VENV_NAME}/bin/python -m pip install -r requirements.txt
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
${VENV_NAME}/bin/python -m pip install -r requirements.txt -r requirements_test.txt
@touch $(VENV_NAME)/bin/activate

venv_build: $(VENV_NAME)/bin/activate

venv_build_test: venv_build
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
${VENV_NAME}/bin/python -m pip install -r requirements.txt -r requirements_test.txt

venv_test: venv_build_test
$(VENV_ACTIVATE) && python -m pytest ./tests
Expand Down
1 change: 0 additions & 1 deletion build_configs/windows/requirements.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Windows binary build requirements
# Only use this to get new hashes, don't upgrade requirements.txt directly with pip-compile:
# It can't find pywin32
colorama
future
pefile
pywin32-ctypes
Expand Down
3 changes: 0 additions & 3 deletions build_configs/windows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
-r ../common/requirements.txt

# Build tools for binary distribution
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
future==1.0.0 \
--hash=sha256:929292d34f5872e70396626ef385ec22355a1fae8ad29e1a734c3e43f9fbc216 \
--hash=sha256:bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05
Expand Down
3 changes: 1 addition & 2 deletions docs/src/local_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ On Windows, you'll need:

**To execute tests, you will need to install the test dependencies**:
```sh
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements_test.txt
python3 -m pip install -r requirements.txt -r requirements_test.txt
python3 -m pytest tests
```
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ dynamic = ["version"]

[project.optional-dependencies]
test = [
"colorama", # pip-compile did not pick up from mypy
"exceptiongroup", # pip-compile did not pick up from mypy
"flake8",
"jsonschema",
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ cached-property==1.5.2 \
click==8.1.7 \
--hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \
--hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de
colorama==0.4.6; platform_system == 'Windows' \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
cytoolz==0.12.3 \
--hash=sha256:01cfb8518828c1189200c02a5010ea404407fb18fd5589e29c126e84bbeadd36 \
--hash=sha256:04afa90d9d9d18394c40d9bed48c51433d08b57c042e0e50c8c0f9799735dcbd \
Expand Down
1 change: 0 additions & 1 deletion requirements_test.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# requirements_test.in
colorama # pip-compile did not pick up from mypy
exceptiongroup # pip-compile did not pick up from mypy
flake8
jsonschema
Expand Down
5 changes: 0 additions & 5 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
#
# pip-compile --generate-hashes --no-annotate --output-file=requirements_test.txt requirements_test.in
#
-r requirements.txt

attrs==24.2.0 \
--hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \
--hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
exceptiongroup==1.2.2 \
--hash=sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b \
--hash=sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc
Expand Down
2 changes: 0 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 126bfe0

Please sign in to comment.