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

36: Update to latest python template. #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 5 additions & 2 deletions ci/linux/create_venv.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

python3.11 -m venv ./.venv
. .venv/bin/activate
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi
pip3 install pip-tools
2 changes: 1 addition & 1 deletion ci/linux/gen_protocol.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
. .venv/bin/activate
Expand Down
8 changes: 6 additions & 2 deletions ci/linux/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi

. .venv/bin/activate
pip-sync ./dev-requirements.txt ./requirements.txt
12 changes: 8 additions & 4 deletions ci/linux/update_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

. .venv/bin/activate
pip-compile --output-file=requirements.txt pyproject.toml
pip-compile --extra=dev -c requirements.txt --output-file=dev-requirements.txt pyproject.toml
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi

pip-compile --upgrade --output-file=requirements.txt pyproject.toml
pip-compile --upgrade --extra=dev -c requirements.txt --output-file=dev-requirements.txt pyproject.toml
23 changes: 7 additions & 16 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,22 @@
#
# pip-compile --constraint=requirements.txt --extra=dev --output-file=dev-requirements.txt pyproject.toml
#
build==1.0.3
# via
# omotes_sdk_protocol_generation (pyproject.toml)
# pip-tools
click==8.1.7
# via pip-tools
build==1.2.2.post1
# via omotes_sdk_protocol_generation (pyproject.toml)
mypy-protobuf==3.5.0
# via omotes_sdk_protocol_generation (pyproject.toml)
packaging==23.2
packaging==24.2
# via
# build
# setuptools-git-versioning
pip-tools==7.3.0
# via omotes_sdk_protocol_generation (pyproject.toml)
protobuf==4.25.2
protobuf==5.29.1
# via mypy-protobuf
pyproject-hooks==1.0.0
pyproject-hooks==1.2.0
# via build
setuptools-git-versioning==1.13.5
setuptools-git-versioning==2.0.0
# via omotes_sdk_protocol_generation (pyproject.toml)
types-protobuf==4.24.0.20240106
types-protobuf==5.29.1.20241207
# via mypy-protobuf
wheel==0.42.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ dependencies = [

[project.optional-dependencies]
dev = [
"pip-tools~=7.3.0",
"mypy-protobuf ~= 3.5.0",
"build ~= 1.0.3",
"setuptools-git-versioning < 2"
"build ~= 1.2.2",
"setuptools-git-versioning >= 2.0, < 3"
]

[project.urls]
Expand All @@ -40,7 +39,12 @@ changelog = "https://github.com/Project-OMOTES/omotes_sdk_protocol/blob/main/CHA

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools ~= 69.0.3", "wheel ~= 0.40.0", "setuptools-git-versioning<2"]
requires = [
"setuptools ~= 75.6.0",
"wheel ~= 0.45.1",
"setuptools-git-versioning >= 2.0, < 3",
]

[tool.setuptools-git-versioning]
enabled = true
starting_version = "0.0.1"
7 changes: 5 additions & 2 deletions python/ci/linux/build_python_package.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

. ./python/.venv/bin/activate
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. ./python/.venv/bin/activate
fi
cd ./python/
python -m build
7 changes: 5 additions & 2 deletions python/ci/linux/create_venv.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

python3 -m venv ./python/.venv
. ./python/.venv/bin/activate
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. ./python/.venv/bin/activate
fi
pip3 install pip-tools
7 changes: 5 additions & 2 deletions python/ci/linux/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

. ./python/.venv/bin/activate
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. ./python/.venv/bin/activate
fi
pip-sync ./python/dev-requirements.txt ./python/requirements.txt
12 changes: 8 additions & 4 deletions python/ci/linux/update_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

. ./python/.venv/bin/activate
pip-compile --output-file=./python/requirements.txt ./python/pyproject.toml
pip-compile --extra=dev -c ./python/requirements.txt --output-file=./python/dev-requirements.txt ./python/pyproject.toml
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. ./python/.venv/bin/activate
fi

pip-compile --upgrade --output-file=./python/requirements.txt ./python/pyproject.toml
pip-compile --upgrade --extra=dev -c ./python/requirements.txt --output-file=./python/dev-requirements.txt ./python/pyproject.toml
27 changes: 9 additions & 18 deletions python/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --constraint=./python/requirements.txt --extra=dev --output-file=./python/dev-requirements.txt ./python/pyproject.toml
#
build==1.0.3
# via
# omotes_sdk_protocol (./python/pyproject.toml)
# pip-tools
click==8.1.7
# via pip-tools
packaging==23.2
build==1.2.2.post1
# via omotes-sdk-protocol (python/pyproject.toml)
packaging==24.2
# via
# build
# setuptools-git-versioning
pip-tools==7.3.0
# via omotes_sdk_protocol (./python/pyproject.toml)
protobuf==4.25.2
protobuf==5.29.1
# via
# -c ./python/requirements.txt
# omotes_sdk_protocol (./python/pyproject.toml)
pyproject-hooks==1.0.0
# omotes-sdk-protocol (python/pyproject.toml)
pyproject-hooks==1.2.0
# via build
setuptools-git-versioning==1.13.5
# via omotes_sdk_protocol (./python/pyproject.toml)
wheel==0.42.0
# via pip-tools
setuptools-git-versioning==2.0.0
# via omotes-sdk-protocol (python/pyproject.toml)

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
18 changes: 11 additions & 7 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "omotes-sdk-protocol"
requires-python = ">=3.8"
requires-python = ">=3.9"
dynamic = ["version"]
authors = [
{ name = "Sebastiaan la Fleur", email = "[email protected]" },
Expand All @@ -23,15 +23,14 @@ classifiers = [
]

dependencies = [
"protobuf ~= 4.25.2"
"protobuf ~= 5.29.1"
]

[project.optional-dependencies]
dev = [
"pip-tools ~= 7.3.0",
"build ~= 1.0.3",
"setuptools-git-versioning < 2",
"setuptools ~= 69.0.3"
"build ~= 1.2.2",
"setuptools-git-versioning >= 2.0, < 3",
"setuptools ~= 75.6.0",
]

[project.urls]
Expand All @@ -42,10 +41,15 @@ changelog = "https://github.com/Project-OMOTES/omotes_sdk_protocol/blob/main/CHA

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools ~= 69.0.3", "wheel ~= 0.40.0", "setuptools-git-versioning<2"]
requires = [
"setuptools ~= 75.6.0",
"wheel ~= 0.45.1",
"setuptools-git-versioning >= 2.0, < 3",
]

[tool.setuptools.package-data]
"omotes_sdk_protocol" = ["py.typed"]

[tool.setuptools-git-versioning]
enabled = true
starting_version = "0.0.1"
6 changes: 3 additions & 3 deletions python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=./python/requirements.txt ./python/pyproject.toml
#
protobuf==4.25.2
# via omotes_sdk_protocol (./python/pyproject.toml)
protobuf==5.29.1
# via omotes-sdk-protocol (python/pyproject.toml)
Loading