diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index cab489f6..00000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[bumpversion] -current_version = 2.1.0-0 -commit = True -message = - [SKIP] Automatic version bump {current_version} -> {new_version} -tag = True -tag_message = - Automatic version bump {current_version} -> {new_version} -parse = (?P\d+)\.(?P\d+)\.(?P\d+)?(\-(?P\d+))? -serialize = - {major}.{minor}.{patch}-{build} - -[bumpversion:file:setup.py] - -[bumpversion:file:./mobros/__version__.py] diff --git a/.github/workflows/DeployOnGitRelease.yml b/.github/workflows/DeployOnGitRelease.yml index fe0aa422..fc67e5af 100644 --- a/.github/workflows/DeployOnGitRelease.yml +++ b/.github/workflows/DeployOnGitRelease.yml @@ -5,13 +5,14 @@ on: jobs: Release: - uses: MOV-AI/.github/.github/workflows/py-deb-workflow.yml@v1 + uses: MOV-AI/.github/.github/workflows/py-deb-workflow.yml@v2 with: - release: 'true' + release: true prod_publish_repos: '["ppa-main","ppa-public"]' secrets: auto_commit_user: ${{ secrets.RAISE_BOT_COMMIT_USER }} auto_commit_mail: ${{ secrets.RAISE_BOT_COMMIT_MAIL }} + auto_commit_password: ${{ secrets.RAISE_BOT_COMMIT_PASSWORD }} registry_user: ${{ secrets.PORTUS_APP_USER }} registry_password: ${{ secrets.PORTUS_APP_TOKEN }} nexus_publisher_user: ${{ secrets.NEXUS_PUBLISHER_USR }} diff --git a/.github/workflows/DeployOnMergeMain.yml b/.github/workflows/DeployOnMergeMain.yml index 3da78cd5..5f964433 100644 --- a/.github/workflows/DeployOnMergeMain.yml +++ b/.github/workflows/DeployOnMergeMain.yml @@ -1,18 +1,16 @@ -name: "CI - On Push" +name: "Deploy - On branch main/release Push" on: push: branches: - main - 'releases/**' - paths-ignore: - - '.bumpversion.cfg' - - 'setup.py' jobs: CI: - uses: MOV-AI/.github/.github/workflows/py-deb-workflow.yml@v1 + uses: MOV-AI/.github/.github/workflows/py-deb-workflow.yml@v2 with: - deploy: 'true' + deploy: true + with_docs: false secrets: auto_commit_user: ${{ secrets.RAISE_BOT_COMMIT_USER }} auto_commit_mail: ${{ secrets.RAISE_BOT_COMMIT_MAIL }} diff --git a/.github/workflows/TestOnPR.yml b/.github/workflows/TestOnPR.yml index 45e2797d..cb76dd5d 100644 --- a/.github/workflows/TestOnPR.yml +++ b/.github/workflows/TestOnPR.yml @@ -5,18 +5,17 @@ on: - dev - main - 'releases/**' - paths-ignore: - - '.bumpversion.cfg' - - 'setup.py' jobs: CI: - uses: MOV-AI/.github/.github/workflows/py-deb-workflow.yml@v1 + uses: MOV-AI/.github/.github/workflows/py-deb-workflow.yml@v2 with: - deploy: 'false' + deploy: false + with_docs: false secrets: auto_commit_user: ${{ secrets.RAISE_BOT_COMMIT_USER }} auto_commit_mail: ${{ secrets.RAISE_BOT_COMMIT_MAIL }} + auto_commit_password: ${{ secrets.RAISE_BOT_COMMIT_PASSWORD }} registry_user: ${{ secrets.PORTUS_APP_USER }} registry_password: ${{ secrets.PORTUS_APP_TOKEN }} nexus_publisher_user: ${{ secrets.NEXUS_PUBLISHER_USR }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 14a55016..107c50e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,6 @@ repos: - id: mixed-line-ending # fixes line files line ending args: [--fix=lf] - id: trailing-whitespace # removes trailing whitespaces from text files - exclude: .bumpversion.cfg # a tool edits this file and leaves trailing spaces, must be ignored - repo: https://github.com/koalaman/shellcheck-precommit rev: v0.10.0 hooks: diff --git a/.pylintrc b/.pylintrc index 7fb18723..c9332273 100644 --- a/.pylintrc +++ b/.pylintrc @@ -7,7 +7,7 @@ disable=print-statement, no-self-use, duplicate-code, invalid-name -ignore=setup.py, tests, node_modules, start.py, local_deploy.py +ignore=tests, node_modules, start.py, local_deploy.py ignore-patterns=.*_test.*?py,.*test_.*?py,.*test.*?py,.*pb2.*,.*yml, .*toml, .*txt, .*md, .*yaml, .*bash, .*json [FORMAT] diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e69de29b diff --git a/README.md b/README.md index 3c0925f0..4d7fe9ed 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Python framework to enable building and packaging of MOV.AI ROS components. + **main branch:** [![Deploy - On branch main/release Push](https://github.com/MOV-AI/mobros-build-system/actions/workflows/DeployOnMergeMain.yml/badge.svg)](https://github.com/MOV-AI/mobros-build-system/actions/workflows/DeployOnMergeMain.yml) diff --git a/build-requirements.txt b/build-requirements.txt index d67c83bc..6bb18558 100644 --- a/build-requirements.txt +++ b/build-requirements.txt @@ -1,11 +1,10 @@ pytest pytest-cov mock -bump2version flake8 pylint black -tox +tox==4.* ruamel.yaml boto3 pydpkg diff --git a/mobros/__version__.py b/mobros/__version__.py index 74623e69..47ca92e0 100644 --- a/mobros/__version__.py +++ b/mobros/__version__.py @@ -1,2 +1,2 @@ """ Module that contains the application version """ -version = "2.1.0-0" +version = "2.1.0-14" diff --git a/pyproject.toml b/pyproject.toml index b5a3c468..568e2372 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,62 @@ [build-system] requires = [ - "setuptools>=42", - "wheel" + "setuptools>=61", + "setuptools-scm>=8.0", ] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + +[project] +name = "mobros" +version = "2.1.0.14" +authors = [ + {name = "DevOps team", email = "bacdevopskend@mov.ai"}, +] +description = "Movai Object Builder for Ros, The framework to build, raise and package ros and ros movai packages" +readme = "README.md" +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Python :: 3", +] +dependencies = [ + "boto3", + "ruamel.yaml", + "pydpkg", + "rosdep", + "setuptools==45.0", + "pyopenssl==23.0.0", + "anytree", + "termcolor", + "urllib3==1.*" +] + +[project.urls] +Repository = "https://github.com/MOV-AI/movai-ros-build-system" + +[project.scripts] +mobros = "mobros.handler:handle" + +[tool.setuptools.packages.find] +include = ["mobros*"] +exclude = ["mobros.tests*"] + +[tool.black] +line-length = 100 + +[tool.bumpversion] +current_version = "2.1.0.14" +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)?(\\.(?P\\d+))?" +serialize = ["{major}.{minor}.{patch}.{build}"] + +[[tool.bumpversion.files]] +filename = "pyproject.toml" +search = 'version = "{current_version}"' +replace = 'version = "{new_version}"' +regex = true + +[[tool.bumpversion.files]] +filename = "CHANGELOG.md" +search = '# vTBD' +serialize = ["{major}.{minor}.{patch}"] +replace = "# v{new_version}" +regex = true +ignore_missing_version = true diff --git a/setup.py b/setup.py deleted file mode 100644 index 4663e4c6..00000000 --- a/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -import setuptools - -with open("README.md", "r") as fh: - long_description = fh.read() - -setuptools.setup( - name="mobros", - version="2.1.0-0", - author="DevOps team", - author_email="devops@mov.ai", - description="Movai Object Builder for Ros, The framework to build, raise and package ros and ros movai packages", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/MOV-AI/movai-ros-build-system", - packages=setuptools.find_packages(), - include_package_data=True, - classifiers=["Programming Language :: Python :: 3"], - install_requires=[ - "boto3", - "ruamel.yaml", - "pydpkg", - "rosdep", - "setuptools==45.0", - "pyopenssl==23.0.0", - "anytree", - "termcolor", - "urllib3==1.*" - ], - entry_points={ - "console_scripts": ["mobros = mobros.handler:handle"]}, -)