Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move building yadg to PEP518 #139

Merged
merged 7 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
shell: bash
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel
pip install -U setuptools build
- name: Build yadg
shell: bash
run: |
python setup.py bdist_wheel
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist-${{ inputs.os }}-${{ inputs.pyver }}
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

7 changes: 3 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
# "sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.autosummary",
"sphinx_autodoc_typehints",
# "sphinx.ext.autosummary",
# "sphinx_autodoc_typehints",
"sphinx_rtd_theme",
"sphinxcontrib.autodoc_pydantic",
"sphinxcontrib.mermaid",
# "sphinxcontrib.mermaid",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -80,7 +80,6 @@
autodoc_member_order = "bysource"
autodoc_pydantic_model_show_field_summary = False
autodoc_pydantic_model_member_order = "bysource"

autodoc_pydantic_model_show_field_summary = False
autodoc_pydantic_model_member_order = "bysource"
intersphinx_mapping = {
Expand Down
62 changes: 62 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[build-system]
requires = ["setuptools >= 61.0", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"

[project]
dynamic = ["version"]
name = "yadg"
authors = [
{name = "Peter Kraus", email = "[email protected]"},
{name = "Nicolas Vetsch"},
]
maintainers = [
{name = "Peter Kraus", email = "[email protected]"},
]
description = "yet another datagram"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
]
requires-python = ">= 3.9"
dependencies = [
"numpy",
"scipy",
"pint >= 0.22",
"pyyaml",
"uncertainties",
"striprtf",
"tzlocal",
"packaging",
"python-dateutil",
"openpyxl >= 3.0.0",
"h5netcdf ~= 1.0",
"xarray-datatree ~= 0.0.12",
"dgbowl-schemas @ git+https://github.com/dgbowl/dgbowl-schemas.git@dataschema_5.1",
"requests",
]

[project.optional-dependencies]
testing = ["pytest"]
docs = [
"sphinx ~= 7.2",
"sphinx-rtd-theme ~= 1.3.0",
"autodoc-pydantic ~= 2.1.0",
]

[project.urls]
Documentation = "https://dgbowl.github.io/yadg/master"
Issues = "https://github.com/dgbowl/yadg/issues"
Repository = "https://github.com/dgbowl/yadg/"

[project.scripts]
yadg = "yadg:run_with_arguments"

[tool.setuptools-git-versioning]
enabled = true
dev_template = "{tag}.dev{ccount}"
dirty_template = "{tag}.dev{ccount}"
8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
[versioneer]
VCS = git
style = pep440-pre
versionfile_source = src/yadg/_version.py
versionfile_build = yadg/_version.py
tag_prefix =
parentdir_prefix = yadg-

[flake8]
max-line-length = 88
extend-ignore = E203
62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/yadg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import sys
from importlib.metadata import version
from .main import run_with_arguments
from . import _version

__all__ = ["run_with_arguments"]
__version__ = _version.get_versions()["version"]
__version__ = version("yadg")

sys.path += sys.modules["yadg"].__path__
Loading
Loading