mirror of
https://github.com/nqrduck/nqr-blochsimulator.git
synced 2025-01-04 22:38:13 +00:00
Automatic PyPi deployment.
This commit is contained in:
parent
f62e696046
commit
b886add5db
5 changed files with 84 additions and 5 deletions
44
.github/workflows/python-publish.yml
vendored
Normal file
44
.github/workflows/python-publish.yml
vendored
Normal file
|
@ -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 }}
|
4
CHANGELOG.md
Normal file
4
CHANGELOG.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Changelog
|
||||
|
||||
### Version 0.0.2 (23-04-2024)
|
||||
- Initial release of the Bloch Simulator
|
2
LICENSE
2
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
|
||||
|
|
|
@ -19,6 +19,12 @@ To install the package, run the following command in the root directory of the p
|
|||
pip install .
|
||||
```
|
||||
|
||||
Alternatively you can install the package via PyPI:
|
||||
|
||||
```
|
||||
pip install nqr-blochsimulator
|
||||
```
|
||||
|
||||
The package can then be tested by running
|
||||
|
||||
```
|
||||
|
|
|
@ -7,15 +7,15 @@ allow-direct-references = true
|
|||
|
||||
[project]
|
||||
name = "nqr_blochsimulator"
|
||||
version = "0.0.1a"
|
||||
version = "0.0.2"
|
||||
authors = [
|
||||
{ name="Julia Pfitzer", email="git@jupfi.me" },
|
||||
{ name="jupfi", email="support@nqrduck.cool" },
|
||||
]
|
||||
|
||||
description = "Simple Python script to simulate NQR Bloch equations"
|
||||
readme = "README.md"
|
||||
license = { file="LICENSE" }
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
|
@ -28,4 +28,29 @@ dependencies = [
|
|||
"numpy",
|
||||
"scipy",
|
||||
"numpy",
|
||||
]
|
||||
]
|
||||
|
||||
[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/nqr-blochsimulator/issues"
|
||||
"Source Code" = "https://github.com/nqrduck/nqrduck-blochsimulator"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/nqr_blochsimulator"]
|
Loading…
Reference in a new issue