Skip to content

Commit

Permalink
gh actions, pyproject.toml, v2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
klemengit committed Mar 1, 2024
1 parent b3e7680 commit 1a7d176
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release-and-publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release and Publish to PyPI
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: pip install -U build

- name: Build package
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ data/tmp.unv
data/measurement_58b.uff
.idea/
.pypirc
.vscode
.vscode

# other
server_user_id.txt
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx-rtd-theme
sphinx-copybutton
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "pyuff"
version = "2.4.1"
authors = [{name = "Primož Čermelj, Janko Slavič", email = "janko.slavic@fs.uni-lj.si"}]
maintainers = [{name = "Janko Slavič et al.", email = "janko.slavic@fs.uni-lj.si"}]
license = "MIT"
description = "UFF (Universal File Format) read/write."
readme = "README.rst"
keywords = ['UFF', 'UNV', 'Universal File Format', 'read/write']
requires-python = ">=3.10"
dependencies = [
"numpy",
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Scientific/Engineering',
'Programming Language :: Python :: 3.10',
"License :: OSI Approved :: MIT License",
]

[tool.hatch.build.targets.wheel]
include = ["sdypy"]

[project.optional-dependencies]
dev = [
"sphinx",
"twine",
"wheel",
"build",
"pytest",
"sphinx-rtd-theme",
"sphinx-copybutton",
]

[project.urls]
homepage = "https://github.com/ladisk/pyuff"
documentation = "https://pyuff.readthedocs.io/en/latest/"
source = "https://github.com/ladisk/pyuff"
2 changes: 1 addition & 1 deletion pyuff/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.4"
__version__ = "2.4.1"
from .pyuff import *
from .datasets import *

35 changes: 35 additions & 0 deletions readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
9 changes: 9 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Package requirements for developers
-r requirements.txt
sphinx
twine
wheel
build
pytest
sphinx-rtd-theme
sphinx-copybutton
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
numpy
pytest
numpy

0 comments on commit 1a7d176

Please sign in to comment.