Skip to content

fix(build): migrate setup.py to pyproject.toml #68

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

Merged
merged 1 commit into from
Dec 27, 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
16 changes: 0 additions & 16 deletions .bumpversion.cfg

This file was deleted.

19 changes: 19 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tool.bumpversion]
current_version = "0.25.0"
commit = true
message = "Update version {current_version} -> {new_version}"

[[tool.bumpversion.files]]
filename = "ibm_vpc/version.py"
search = "__version__ = '{current_version}'"
replace = "__version__ = '{new_version}'"

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "README.md"
search = "{current_version}"
replace = "{new_version}"
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "bump2version --allow-dirty --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
"prepareCmd": "bump-my-version bump --allow-dirty --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
}
],
[
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install:
script: tox

before_deploy:
- pip install bump2version
- pip install bump-my-version
- nvm install --lts
- npm install @semantic-release/changelog
- npm install @semantic-release/exec
Expand Down
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
setup: deps dev_deps install
setup: deps dev-deps install

deps:
pip install -r requirements.txt
pip install .

dev_deps:
pip install -r requirements-dev.txt
dev-deps:
pip install .[dev]

install:
pip install -e .
Expand All @@ -15,6 +15,12 @@ unit-test:
test-int:
pytest -v test/integration --capture=tee-sys


test-examples:
pytest -v examples/test_vpc_v1_examples.py -rs --capture=tee-sys
pytest -v examples/test_vpc_v1_examples.py -rs --capture=tee-sys

lint:
pylint ibm_vpc test examples --exit-zero
black --check ibm_vpc test examples test

lint-fix:
black ibm_vpc test examples
94 changes: 94 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
[project]
name = "ibm-vpc"
version = "0.0.1"
authors = [
{ name="IBM", email="[email protected]" }
]
description = "Python client library for IBM Cloud ibm-vpc Services"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
keywords=["ibm", "cloud", "ibm cloud services", "vpc" ]
dependencies = [
"ibm_cloud_sdk_core>=3.22.0",
"python_dateutil>=2.5.3,<3.0.0",
]

[project.urls]
Repository = "https://github.ibm.com/ibmcloud/vpc-python-sdk"
Documentation = "https://github.ibm.com/ibmcloud/vpc-python-sdk/blob/master/README.md"
Issues = "https://github.ibm.com/ibmcloud/vpc-python-sdk/issues"
Contributing = "https://github.ibm.com/ibmcloud/vpc-python-sdk/blob/master/CONTRIBUTING.md"
License = "https://github.ibm.com/ibmcloud/vpc-python-sdk/blob/master/LICENSE"

[project.optional-dependencies]
dev = [
"coverage>=7.3.2,<8.0.0",
"pylint>=3.0.0,<4.0.0",
"pytest>=7.4.2,<8.0.0",
"pytest-cov>=4.1.0,<5.0.0",
"responses>=0.23.3,<1.0.0",
"black>=24.0.0,<25.0.0",
"pytest-rerunfailures>=12.0",
"tox>=4.12.0,<4.23.2",
]
publish = [
"build",
"twine"
]

[build-system]
requires = ["setuptools>=67.7.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["ibm_vpc"]

[tool.black]
line-length = 120
skip-string-normalization = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37-lint, py37, py38, py39

[testenv:py37-lint]
basepython = python3.7
deps = pylint
commands = pylint --rcfile=.pylintrc ibm-vpc test/unit

[testenv]
passenv = TOXENV CI TRAVIS*
commands =
pytest -v test/unit

deps =
pylint
pytest
pytest-cov
responses
pytest-rerunfailures
ibm_cloud_sdk_core
python_dateutil

usedevelop = True
exclude = .venv,.git,.tox,docs
"""
8 changes: 0 additions & 8 deletions requirements-dev.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

92 changes: 0 additions & 92 deletions setup.py

This file was deleted.