From 545b8a48e01a068631b23c8880fca4802d277d11 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Sun, 30 Mar 2025 16:49:44 +0200 Subject: [PATCH 01/22] [#187] Removed requirements.txt --- pyproject.toml | 8 ++++---- requirements.txt | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 778b1c3..47d8d05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,10 +32,10 @@ classifiers = [ "Programming Language :: Python :: 3.11", ] dependencies = [ - "numpy", - "scipy", - "matplotlib", - "astropy", + "numpy", + "scipy", + "matplotlib", + "astropy", ] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8a53d5a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -####### Requirements without Version Specifiers ####### -numpy -scipy -matplotlib -astropy From 10d624c5efe71d960adb54acdc9d0a5308a219a8 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Sun, 30 Mar 2025 20:01:48 +0200 Subject: [PATCH 02/22] [#187] Progressing, not there yet --- CLASSIFIERS.txt | 10 +++ DEPENDENCIES.txt | 4 + datastock/__init__.py | 23 +++++- datastock/version.py | 2 +- pyproject.toml | 68 ++++++++-------- setup.cfg | 5 -- setup.py | 178 ------------------------------------------ 7 files changed, 70 insertions(+), 220 deletions(-) create mode 100644 CLASSIFIERS.txt create mode 100644 DEPENDENCIES.txt delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/CLASSIFIERS.txt b/CLASSIFIERS.txt new file mode 100644 index 0000000..a760c5b --- /dev/null +++ b/CLASSIFIERS.txt @@ -0,0 +1,10 @@ +"Development Status :: 5 - Production/Stable" +"Intended Audience :: Science/Research" +"Programming Language :: Python :: 3" +"Programming Language :: Python :: 3.6" +"Programming Language :: Python :: 3.7" +"Programming Language :: Python :: 3.8" +"Programming Language :: Python :: 3.9" +"Programming Language :: Python :: 3.10" +"Programming Language :: Python :: 3.11" +"Natural Language :: English" diff --git a/DEPENDENCIES.txt b/DEPENDENCIES.txt new file mode 100644 index 0000000..204db1a --- /dev/null +++ b/DEPENDENCIES.txt @@ -0,0 +1,4 @@ +numpy +scipy +matplotlib +astropy diff --git a/datastock/__init__.py b/datastock/__init__.py index f3a72d8..533bef9 100644 --- a/datastock/__init__.py +++ b/datastock/__init__.py @@ -1,10 +1,29 @@ -from .version import __version__ +# ############### +# sub-packages +# ############### + from . import _generic_check from ._generic_utils_plot import * from ._class import DataStock from ._saveload import load, get_files from ._direct_calls import * -from . import tests \ No newline at end of file +from . import tests + + +# ############### +# __version__ +# ############### + + +from importlib.metadata import version, PackageNotFoundError +try: + __version__ = version("package-name") +except PackageNotFoundError: + # package is not installed + pass +# +# cleanup +del version, PackageNotFoundError diff --git a/datastock/version.py b/datastock/version.py index 789edb9..2710ad7 100644 --- a/datastock/version.py +++ b/datastock/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '0.0.49' +__version__ = '0.0.49-1-g545b8a4' diff --git a/pyproject.toml b/pyproject.toml index 47d8d05..ff30c03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,36 +1,37 @@ +[build-system] +requires = ["setuptools>=64", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + + +[tool.setuptools] +packages = ["datastock"] + + +[tool.setuptools_scm] +# enables use of setuptools_scm + +[tool.setuptools.dynamic] +version = {attr = "datastock.__version__"} # any module attribute compatible with ast.literal_eval +readme = {file = ["README.md"]} +classifiers = {file = ["CLASSIFIERS.txt"]} +# dependencies = {file = ["DEPENDENCIES.txt"]} + + [project] name = "datastock" license = {file = "LICENSE"} -dynamic = ["version"] +dynamic = ["version", "readme", "classifiers"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" -readme = "README.md" -requires-python = ">=3.6" authors = [ - {name = "Didier VEZINET", email = "didier.vezinet@gmail.com"}, + {name = "Didier VEZINET", email = "didier.vezinet@gmail.com"}, ] maintainers = [ - {name = "Didier VEZINET", email = "didier.vezinet@gmail.com"}, + {name = "Didier VEZINET", email = "didier.vezinet@gmail.com"}, ] -keywords = ["data", "analysis", "interactive", "heterogeneous arrays", "numpy", "Collection"] -classifiers = [ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - "Development Status :: 5 - Production/Stable", - - # Indicate who your project is intended for - "Intended Audience :: Science/Research", - - # Specify the Python versions you support here. - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", +keywords = [ + "data", "analysis", "interactive", "heterogeneous arrays", "numpy", "Collection", ] +requires-python = ">=3.6" dependencies = [ "numpy", "scipy", @@ -39,19 +40,21 @@ dependencies = [ ] -[build-system] -requires = [ - "setuptools>=40.8.0, <64", - "wheel", - "Cython>=0.26", - "numpy", -] +[project.urls] +Homepage = "https://github.com/ToFuProject/datastock" +Issues = "https://github.com/ToFuProject/datastock/issues" + + +[project.entry-points."datastock"] +datastock = "scripts.main:main" + [dependency-groups] dev = [ "pytest", ] + [project.optional-dependencies] linting = [ 'ruff' @@ -59,6 +62,3 @@ linting = [ formatting = [ 'ruff' ] - -[project.entry-points."datastock"] -datastock = "scripts.main:main" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index da42cd6..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -# For details, see -# https://docs.python.org/2/distutils/configfile.html -# https://packaging.python.org/distributing/#manifest-in -[metadata] -description-file = README.md diff --git a/setup.py b/setup.py deleted file mode 100644 index 9efa067..0000000 --- a/setup.py +++ /dev/null @@ -1,178 +0,0 @@ -""" A tomography library for fusion devices - -See: -https://github.com/ToFuProject/datastock -""" - -# Built-in -import os -from codecs import open -# ... setup tools -from setuptools import setup, find_packages - - -# ... local script -import _updateversion as up - - -# == Getting version =========================================== -_HERE = os.path.abspath(os.path.dirname(__file__)) - -version = up.updateversion() - -print("") -print("Version for setup.py : ", version) -print("") - - -# ============================================================== -# Get the long description from the README file -# Get the readme file whatever its extension (md vs rst) - -_README = [ - ff - for ff in os.listdir(_HERE) - if len(ff) <= 10 and ff[:7] == "README." -] -assert len(_README) == 1 -_README = _README[0] -with open(os.path.join(_HERE, _README), encoding="utf-8") as f: - long_description = f.read() -if _README.endswith(".md"): - long_description_content_type = "text/markdown" -else: - long_description_content_type = "text/x-rst" - - -# ============================================================= - - -# ============================================================== -# Compiling files - -setup( - name="datastock", - version=f"{version}", - # Use scm to get code version from git tags - # cf. https://pypi.python.org/pypi/setuptools_scm - # Versions should comply with PEP440. For a discussion on single-sourcing - # the version across setup.py and the project code, see - # https://packaging.python.org/en/latest/single_source_version.html - # The version is stored only in the setup.py file and read from it (option - # 1 in https://packaging.python.org/en/latest/single_source_version.html) - use_scm_version=False, - - # Description of what library does - description="A python library for generic class and data handling", - long_description=long_description, - long_description_content_type=long_description_content_type, - - # The project's main homepage. - url="https://github.com/ToFuProject/datastock", - # Author details - author="Didier VEZINET", - author_email="didier.vezinet@gmail.com", - - # Choose your license - license="MIT", - - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - "Development Status :: 4 - Beta", - # Indicate who your project is intended for - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering :: Physics", - # Pick your license as you wish (should match "license" above) - "License :: OSI Approved :: MIT License", - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - # In which language most of the code is written ? - "Natural Language :: English", - ], - - # What does your project relate to? - keywords="data analysis class container generic interactive plot", - - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - packages=find_packages( - exclude=[ - "doc", - ] - ), - - # Alternatively, if you want to distribute just a my_module.py, uncomment - # this: - # py_modules=["my_module"], - # List run-time dependencies here. These will be installed by pip when - # your project is installed. For an analysis of "install_requires" vs pip's - # requirements files see: - # https://packaging.python.org/en/latest/requirements.html - install_requires=[ - "numpy", - "scipy", - "matplotlib", - "astropy", - ], - python_requires=">=3.6", - - # List additional groups of dependencies here (e.g. development - # dependencies). You can install these using the following syntax, - # for example: - # $ pip install -e .[dev,test] - extras_require={ - "dev": [ - "check-manifest", - "coverage", - "pytest", - "sphinx", - "sphinx-gallery", - "sphinx_bootstrap_theme", - ] - }, - - # If there are data files included in your packages that need to be - # installed, specify them here. If using Python 2.6 or less, then these - # have to be included in MANIFEST.in as well. - # package_data={ - # # If any package contains *.txt, *.rst or *.npz files, include them: - # '': ['*.txt', '*.rst', '*.npz'], - # # And include any *.csv files found in the 'ITER' package, too: - # 'ITER': ['*.csv'], - # }, - # package_data={}, - # include_package_data=True, - - # Although 'package_data' is the preferred approach, in some case you may - # need to place data files outside of your packages. See: - # http://docs.python.org/3.4/distutils/setupscript.html - # installing-additional-files # noqa - # In this case, 'data_file' will be installed into '/my_data' - # data_files=[('my_data', ['data/data_file'])], - - # executable scripts can be declared here - # They can be python or non-python scripts - # scripts=[ - # ], - - # entry_points point to functions in the package - # Theye are generally preferable over scripts because they provide - # cross-platform support and allow pip to create the appropriate form - # of executable for the target platform. - entry_points={ - 'console_scripts': [ - 'datastock=scripts.main:main', - ], - }, - - # include_dirs=[np.get_include()], - - py_modules=['_updateversion'], -) From 152c164feca978e6ece31c6ae5d9b73fed6e6a1b Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 04:03:47 +0200 Subject: [PATCH 03/22] [#187] __version__ hard-coded in __init__.py --- datastock/__init__.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/datastock/__init__.py b/datastock/__init__.py index 533bef9..3c6a646 100644 --- a/datastock/__init__.py +++ b/datastock/__init__.py @@ -1,3 +1,16 @@ +# ############### +# __version__ +# ############### + + +__version__ = "0.0.50" +# from setuptools_scm import get_version +# __version__ = get_version(root='..', relative_to=__file__) + +# from importlib.metadata import version +# __version__ = version(__package__) +# cleanup +# del get_version # ############### @@ -11,19 +24,3 @@ from ._saveload import load, get_files from ._direct_calls import * from . import tests - - -# ############### -# __version__ -# ############### - - -from importlib.metadata import version, PackageNotFoundError -try: - __version__ = version("package-name") -except PackageNotFoundError: - # package is not installed - pass -# -# cleanup -del version, PackageNotFoundError From 33512cdd0c4435ce30c88bb544bc5da84eacaa69 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 05:43:46 +0200 Subject: [PATCH 04/22] [#187] uv build working locally --- .gitignore | 3 +++ datastock/__init__.py | 7 ++++++- pyproject.toml | 24 ++++++++++-------------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 5f28050..bcb2373 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ __pycache__/ # C extensions *.so +# single sourcing verion file +datastock/_version.py + # Distribution / packaging .Python build/ diff --git a/datastock/__init__.py b/datastock/__init__.py index 3c6a646..2fb723d 100644 --- a/datastock/__init__.py +++ b/datastock/__init__.py @@ -3,10 +3,15 @@ # ############### -__version__ = "0.0.50" +from . import _version +__version__ = _version.version +__version_tuple__ = _version.version_tuple + + # from setuptools_scm import get_version # __version__ = get_version(root='..', relative_to=__file__) + # from importlib.metadata import version # __version__ = version(__package__) # cleanup diff --git a/pyproject.toml b/pyproject.toml index ff30c03..36e4276 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,27 @@ [build-system] -requires = ["setuptools>=64", "setuptools_scm>=8"] +requires = ["setuptools", "setuptools_scm"] build-backend = "setuptools.build_meta" -[tool.setuptools] -packages = ["datastock"] +[tool.setuptools.packages.find] +where = ["datastock"] +include = ["datastock*"] +namespaces = false [tool.setuptools_scm] -# enables use of setuptools_scm +version_file = "datastock/_version.py" + [tool.setuptools.dynamic] -version = {attr = "datastock.__version__"} # any module attribute compatible with ast.literal_eval readme = {file = ["README.md"]} classifiers = {file = ["CLASSIFIERS.txt"]} -# dependencies = {file = ["DEPENDENCIES.txt"]} +dependencies = {file = ["DEPENDENCIES.txt"]} [project] name = "datastock" -license = {file = "LICENSE"} +license = 'MIT' dynamic = ["version", "readme", "classifiers"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" authors = [ @@ -31,13 +33,7 @@ maintainers = [ keywords = [ "data", "analysis", "interactive", "heterogeneous arrays", "numpy", "Collection", ] -requires-python = ">=3.6" -dependencies = [ - "numpy", - "scipy", - "matplotlib", - "astropy", -] +requires-python = ">=3.8" [project.urls] From 53188b02b5f7690ef519e0de1b9043ae6af563c7 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 05:56:03 +0200 Subject: [PATCH 05/22] [#187] Github Action now uses uv too --- .github/workflows/python-testing-matrix.yml | 46 ++++++++++++--------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python-testing-matrix.yml b/.github/workflows/python-testing-matrix.yml index 354c24b..255c531 100644 --- a/.github/workflows/python-testing-matrix.yml +++ b/.github/workflows/python-testing-matrix.yml @@ -21,25 +21,31 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + + # git checkout + - uses: actions/checkout@v4 + + # Install uv + - name: Install uv + uses: astral-sh/setup-uv@v5 + + # setup python - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 + with: + python-version-file: ${{ matrix.python-version }} + + # Allow caching to speed up action + - name: Enable caching + uses: astral-sh/setup-uv@v5 with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - pip install -r requirements.txt - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: install datastock - run: | - pip install -e ".[dev]" # --no-build-isolation - - name: Test with pytest - run: | - pytest datastock/tests -v -x \ No newline at end of file + enable-cache: true + + # Install library + - name: Install the project + run: uv sync --all-extras --dev + + # Run tests + - name: Run tests + # For example, using `pytest` + run: uv run pytest tests From 5427d19cc6e282d967a9f62a44c89a17de5dd30f Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 05:58:55 +0200 Subject: [PATCH 06/22] [#187] Github Action now uses uv 2 --- .github/workflows/python-testing-matrix.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/python-testing-matrix.yml b/.github/workflows/python-testing-matrix.yml index 255c531..83177ca 100644 --- a/.github/workflows/python-testing-matrix.yml +++ b/.github/workflows/python-testing-matrix.yml @@ -35,12 +35,6 @@ jobs: with: python-version-file: ${{ matrix.python-version }} - # Allow caching to speed up action - - name: Enable caching - uses: astral-sh/setup-uv@v5 - with: - enable-cache: true - # Install library - name: Install the project run: uv sync --all-extras --dev From 6002901de7cc7b550b1aa4aee3945cf63b5c4f19 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:00:32 +0200 Subject: [PATCH 07/22] [#187] Github Action now uses uv 3 --- .github/workflows/python-testing-matrix.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-testing-matrix.yml b/.github/workflows/python-testing-matrix.yml index 83177ca..d947b0f 100644 --- a/.github/workflows/python-testing-matrix.yml +++ b/.github/workflows/python-testing-matrix.yml @@ -27,17 +27,17 @@ jobs: # Install uv - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v5 # setup python - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version-file: ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version-file: ${{ matrix.python-version }} # Install library - name: Install the project - run: uv sync --all-extras --dev + run: uv sync --all-extras --dev # Run tests - name: Run tests From 83f4c573408ade150bc0f796e2a08e1b9bd5b197 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:04:32 +0200 Subject: [PATCH 08/22] [#187] Github Action now uses uv 4 --- .github/workflows/python-testing-matrix.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/python-testing-matrix.yml b/.github/workflows/python-testing-matrix.yml index d947b0f..783ba96 100644 --- a/.github/workflows/python-testing-matrix.yml +++ b/.github/workflows/python-testing-matrix.yml @@ -28,12 +28,8 @@ jobs: # Install uv - name: Install uv uses: astral-sh/setup-uv@v5 - - # setup python - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 with: - python-version-file: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} # Install library - name: Install the project From 10a9db5d4f7186163f7cb769e4ea5b02c671071b Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:09:04 +0200 Subject: [PATCH 09/22] [#187] Github Action now uses uv 5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36e4276..dbb76f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = {file = ["DEPENDENCIES.txt"]} [project] name = "datastock" -license = 'MIT' +license = "MIT" dynamic = ["version", "readme", "classifiers"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" authors = [ From 8c3cea3221d49e6f80c892330d5b52d61e161d9f Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:11:28 +0200 Subject: [PATCH 10/22] [#187] Github Action now uses uv 6 --- .github/workflows/python-testing-matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-testing-matrix.yml b/.github/workflows/python-testing-matrix.yml index 783ba96..34b46cc 100644 --- a/.github/workflows/python-testing-matrix.yml +++ b/.github/workflows/python-testing-matrix.yml @@ -38,4 +38,4 @@ jobs: # Run tests - name: Run tests # For example, using `pytest` - run: uv run pytest tests + run: uv run pytest datastock.tests From 461050d3a4f533d094321b7be82e3807481b2174 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:13:05 +0200 Subject: [PATCH 11/22] [#187] Github Action now uses uv 7 --- LICENSE | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 52973b6..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 ToFuProject - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From 3e750e7e404be20f4a284078826b35c4a33cb649 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:18:29 +0200 Subject: [PATCH 12/22] [#187] Github Action now uses uv 8 --- CLASSIFIERS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CLASSIFIERS.txt b/CLASSIFIERS.txt index a760c5b..8ac5eb2 100644 --- a/CLASSIFIERS.txt +++ b/CLASSIFIERS.txt @@ -8,3 +8,4 @@ "Programming Language :: Python :: 3.10" "Programming Language :: Python :: 3.11" "Natural Language :: English" +"License :: OSI Approved :: MIT License" From f8fc6f7b8a3ca3371fafba3eb51df1811fa4a6d4 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:19:23 +0200 Subject: [PATCH 13/22] [#187] Github Action now uses uv 9 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dbb76f6..a325f68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = {file = ["DEPENDENCIES.txt"]} [project] name = "datastock" -license = "MIT" +license = {test = "MIT"} dynamic = ["version", "readme", "classifiers"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" authors = [ From 0741edc68b9c5fa2c8b7f1f1b7c3a185edc6c370 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:20:13 +0200 Subject: [PATCH 14/22] [#187] Github Action now uses uv 10 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a325f68..d50541b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = {file = ["DEPENDENCIES.txt"]} [project] name = "datastock" -license = {test = "MIT"} +license = {text = "MIT"} dynamic = ["version", "readme", "classifiers"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" authors = [ From cd9f283a1dc90f2c99c543e193135eea941e1844 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:21:11 +0200 Subject: [PATCH 15/22] [#187] Github Action now uses uv 11 --- .github/workflows/python-testing-matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-testing-matrix.yml b/.github/workflows/python-testing-matrix.yml index 34b46cc..405803d 100644 --- a/.github/workflows/python-testing-matrix.yml +++ b/.github/workflows/python-testing-matrix.yml @@ -38,4 +38,4 @@ jobs: # Run tests - name: Run tests # For example, using `pytest` - run: uv run pytest datastock.tests + run: uv run pytest datastock/tests From 70be4a5210eef16cc27106baa453f4a584130966 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:24:40 +0200 Subject: [PATCH 16/22] [#187] Github Action now uses uv 12 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d50541b..58cc811 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = {file = ["DEPENDENCIES.txt"]} [project] name = "datastock" license = {text = "MIT"} -dynamic = ["version", "readme", "classifiers"] +dynamic = ["version", "readme", "classifiers", "dependencies"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" authors = [ {name = "Didier VEZINET", email = "didier.vezinet@gmail.com"}, From d89df123b47211fb469d623548d68c71bb932692 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:28:11 +0200 Subject: [PATCH 17/22] [#187] Fine tuning 2 --- DEPENDENCIES.txt | 1 + LICENSE.txt | 21 +++++++++++++++++++++ MANIFEST.in | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 LICENSE.txt diff --git a/DEPENDENCIES.txt b/DEPENDENCIES.txt index 204db1a..4225b56 100644 --- a/DEPENDENCIES.txt +++ b/DEPENDENCIES.txt @@ -1,4 +1,5 @@ numpy scipy matplotlib +PyQt5 astropy diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..dc8b1e1 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 ToFuProject + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in index 81daa54..52b6a18 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,3 +3,5 @@ include MANIFEST.in include LICENSE.txt include pyproject.toml +include DEPENDENCIES.txt +include CLASSIFIERS.txt From 4931434b72feda4cbebdcf59d7064c191b8589a5 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:30:52 +0200 Subject: [PATCH 18/22] [#187] Try with PySide2 --- DEPENDENCIES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES.txt b/DEPENDENCIES.txt index 4225b56..c51379a 100644 --- a/DEPENDENCIES.txt +++ b/DEPENDENCIES.txt @@ -1,5 +1,5 @@ numpy scipy matplotlib -PyQt5 +PySide2 astropy From 3b87748142e06693bcb707148dfc0ac6854dee16 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:35:52 +0200 Subject: [PATCH 19/22] [#187] Platform-conditioned PySide2 vs PyQt5 dependencies --- DEPENDENCIES.txt | 5 ----- MANIFEST.in | 1 - pyproject.toml | 11 +++++++++-- 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 DEPENDENCIES.txt diff --git a/DEPENDENCIES.txt b/DEPENDENCIES.txt deleted file mode 100644 index c51379a..0000000 --- a/DEPENDENCIES.txt +++ /dev/null @@ -1,5 +0,0 @@ -numpy -scipy -matplotlib -PySide2 -astropy diff --git a/MANIFEST.in b/MANIFEST.in index 52b6a18..1d79101 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,5 +3,4 @@ include MANIFEST.in include LICENSE.txt include pyproject.toml -include DEPENDENCIES.txt include CLASSIFIERS.txt diff --git a/pyproject.toml b/pyproject.toml index 58cc811..5a8393f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,13 +16,12 @@ version_file = "datastock/_version.py" [tool.setuptools.dynamic] readme = {file = ["README.md"]} classifiers = {file = ["CLASSIFIERS.txt"]} -dependencies = {file = ["DEPENDENCIES.txt"]} [project] name = "datastock" license = {text = "MIT"} -dynamic = ["version", "readme", "classifiers", "dependencies"] +dynamic = ["version", "readme", "classifiers"] description = "Generic handler for multiple heterogenous numpy arrays and subclasses" authors = [ {name = "Didier VEZINET", email = "didier.vezinet@gmail.com"}, @@ -34,6 +33,14 @@ keywords = [ "data", "analysis", "interactive", "heterogeneous arrays", "numpy", "Collection", ] requires-python = ">=3.8" +dependencies = [ + "numpy", + "scipy", + "matplotlib", + "PyQt5 ; platform_system != 'Windows'", + "PySide2; platform_system == 'Windows'", + "astropy", +] [project.urls] From 4fba586fc596120d080015c3bfce0eb545774a35 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:37:43 +0200 Subject: [PATCH 20/22] [#187] Removed PySide2 for Windows --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a8393f..42e00a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "scipy", "matplotlib", "PyQt5 ; platform_system != 'Windows'", - "PySide2; platform_system == 'Windows'", + # "PySide2; platform_system == 'Windows'", "astropy", ] From af119538d0e6487927c70d97c91b80321b018b00 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:56:16 +0200 Subject: [PATCH 21/22] [#187] github action publish --- ...n-publish.yml => python-publish-sdist.yml} | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) rename .github/workflows/{python-publish.yml => python-publish-sdist.yml} (56%) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish-sdist.yml similarity index 56% rename from .github/workflows/python-publish.yml rename to .github/workflows/python-publish-sdist.yml index adc9be7..1e57aeb 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish-sdist.yml @@ -19,23 +19,20 @@ on: jobs: deploy: - + name: Publish sdist to Pypi runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + python-version: '3.11' + - run: uv build + # Check that basic features work and we didn't miss to include crucial files + - name: Smoke test (wheel) + run: uv run --isolated --no-project -p 3.11 --with dist/*.whl datastock/tests + - name: Smoke test (source distribution) + run: uv run --isolated --no-project -p 3.11 --with dist/*.tar.gz datastock/tests + - run: uv publish --trusted-publishing always with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} From 3cb6c852654b321b98fe4a89f0258151a6d4df94 Mon Sep 17 00:00:00 2001 From: dvezinet Date: Mon, 31 Mar 2025 06:56:35 +0200 Subject: [PATCH 22/22] [#187] github action publish sdist and wheel --- .../workflows/{python-publish-sdist.yml => python-publish.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{python-publish-sdist.yml => python-publish.yml} (100%) diff --git a/.github/workflows/python-publish-sdist.yml b/.github/workflows/python-publish.yml similarity index 100% rename from .github/workflows/python-publish-sdist.yml rename to .github/workflows/python-publish.yml