From 99a333d39bb3eb23e43867913c1876d0afe18a6d Mon Sep 17 00:00:00 2001 From: Kevin Weiss Date: Fri, 2 May 2025 10:31:10 +0200 Subject: [PATCH 1/2] doc: Prepare for open source Use MIT license and add some info for contributing. --- CONTRIBUTING.md | 8 ++++++++ LICENSE | 23 +++++++++++++++++++++-- README.md | 16 ++++++++++++++++ pyproject.toml | 2 +- 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c7f1a2b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,8 @@ +# Contributing + +To contribute there are a few simple rules to follow. + +- Run `pre-commit` checks +- Make sure everything has 100% coverage and all tests pass +- No dependencies +- Open a PR first... This was the CI can verify your work. diff --git a/LICENSE b/LICENSE index 11926d1..ce1f93e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,21 @@ -Copyright (c) 2025 by Lobaro GmbH -All rights reserved. +The MIT License (MIT) + +Copyright (c) 2025 Lobaro GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index 83bbb49..887655b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ ## lob-hlpr Simple python based helpers for lobaro tools. + +This package does not have any dependencies and should easily integrate into +other packages. + +## Installation + +This package should be available in `pypi` and can be installed with `pip` or +as a dependency. + +## Contributing + +This package is really only meant for Lobaro, however, other may find it useful +and can contribute to it. +Before doing so read +[contributing guide](https://github.com/astral-sh/uv/blob/main/CONTRIBUTING.md) +to get started. diff --git a/pyproject.toml b/pyproject.toml index 7ec19da..e6f4771 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ description = "Simple python based helpers for lobaro tools." readme = "README.md" license = { file = "LICENSE" } authors = [ - { name = "", email = "weiss.kevin604@gmail.com" }, + { name = "Kevin Weiss", email = "weiss.kevin604@gmail.com" }, ] requires-python = ">=3.10" classifiers = [ From 1b1e293c8616648bf16801d5e661e87908909233 Mon Sep 17 00:00:00 2001 From: Kevin Weiss Date: Fri, 2 May 2025 10:31:52 +0200 Subject: [PATCH 2/2] feat(ci): Initial test for uploading to pypi --- .github/workflows/ci.yml | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4ecd5b..eab9789 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,29 +93,33 @@ jobs: --spec tox==${{ env.TOX_VERSION }} tox --installpkg '${{ needs.prepare.outputs.wheel-distribution }}' -- -rFEx --durations 10 --color yes - package: - needs: [test, prepare] - strategy: - matrix: - platform: - - ubuntu-24.04 - - windows-2022 - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # deep clone for setuptools-scm - - uses: actions/setup-python@v5 - id: setup-python - with: - python-version: ${{ env.MAX_PYTHON_VERSION }} release: if: startsWith(github.ref, 'refs/tags/') - needs: [package, prepare] + needs: [test, prepare] runs-on: ubuntu-24.04 steps: - name: Release uses: softprops/action-gh-release@v2 with: generate_release_notes: true + + publish-to-pypi: + name: >- + Publish Python distribution to PyPI + needs: + - release + runs-on: ubuntu-24.04 + environment: + name: pypi + url: https://pypi.org/p/lob-hlpr # Replace with your PyPI project name + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1