You've already forked hotpocket
BTHLABS-49: WIP
This commit is contained in:
15
services/packages/poetry.lock
generated
15
services/packages/poetry.lock
generated
@@ -221,6 +221,19 @@ python-dateutil = "2.9.0.post0"
|
||||
type = "directory"
|
||||
url = "testing"
|
||||
|
||||
[[package]]
|
||||
name = "hotpocket-workspace-tools"
|
||||
version = "1.0.0.dev0"
|
||||
description = "HotPocket Workspace Tools"
|
||||
optional = false
|
||||
python-versions = "^3.12"
|
||||
files = []
|
||||
develop = true
|
||||
|
||||
[package.source]
|
||||
type = "directory"
|
||||
url = "workspace_tools"
|
||||
|
||||
[[package]]
|
||||
name = "iniconfig"
|
||||
version = "2.1.0"
|
||||
@@ -889,4 +902,4 @@ files = [
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.12"
|
||||
content-hash = "cb0ccd3db8ca24c4b439c880dbb6012bc7d9104fb59b45b9dd4738b8e975f1a8"
|
||||
content-hash = "02c9f754b0dbe7e7b2f24d576f294be52027f4267b9a8ea3ac316f2eba1b881b"
|
||||
|
||||
@@ -12,6 +12,7 @@ python = "^3.12"
|
||||
hotpocket-common = {path = "common", develop = true}
|
||||
hotpocket-soa = {path = "soa", develop = true}
|
||||
hotpocket-testing = {path = "testing", develop = true}
|
||||
hotpocket-workspace-tools = {path = "workspace_tools", develop = true}
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
factory-boy = "3.3.3"
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from invoke import task
|
||||
from invoke.exceptions import UnexpectedExit
|
||||
|
||||
ENV = os.getenv('HOTPOCKET_COMMON_ENV', 'docker')
|
||||
from hotpocket_workspace_tools import get_workspace_mode
|
||||
|
||||
WORKSPACE_MODE = get_workspace_mode()
|
||||
|
||||
|
||||
@task
|
||||
@@ -89,7 +89,7 @@ def ci(ctx):
|
||||
|
||||
@task
|
||||
def setup(ctx):
|
||||
raise NotImplementedError()
|
||||
print('NOOP')
|
||||
|
||||
|
||||
@task
|
||||
|
||||
3
services/packages/workspace_tools/README.md
Normal file
3
services/packages/workspace_tools/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# HotPocket by BTHLabs
|
||||
|
||||
This repository contains the _HotPocket Workspace Tools_ project.
|
||||
@@ -0,0 +1,2 @@
|
||||
from .constants import WorkspaceMode # noqa: F401
|
||||
from .workspace_mode import get_workspace_mode # noqa: F401
|
||||
@@ -0,0 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
|
||||
DEFAULT_WORKSPACE_MODE = 'docker'
|
||||
|
||||
|
||||
class WorkspaceMode(enum.Enum):
|
||||
DOCKER = 'docker'
|
||||
METAL = 'metal'
|
||||
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from .constants import DEFAULT_WORKSPACE_MODE, WorkspaceMode
|
||||
|
||||
|
||||
def get_workspace_mode(default: str | None = None) -> WorkspaceMode:
|
||||
return WorkspaceMode(os.getenv(
|
||||
'HOTPOCKET_WORKSPACE_MODE',
|
||||
(
|
||||
default
|
||||
if default is not None
|
||||
else DEFAULT_WORKSPACE_MODE
|
||||
),
|
||||
))
|
||||
14
services/packages/workspace_tools/pyproject.toml
Normal file
14
services/packages/workspace_tools/pyproject.toml
Normal file
@@ -0,0 +1,14 @@
|
||||
[tool.poetry]
|
||||
name = "hotpocket-workspace-tools"
|
||||
version = "1.0.0.dev0"
|
||||
description = "HotPocket Workspace Tools"
|
||||
authors = ["Tomek Wójcik <contact@bthlabs.pl>"]
|
||||
license = "BTHLabs Source Available License Agreement"
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.12"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
Reference in New Issue
Block a user