Skip to content

Commit

Permalink
pyproject: Migrate from poetry to pyproject
Browse files Browse the repository at this point in the history
* This allows extension repository be installed from repo root from pip
  • Loading branch information
JoaoMario109 authored and patrickelectric committed Jul 25, 2024
1 parent 863890a commit 68f13d0
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
- name: Install
run: |
sudo apt install -y yarn
python -m pip install --upgrade poetry
python -m pip install --editable .
rm -rf blueos_extensions_repository.egg-info
mkdir build
- name: Build manifest
run: |
poetry install
poetry run blueos_repository/consolidate.py
python blueos_repository/consolidate.py
mv manifest.json build/
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade poetry
poetry config virtualenvs.create false
poetry install
python -m pip install --editable '.[dev]'
rm -rf blueos_extensions_repository.egg-info
- name: Run tests
run: |
./.hooks/pre-push
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ website/public
__pycache__/
*.py[cod]
*$py.class

### Build Info ###
blueos_extensions_repository.egg-info/
77 changes: 43 additions & 34 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
# This file is used only for setting up CI. no deployment is done with it

[tool.poetry]
[project]
name = "blueos-extensions-repository"
version = "0.0.1"
description = "Blue Robotics BlueOS Extensions Repository"
authors = ["Blue Robotics <[email protected]>"]
license = "MIT"
packages = [{include = "blueos_repository"}]

[tool.poetry.dependencies]
aiohttp = "3.7.4"
aiohttp-retry = "2.8.3"
json-five = "1.1.1"
python = "^3.10"
semver = "^2.13.0"
dataclass-wizard = "^0.22.3"

[tool.poetry.dev-dependencies]
black = "22.3.0"
isort = "5.10.1"
mypy = "0.941"
pydantic = "1.9.0"
pylint = "2.14.5"
authors = [
{name = "Blue Robotics", email = "[email protected]"},
]
license = {text = "MIT License"}
requires-python = ">=3.10"
dependencies = [
"aiohttp==3.7.4",
"aiohttp-retry==2.8.3",
"json-five==1.1.1",
"semver>=2.13.0",
"dataclass-wizard==0.22.3",
]

[project.optional-dependencies]
dev = [
"black==22.3.0",
"isort==5.10.1",
"mypy==0.941",
"pydantic==1.9.0",
"pylint==2.14.5",
]

[tool.setuptools]
packages = [
"blueos_repository",
"blueos_repository.docker",
"blueos_repository.extension"
]

[tool.black]
line-length = 120

[tool.isort]
profile = "black"

[tool.pylint]
[tool.pylint.master]
enable = "all"
disable = [
"line-too-long", # We already have this in black.
"locally-disabled", # We know what we are doing, necessary to load plugins in runtime
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"suppressed-message",
"wrong-import-position",
]

[tool.pylint.miscellaneous]
notes = [ "FIXME" ] # TODO is removed for internal development
[tool.pylint.master]
enable = "all"
disable = [
"line-too-long", # We already have this in black.
"locally-disabled", # We know what we are doing, necessary to load plugins in runtime
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"suppressed-message",
"wrong-import-position",
]

[tool.pylint.miscellaneous]
notes = ["FIXME"] # TODO is removed for internal development

[tool.mypy]
allow_untyped_decorators = true
Expand Down

0 comments on commit 68f13d0

Please sign in to comment.