equinor / omnia-timeseries-python

Official Python SDK for the Omnia Timeseries API
MIT License
6 stars 4 forks source link

Release version is not consitent #43

Closed mortendaehli closed 11 months ago

mortendaehli commented 11 months ago

The release version is 1.3.1, but it is built as version 1.0.0 because the pyproject.toml file specifies v1.0.0. This leads to certain issues when installing the package.

I suggest you use release-please and a version.py-file.

version.py:

from importlib.metadata import PackageNotFoundError, distribution

try:
    version = distribution("omnia_timeseries").version
except PackageNotFoundError:
    # This will happen if you run omnia-timeseries without installing it as a package.
    version = "0.0.0"

Release-please is super simple in GitHub Actions, and will automatically create a new release PR depending on the changes you make:

name: "🎉 Release Please"

on:
  push:
    branches:
      - main

jobs:
  release_please:
    name: Create Release PR
    runs-on: ubuntu-latest
    steps:
      - name: Create GitHub Release
        id: release
        uses: google-github-actions/release-please-action@v4
        with:
          release-type: python
          package-name: omnina-timeseries
mortendaehli commented 11 months ago
Screenshot 2023-12-04 at 13 16 04
TorgeirWaagbo commented 11 months ago

Thanks for the suggestion, should be resolved in v1.3.2