From 88f7f8bf23e907bfce1ab7c2dd4b688dbdb2fb3a Mon Sep 17 00:00:00 2001 From: jupfi Date: Wed, 17 Apr 2024 21:26:18 +0200 Subject: [PATCH] Initial deployment to PyPi. --- .github/workflows/python-publish.yml | 44 ++++++++++++++++++++++++++++ CHANGELOG.md | 3 ++ LICENSE | 2 +- pyproject.toml | 31 ++++++++++++++++++-- 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..94e556b --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,44 @@ +name: Build, Test, and Upload Python Package + +on: + push: + tags: + - "v*.*.*" + + workflow_dispatch: + +permissions: + contents: read + +jobs: + # test: + # uses: ./.github/workflows/ubuntu-python-package.yml # use the callable tests job to run tests + + deploy: + + runs-on: ubuntu-latest + + # needs: [test] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + sudo apt-get update + python -m pip install --upgrade pip + + - name: Publish to PyPI + run: | + python -m venv venv + . ./venv/bin/activate + pip install -U twine build + python -m build . + python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/* + env: + PYPI: ${{ secrets.PYPI }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c690a9..59dc380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +### Version 0.0.2 (17-04-2024) +- Deployment to PyPi via github actions + ### Version 0.0.1 (15-04-2024) - Initial release \ No newline at end of file diff --git a/LICENSE b/LICENSE index 94b1433..03b87d3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Julia Pfitzer +Copyright (c) 2023 jupfi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pyproject.toml b/pyproject.toml index d212316..5d83a57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,12 +4,12 @@ build-backend = "hatchling.build" [project] name = "nqrduck-module" -version = "0.0.1" +version = "0.0.2" authors = [ - { name="YOUR_NAME", email="YOUR@EMAIL.cool" }, + { name="jupfi", email="support@nqrduck.cool" }, ] -description = "A template for nqrduck modules." +description = "A template for nqrduck modules. Also used for testing." readme = "README.md" license = { file="LICENSE" } requires-python = ">=3.8" @@ -28,3 +28,28 @@ dependencies = [ [project.entry-points."nqrduck"] "nqrduck-module" = "nqrduck_module.module:module" + +[tool.ruff] +exclude = [ + "widget.py", +] + +[tool.ruff.lint] +extend-select = [ + "UP", # pyupgrade + "D", # pydocstyle +] + +[tool.ruff.lint.per-file-ignores] +"__init__.py" = ["F401"] + +[tool.ruff.lint.pydocstyle] +convention = "google" + +[project.urls] +"Homepage" = "https://nqrduck.cool" +"Bug Tracker" = "https://github.com/nqrduck/nqrduck-module/issues" +"Source Code" = "https://github.com/nqrduck/nqrduck-module" + +[tool.hatch.build.targets.wheel] +packages = ["src/nqrduck_module"] \ No newline at end of file