From df4c6a2b6677016a2dc786f5402df0260e8e97a4 Mon Sep 17 00:00:00 2001 From: jupfi Date: Wed, 17 Apr 2024 21:02:49 +0200 Subject: [PATCH] Commit for automatic PyPi deployment. --- .github/workflows/python-publish.yml | 44 ++++++++++++++++++++++++++++ CHANGELOG.md | 2 ++ README.md | 6 +++- pyproject.toml | 33 ++++++++++++++++++--- 4 files changed, 80 insertions(+), 5 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 4da9e30..ae0cee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Changelog +### Version 0.0.13 (17-04-2024) +- Automatic deployment to PyPi using GitHub Actions ### Version 0.0.12 (15-04-2024) - Initial release \ No newline at end of file diff --git a/README.md b/README.md index ffe5784..68f7893 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ You can install this module and the dependencies by running the following comman ```bash pip install . ``` +Alternatively, you can install the module and the dependencies by running the following command in the terminal while the virtual environment is activated: +```bash +pip install nqrduck-broadband +``` ## Usage The module is used with the [ATM-system](https://github.com/nqrduck/ATM) in combination with the [nqrduck-autotm](https://github.com/nqrduck/nqrduck-autotm) module. @@ -35,7 +39,7 @@ If you are using a low Q broadband probe coil you don't have to generate a Looku The pulse sequence and spectrometer settings can be adjusted using the 'Spectrometer' tab. -drawing +drawing - a.) The measurements settings with the frequency range and the number of steps. These settings are locked when generating a Lookup Table. - b.) The information about the active Lookup Table. diff --git a/pyproject.toml b/pyproject.toml index 4432aea..7e60c24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,12 +4,12 @@ build-backend = "hatchling.build" [project] name = "nqrduck-broadband" -version = "0.0.12" +version = "0.0.13" authors = [ - { name="Julia Pfitzer", email="git@jupfi.me" }, + { name="jupfi", email="support@nqrduck.cool" }, ] -description = "A module for the NQRduck program (a simple python scriptâ„¢) to do broadband NQR measurements." +description = "A module for the NQRduck program (a simple python scriptâ„¢) to do broadband magnetic resonance measurements." readme = "README.md" license = { file="LICENSE" } requires-python = ">=3.8" @@ -23,8 +23,33 @@ classifiers = [ dependencies = [ "matplotlib", "pyqt6", - "NQRduck", + "nqrduck", ] [project.entry-points."nqrduck"] "nqrduck-broadband" = "nqrduck_broadband.broadband:Broadband" + +[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-broadband/issues" +"Source Code" = "https://github.com/nqrduck/nqrduck-broadband" + +[tool.hatch.build.targets.wheel] +packages = ["src/nqrduck_broadband"] \ No newline at end of file