File tree Expand file tree Collapse file tree 4 files changed +80
-0
lines changed
Expand file tree Collapse file tree 4 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 1+ [tool .bumpversion ]
2+ current_version = " 0.1.0"
3+ parse = " (?P<major>\\ d+)\\ .(?P<minor>\\ d+)\\ .(?P<patch>\\ d+)"
4+ serialize = [" {major}.{minor}.{patch}" ]
5+ search = " {current_version}"
6+ replace = " {new_version}"
7+ regex = false
8+ ignore_missing_version = false
9+ ignore_missing_files = false
10+ tag = false
11+ sign_tags = false
12+ tag_name = " v{new_version}"
13+ tag_message = " Bump version: {current_version} → {new_version}"
14+ allow_dirty = false
15+ commit = false
16+ message = " Bump version: {current_version} → {new_version}"
17+ commit_args = " "
18+ setup_hooks = []
19+ pre_commit_hooks = []
20+ post_commit_hooks = []
Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ jobs :
4+ publish :
5+ runs-on : ubuntu-latest
6+
7+ steps :
8+ - name : Checkout repository
9+ uses : actions/checkout@v4
10+
11+ - name : Set up Python
12+ uses : actions/setup-python@v4
13+ with :
14+ python-version : ' 3.x' # Use latest Python 3
15+
16+ - name : Install dependencies
17+ run : |
18+ python -m pip install --upgrade pip
19+ pip install build twine
20+
21+ - name : Build package
22+ run : python -m build # Creates dist/* files
23+
24+ - name : Publish package to PyPI
25+ env :
26+ TWINE_USERNAME : __token__
27+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
28+ run : twine upload dist/*
Original file line number Diff line number Diff line change 11[tool .black ]
22line-length = 80
3+
4+ [build-system ]
5+ requires = [" setuptools" , " wheel" ]
6+ build-backend = " setuptools.build_meta"
7+
8+ [project ]
9+ name = " calorimetry_tools"
10+ version = " 0.1.0"
11+ description = " Calorimetry tools"
12+ authors = [ { name = " Stephan Grein" , email = " stephan.grein@uni-bonn.de" }]
13+ license = { text = " MIT" }
14+ readme = " README.md"
15+ requires-python = " >3.10"
16+ dynamic = [" dependencies" ]
Original file line number Diff line number Diff line change 1+ from setuptools import setup
2+
3+
4+ def load_requirements (filename ):
5+ """Load dependencies from requirements.txt"""
6+ with open (filename , "r" , encoding = "utf-8" ) as f :
7+ return [
8+ line .strip ()
9+ for line in f
10+ if line .strip () and not line .startswith ("#" )
11+ ]
12+
13+
14+ setup (
15+ name = "calorimetry_tools" ,
16+ version = "0.1.0" ,
17+ install_requires = load_requirements ("requirements.txt" ),
18+ )
You can’t perform that action at this time.
0 commit comments