Skip to content

Commit

Permalink
internal(CI): Unified dev deps into provisioner module, other project…
Browse files Browse the repository at this point in the history
…s dev deps are auto generated based on it
  • Loading branch information
ZachiNachshon committed Apr 9, 2024
1 parent 26ff550 commit 5f50e27
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 117 deletions.
6 changes: 6 additions & 0 deletions provisioner_examples_plugin/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
default: help

SOURCE_DEV_DEPS_PATH=../../provisioner/pyproject.toml
DEV_DEPS=../../dev_deps.py
POETRY_DEV=../../external/shell_scripts_lib/python/poetry_dev.sh
POETRY_PIP_RELEASER=../../external/shell_scripts_lib/python/poetry_pip_releaser.sh

Expand All @@ -14,6 +16,10 @@ ifeq ($(UNAME_S),Darwin)
SED_INPLACE := -i ''
endif

.PHONY: set-dev-deps
set-dev-deps: ## Update dev dependencies and their config based on provisioner pyproject.toml
@${DEV_DEPS} ${SOURCE_DEV_DEPS_PATH} pyproject.toml

.PHONY: deps
deps: ## Update and install pyproject.toml dependencies on the virtual environment
@${POETRY_DEV} deps
Expand Down
43 changes: 4 additions & 39 deletions provisioner_examples_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,6 @@ packages = [
test_runner = "provisioner_examples_plugin.main_fake:fake_app"
example_plugin = "provisioner_examples_plugin.main_dev:main"

[tool.black]
line-length = 120

[tool.ruff]
exclude = [".venv", "external", ".git-deps"]
line-length = 120
ignore = [ "E501", "E402", "F403", "F405" ]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
# isort
"I",
# Whitespaces
"W",
]

[tool.mypy]
exclude = ["external"]
ignore_missing_imports = "True"
check_untyped_defs = "True"
disallow_untyped_defs = "True"
disallow_incomplete_defs = "True"
disallow_untyped_decorators = "True"
disallow_any_unimported = "False" # Generates an error if a component of a type becomes Any because mypy couldn’t resolve an import
warn_return_any = "False" # Generates an error if you return a value with an Any type in a function that is annotated to return a non-Any value
warn_unused_ignores = "True"
no_implicit_optional = "True"
show_error_codes = "True"

[tool.poetry.dependencies]
python = "^3.10"

Expand All @@ -69,14 +38,10 @@ python = "^3.10"
# For development or testing, uncomment the line below
# provisioner_runtime = { path = "../../provisioner", develop = true }

[tool.poetry.dev-dependencies]
black = "^22.8.0"
pytest = "^7.1.3"
mypy = "^1.0.0"
coverage = "^6.4.4"
diagrams = "^0.22.0"
ruff = "^0.0.265"
poetry-multiproject-plugin = "^1.5.0"
#
# DEV DEPENDENCIES AND THEIR CONFIGS ARE AUTO GENERATED USING:
# make set-dev-deps
#

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
6 changes: 6 additions & 0 deletions provisioner_installers_plugin/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
default: help

SOURCE_DEV_DEPS_PATH=../../provisioner/pyproject.toml
DEV_DEPS=../../dev_deps.py
POETRY_DEV=../../external/shell_scripts_lib/python/poetry_dev.sh
POETRY_PIP_RELEASER=../../external/shell_scripts_lib/python/poetry_pip_releaser.sh

Expand All @@ -14,6 +16,10 @@ ifeq ($(UNAME_S),Darwin)
SED_INPLACE := -i ''
endif

.PHONY: set-dev-deps
set-dev-deps: ## Update dev dependencies and their config based on provisioner pyproject.toml
@${DEV_DEPS} ${SOURCE_DEV_DEPS_PATH} pyproject.toml

.PHONY: deps
deps: ## Update and install pyproject.toml dependencies on the virtual environment
@${POETRY_DEV} deps
Expand Down
43 changes: 4 additions & 39 deletions provisioner_installers_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,6 @@ test_runner = "provisioner_installers_plugin.main_fake:fake_app"
# poetry run installers_plugin
installers_plugin = "provisioner_installers_plugin.main_dev:main"

[tool.black]
line-length = 120

[tool.ruff]
exclude = [".venv", "external", ".git-deps"]
line-length = 120
ignore = [ "E501", "E402", "F403", "F405" ]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
# isort
"I",
# Whitespaces
"W",
]

[tool.mypy]
exclude = ["external"]
ignore_missing_imports = "True"
check_untyped_defs = "True"
disallow_untyped_defs = "True"
disallow_incomplete_defs = "True"
disallow_untyped_decorators = "True"
disallow_any_unimported = "False" # Generates an error if a component of a type becomes Any because mypy couldn’t resolve an import
warn_return_any = "False" # Generates an error if you return a value with an Any type in a function that is annotated to return a non-Any value
warn_unused_ignores = "True"
no_implicit_optional = "True"
show_error_codes = "True"

[tool.poetry.dependencies]
python = "^3.10"

Expand All @@ -70,14 +39,10 @@ python = "^3.10"
# For development or testing, uncomment the line below
# provisioner_runtime = { path = "../../provisioner", develop = true }

[tool.poetry.dev-dependencies]
black = "^22.8.0"
pytest = "^7.1.3"
mypy = "^1.0.0"
coverage = "^6.4.4"
diagrams = "^0.22.0"
ruff = "^0.0.265"
poetry-multiproject-plugin = "^1.5.0"
#
# DEV DEPENDENCIES AND THEIR CONFIGS ARE AUTO GENERATED USING:
# make set-dev-deps
#

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
6 changes: 6 additions & 0 deletions provisioner_single_board_plugin/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
default: help

SOURCE_DEV_DEPS_PATH=../../provisioner/pyproject.toml
DEV_DEPS=../../dev_deps.py
POETRY_DEV=../../external/shell_scripts_lib/python/poetry_dev.sh
POETRY_PIP_RELEASER=../../external/shell_scripts_lib/python/poetry_pip_releaser.sh

Expand All @@ -14,6 +16,10 @@ ifeq ($(UNAME_S),Darwin)
SED_INPLACE := -i ''
endif

.PHONY: set-dev-deps
set-dev-deps: ## Update dev dependencies and their config based on provisioner pyproject.toml
@${DEV_DEPS} ${SOURCE_DEV_DEPS_PATH} pyproject.toml

.PHONY: deps
deps: ## Update and install pyproject.toml dependencies on the virtual environment
@${POETRY_DEV} deps
Expand Down
43 changes: 4 additions & 39 deletions provisioner_single_board_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,6 @@ packages = [
test_runner = "provisioner_single_board_plugin.main_fake:main"
single_board_plugin = "provisioner_single_board_plugin.main_dev:main"

[tool.black]
line-length = 120

[tool.ruff]
exclude = [".venv", "external", ".git-deps"]
line-length = 120
ignore = [ "E501", "E402", "F403", "F405" ]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
# isort
"I",
# Whitespaces
"W",
]

[tool.mypy]
exclude = ["external"]
ignore_missing_imports = "True"
check_untyped_defs = "True"
disallow_untyped_defs = "True"
disallow_incomplete_defs = "True"
disallow_untyped_decorators = "True"
disallow_any_unimported = "False" # Generates an error if a component of a type becomes Any because mypy couldn’t resolve an import
warn_return_any = "False" # Generates an error if you return a value with an Any type in a function that is annotated to return a non-Any value
warn_unused_ignores = "True"
no_implicit_optional = "True"
show_error_codes = "True"

[tool.poetry.dependencies]
python = "^3.10"

Expand All @@ -69,14 +38,10 @@ python = "^3.10"
# For development or testing, uncomment the line below
# provisioner_runtime = { path = "../../provisioner", develop = true }

[tool.poetry.dev-dependencies]
black = "^22.8.0"
pytest = "^7.1.3"
mypy = "^1.0.0"
coverage = "^6.4.4"
diagrams = "^0.22.0"
ruff = "^0.0.265"
poetry-multiproject-plugin = "^1.5.0"
#
# DEV DEPENDENCIES AND THEIR CONFIGS ARE AUTO GENERATED USING:
# make set-dev-deps
#

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 5f50e27

Please sign in to comment.