Skip to content

Commit 1a7d176

Browse files
committed
gh actions, pyproject.toml, v2.4.1
1 parent b3e7680 commit 1a7d176

8 files changed

+123
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release and Publish to PyPI
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.11'
17+
18+
- name: Install dependencies
19+
run: pip install -U build
20+
21+
- name: Build package
22+
run: python -m build
23+
24+
- name: Publish to PyPI
25+
uses: pypa/[email protected]
26+
with:
27+
user: __token__
28+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,7 @@ data/tmp.unv
106106
data/measurement_58b.uff
107107
.idea/
108108
.pypirc
109-
.vscode
109+
.vscode
110+
111+
# other
112+
server_user_id.txt

docs/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx-rtd-theme
2+
sphinx-copybutton

pyproject.toml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "pyuff"
7+
version = "2.4.1"
8+
authors = [{name = "Primož Čermelj, Janko Slavič", email = "[email protected]"}]
9+
maintainers = [{name = "Janko Slavič et al.", email = "[email protected]"}]
10+
license = "MIT"
11+
description = "UFF (Universal File Format) read/write."
12+
readme = "README.rst"
13+
keywords = ['UFF', 'UNV', 'Universal File Format', 'read/write']
14+
requires-python = ">=3.10"
15+
dependencies = [
16+
"numpy",
17+
]
18+
classifiers = [
19+
'Development Status :: 5 - Production/Stable',
20+
'Intended Audience :: Developers',
21+
'Topic :: Scientific/Engineering',
22+
'Programming Language :: Python :: 3.10',
23+
"License :: OSI Approved :: MIT License",
24+
]
25+
26+
[tool.hatch.build.targets.wheel]
27+
include = ["sdypy"]
28+
29+
[project.optional-dependencies]
30+
dev = [
31+
"sphinx",
32+
"twine",
33+
"wheel",
34+
"build",
35+
"pytest",
36+
"sphinx-rtd-theme",
37+
"sphinx-copybutton",
38+
]
39+
40+
[project.urls]
41+
homepage = "https://github.com/ladisk/pyuff"
42+
documentation = "https://pyuff.readthedocs.io/en/latest/"
43+
source = "https://github.com/ladisk/pyuff"

pyuff/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.4"
1+
__version__ = "2.4.1"
22
from .pyuff import *
33
from .datasets import *
44

readthedocs.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: docs/source/conf.py
20+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21+
# builder: "dirhtml"
22+
# Fail on all warnings to avoid broken references
23+
# fail_on_warning: true
24+
25+
# Optionally build your docs in additional formats such as PDF and ePub
26+
# formats:
27+
# - pdf
28+
# - epub
29+
30+
# Optional but recommended, declare the Python requirements required
31+
# to build your documentation
32+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33+
python:
34+
install:
35+
- requirements: docs/requirements.txt

requirements.dev.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Package requirements for developers
2+
-r requirements.txt
3+
sphinx
4+
twine
5+
wheel
6+
build
7+
pytest
8+
sphinx-rtd-theme
9+
sphinx-copybutton

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
numpy
2-
pytest
1+
numpy

0 commit comments

Comments
 (0)