Skip to content

Commit

Permalink
Merge pull request #2 from qt3uw/update-python-packaging-for-publishing
Browse files Browse the repository at this point in the history
Update python packaging for publishing
  • Loading branch information
gadamc authored Feb 7, 2023
2 parents 8aec47b + 892d242 commit 0da56e8
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 47 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
src/qt3rfsynthcontrol.egg-info/*
build/*
dist/*
.idea*
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Helper code to control [Windfreak's SynthHD RF generator](https://windfreaktech.
## Installation

```
git clone https://github.com/gadamc/qt3RFSynthControl
cd qt3rfsynthcontrol
python -m pip install .
pip install qt3rfsynthcontrol
```

## Usage
Expand Down
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "qt3rfsynthcontrol"
version = "1.0.1.dev1"

description = "A package for controlling the Windfreak SynthHD RF generator."
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE"}
keywords = ["qt3", "microwave", "electron spin control", "windfreak",
"synthHD", "rf generator", "rf synthesizer", "rf control", "rf"]

authors = [
{name = "G. Adam Cox", email = "gadamc@gmail.com" },
]

maintainers = [
{name = "G. Adam Cox", email = "gadamc@gmail.com" },
{name = "Maxwell Parsons", email = "mfpars@uw.edu " },
]

classifiers = [
"Development Status :: 5 - Production/Stable",

# Indicate who your project is intended for
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering",

# Pick your license as you wish
"License :: OSI Approved :: BSD License",

# Specify the Python versions you support here. In particular, ensure
# that you indicate you support Python 3. These classifiers are *not*
# checked by "pip install". See instead "python_requires" below.
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
]

dependencies = [
"windfreak==0.3.0",
]

[project.urls]
"Homepage" = "https://github.com/qt3uw/qt3rfsynthcontrol"
"Source" = "https://github.com/qt3uw/qt3rfsynthcontrol"
"Bug Tracker" = "https://github.com/qt3uw/qt3rfsynthcontrol/issues"
"Changelog" = "https://github.com/qt3uw/qt3rfsynthcontrol/releases"
42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion src/qt3rfsynthcontrol/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from .__version__ import __version__
from .device import QT3SynthHD, discover_devices
from importlib.metadata import version
__version__ = version(__package__)
1 change: 0 additions & 1 deletion src/qt3rfsynthcontrol/__version__.py

This file was deleted.

0 comments on commit 0da56e8

Please sign in to comment.