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

Auto versioning update #305

Closed
wants to merge 11 commits into from
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
pip install .[dev]
pip install -r requirements.txt
- name: Setup test config and CouchDB database server
run: |
Expand Down
43 changes: 20 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
# Python caching
**/__pycache__/
*.pyc
/.mypy_cache/
# Python build artifacts
__pycache__/
*.py[cod]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I preferred the `**/pycache/ from before, since it matches any pycache directory at any level in the repository. These might occur when you run a module outside of the main directory.

*.so
build/
dist/
*.egg-info/
.eggs/

# Typical virtualenv dir
/venv/
# Virtual environment
venv/
env/

# IDE settings
/.idea/
# IDE specific files
.vscode/
.idea/

# Python distribution artifacts
/build/
/dist/
/*.egg-info/
/docs/build/
# Temporary files
*.tmp
*.bak
*.swp

Comment on lines +18 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you encountered this files? I get that if they would exist, we'd want to ignore them, but I personally haven't seen these in Python projects, so if there's no need, I wouldn't add these to the .gitignore.

# Coverage artifacts
/.coverage
/htmlcov/
/docs/build/
/.hypothesis/

Comment on lines -18 to -22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these removed? We're using coverage and the sphinx documentation files are in /docs/build/.

# customized config files
/test/test_config.ini
# Schema files needed for testing
Comment on lines -24 to -25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this

/test/adapter/schemas
# Project specific
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are also actively used in the CI, so it makes sense to keep them

basyx/version.py
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta"

[project]
name = "basyx-python-sdk"
version = "1.0.0"
description = "The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 systems"
authors = [
{ name = "The Eclipse BaSyx Authors", email = "admins@iat.rwth-aachen.de" }
Expand All @@ -25,6 +24,15 @@ dependencies = [
"pyecma376-2>=0.2.4"
]

dynamic = ["version"]

[tool.setuptools_scm]
# Configure setuptools_scm for version management:
# - Automatically infers the version number from the most recent git tag
# - Generates a version.py file in the package directory
# - Allows for automatic versioning between releases (e.g., 1.0.1.dev4+g12345)
write_to = "basyx/version.py"

[project.optional-dependencies]
dev = [
"mypy",
Expand All @@ -45,4 +53,3 @@ basyx = ["py.typed"]

[tool.setuptools.exclude-package-data]
"*" = ["test", "test.*"]

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Werkzeug>=3.0.3,<4
schemathesis~=3.7
hypothesis~=6.13
lxml-stubs~=0.5.1

Loading