Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyProject: Migrate from poetry to setuptools using pyproject #103

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading