diff --git a/.github/workflows/release-and-publish-to-pypi.yml b/.github/workflows/release-and-publish-to-pypi.yml new file mode 100644 index 0000000..1e2b1c9 --- /dev/null +++ b/.github/workflows/release-and-publish-to-pypi.yml @@ -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 }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 049382b..99dc2bb 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,7 @@ data/tmp.unv data/measurement_58b.uff .idea/ .pypirc -.vscode \ No newline at end of file +.vscode + +# other +server_user_id.txt \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..fa559b2 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx-rtd-theme +sphinx-copybutton \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9d4c4a3 --- /dev/null +++ b/pyproject.toml @@ -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" diff --git a/pyuff/__init__.py b/pyuff/__init__.py index 63bdf7d..3cad839 100644 --- a/pyuff/__init__.py +++ b/pyuff/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.4" +__version__ = "2.4.1" from .pyuff import * from .datasets import * diff --git a/readthedocs.yaml b/readthedocs.yaml new file mode 100644 index 0000000..5216da5 --- /dev/null +++ b/readthedocs.yaml @@ -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 \ No newline at end of file diff --git a/requirements.dev.txt b/requirements.dev.txt new file mode 100644 index 0000000..fb38362 --- /dev/null +++ b/requirements.dev.txt @@ -0,0 +1,9 @@ +# Package requirements for developers +-r requirements.txt +sphinx +twine +wheel +build +pytest +sphinx-rtd-theme +sphinx-copybutton \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1cc18fc..296d654 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -numpy -pytest +numpy \ No newline at end of file