pydiverse-common 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pydiverse_common-0.1.0/.gitattributes +8 -0
- pydiverse_common-0.1.0/.github/CODEOWNERS +1 -0
- pydiverse_common-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- pydiverse_common-0.1.0/.github/dependabot.yml +10 -0
- pydiverse_common-0.1.0/.github/workflows/release.yml +64 -0
- pydiverse_common-0.1.0/.github/workflows/tests.yml +50 -0
- pydiverse_common-0.1.0/.github/workflows/update-lockfiles.yml +36 -0
- pydiverse_common-0.1.0/.gitignore +128 -0
- pydiverse_common-0.1.0/.pre-commit-config.yaml +63 -0
- pydiverse_common-0.1.0/.readthedocs.yaml +17 -0
- pydiverse_common-0.1.0/LICENSE +29 -0
- pydiverse_common-0.1.0/PKG-INFO +66 -0
- pydiverse_common-0.1.0/README.md +71 -0
- pydiverse_common-0.1.0/docs/Makefile +23 -0
- pydiverse_common-0.1.0/docs/make.bat +35 -0
- pydiverse_common-0.1.0/docs/package/README.md +13 -0
- pydiverse_common-0.1.0/docs/source/changelog.md +14 -0
- pydiverse_common-0.1.0/docs/source/conf.py +201 -0
- pydiverse_common-0.1.0/docs/source/index.md +60 -0
- pydiverse_common-0.1.0/docs/source/license.md +5 -0
- pydiverse_common-0.1.0/docs/source/reference/api.rst +32 -0
- pydiverse_common-0.1.0/pixi.lock +16199 -0
- pydiverse_common-0.1.0/pixi.toml +70 -0
- pydiverse_common-0.1.0/pyproject.toml +52 -0
- pydiverse_common-0.1.0/pytest.ini +3 -0
- pydiverse_common-0.1.0/src/pydiverse/common/__init__.py +53 -0
- pydiverse_common-0.1.0/src/pydiverse/common/dtypes.py +389 -0
- pydiverse_common-0.1.0/tests/dtypes/test_dtype_pandas.py +133 -0
- pydiverse_common-0.1.0/tests/dtypes/test_dtype_polars.py +82 -0
- pydiverse_common-0.1.0/tests/dtypes/test_dtype_pyarrow.py +82 -0
- pydiverse_common-0.1.0/tests/dtypes/test_dtype_sqlalchemy.py +72 -0
@@ -0,0 +1 @@
|
|
1
|
+
* @pydiverse/code-owners
|
@@ -0,0 +1,64 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
tags:
|
8
|
+
- '*.*.*'
|
9
|
+
pull_request:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
name: Build Package
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- name: Checkout branch
|
17
|
+
uses: actions/checkout@v4
|
18
|
+
|
19
|
+
- name: Set up pixi
|
20
|
+
uses: prefix-dev/setup-pixi@v0.8.3
|
21
|
+
with:
|
22
|
+
environments: release
|
23
|
+
|
24
|
+
- name: Ensure tag matches version
|
25
|
+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
26
|
+
run: |
|
27
|
+
version="$(pixi exec -s go-yq -- yq .project.version pyproject.toml)"
|
28
|
+
tag="${{ github.ref_name }}"
|
29
|
+
if [ "$version" != "$tag" ]; then
|
30
|
+
echo "Tag $tag does not match version $version"
|
31
|
+
exit 1
|
32
|
+
fi
|
33
|
+
|
34
|
+
- name: Build
|
35
|
+
run: pixi run -e release hatch build
|
36
|
+
|
37
|
+
- name: Check build
|
38
|
+
run: pixi run -e release twine check dist/*
|
39
|
+
|
40
|
+
- name: List files
|
41
|
+
run: ls -l dist/
|
42
|
+
|
43
|
+
- name: Upload package
|
44
|
+
uses: actions/upload-artifact@v4
|
45
|
+
with:
|
46
|
+
name: artifact
|
47
|
+
path: dist/*
|
48
|
+
|
49
|
+
release:
|
50
|
+
name: Publish Package
|
51
|
+
if: startsWith(github.ref, 'refs/tags/')
|
52
|
+
needs: [build]
|
53
|
+
runs-on: ubuntu-latest
|
54
|
+
permissions:
|
55
|
+
id-token: write
|
56
|
+
contents: write
|
57
|
+
environment: pypi
|
58
|
+
steps:
|
59
|
+
- uses: actions/download-artifact@v4
|
60
|
+
with:
|
61
|
+
name: artifact
|
62
|
+
path: dist
|
63
|
+
- name: Publish package on PyPi
|
64
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
|
@@ -0,0 +1,50 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
paths-ignore:
|
9
|
+
- "docs/**"
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
lint:
|
13
|
+
name: Pre-commit Checks
|
14
|
+
timeout-minutes: 5
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- name: Checkout branch
|
18
|
+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
19
|
+
- name: Set up pixi
|
20
|
+
uses: prefix-dev/setup-pixi@2970de4ad95fecdf1c3173999267d5b28c01853e # v0.8.1
|
21
|
+
- name: Install repository
|
22
|
+
# needed for generate-col-ops hook
|
23
|
+
run: pixi run postinstall
|
24
|
+
- name: pre-commit
|
25
|
+
run: pixi run pre-commit run -a --color=always --show-diff-on-failure
|
26
|
+
|
27
|
+
test:
|
28
|
+
name: pytest
|
29
|
+
runs-on: ${{ matrix.os }}
|
30
|
+
strategy:
|
31
|
+
matrix:
|
32
|
+
os:
|
33
|
+
- ubuntu-latest
|
34
|
+
environment:
|
35
|
+
- py310
|
36
|
+
- py311
|
37
|
+
- py312
|
38
|
+
- py313
|
39
|
+
timeout-minutes: 5
|
40
|
+
steps:
|
41
|
+
- uses: actions/checkout@v4
|
42
|
+
|
43
|
+
- name: Setup Pixi
|
44
|
+
uses: prefix-dev/setup-pixi@v0.8.3
|
45
|
+
with:
|
46
|
+
environments: ${{ matrix.environment }}
|
47
|
+
|
48
|
+
- name: Run tests
|
49
|
+
run: |
|
50
|
+
pixi run -e ${{ matrix.environment }} pytest tests -ra ${RUNNER_DEBUG:+-v} --color=yes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Update lockfiles
|
2
|
+
|
3
|
+
permissions:
|
4
|
+
contents: write
|
5
|
+
pull-requests: write
|
6
|
+
|
7
|
+
on:
|
8
|
+
workflow_dispatch:
|
9
|
+
schedule:
|
10
|
+
- cron: 0 5 1 * *
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
pixi-update:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
- name: Set up pixi
|
18
|
+
uses: prefix-dev/setup-pixi@v0.8.3
|
19
|
+
with:
|
20
|
+
run-install: false
|
21
|
+
- name: Update lockfiles
|
22
|
+
run: |
|
23
|
+
set -euo pipefail
|
24
|
+
pixi update --json | pixi exec pixi-diff-to-markdown >> diff.md
|
25
|
+
- name: Create pull request
|
26
|
+
uses: peter-evans/create-pull-request@v7
|
27
|
+
with:
|
28
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
29
|
+
commit-message: Update pixi lockfile
|
30
|
+
title: Update pixi lockfile
|
31
|
+
body-path: diff.md
|
32
|
+
branch: update-pixi
|
33
|
+
base: main
|
34
|
+
labels: pixi
|
35
|
+
delete-branch: true
|
36
|
+
add-paths: pixi.lock
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
# C extensions
|
7
|
+
*.so
|
8
|
+
|
9
|
+
# Distribution / packaging
|
10
|
+
.Python
|
11
|
+
env/
|
12
|
+
.envrc
|
13
|
+
build/
|
14
|
+
develop-eggs/
|
15
|
+
dist/
|
16
|
+
downloads/
|
17
|
+
eggs/
|
18
|
+
.eggs/
|
19
|
+
lib/
|
20
|
+
lib64/
|
21
|
+
parts/
|
22
|
+
sdist/
|
23
|
+
var/
|
24
|
+
wheels/
|
25
|
+
*.egg-info/
|
26
|
+
.installed.cfg
|
27
|
+
*.egg
|
28
|
+
.asv
|
29
|
+
pip-wheel-metadata
|
30
|
+
|
31
|
+
# PyInstaller
|
32
|
+
# Usually these files are written by a python script from a template
|
33
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
34
|
+
*.manifest
|
35
|
+
*.spec
|
36
|
+
|
37
|
+
# Installer logs
|
38
|
+
pip-log.txt
|
39
|
+
pip-delete-this-directory.txt
|
40
|
+
|
41
|
+
# Unit test / coverage reports
|
42
|
+
htmlcov/
|
43
|
+
.tox/
|
44
|
+
.coverage
|
45
|
+
.coverage.*
|
46
|
+
.cache
|
47
|
+
nosetests.xml
|
48
|
+
coverage.xml
|
49
|
+
*.cover
|
50
|
+
.hypothesis/
|
51
|
+
/.pytest_cache/
|
52
|
+
|
53
|
+
# Translations
|
54
|
+
*.mo
|
55
|
+
*.pot
|
56
|
+
|
57
|
+
# Django stuff:
|
58
|
+
*.log
|
59
|
+
local_settings.py
|
60
|
+
|
61
|
+
# Flask stuff:
|
62
|
+
instance/
|
63
|
+
.webassets-cache
|
64
|
+
|
65
|
+
# Scrapy stuff:
|
66
|
+
.scrapy
|
67
|
+
|
68
|
+
# Sphinx documentation
|
69
|
+
docs/_build/
|
70
|
+
docs/api/
|
71
|
+
|
72
|
+
# PyBuilder
|
73
|
+
target/
|
74
|
+
|
75
|
+
# Jupyter Notebook
|
76
|
+
.ipynb_checkpoints
|
77
|
+
|
78
|
+
# pyenv
|
79
|
+
.python-version
|
80
|
+
|
81
|
+
# celery beat schedule file
|
82
|
+
celerybeat-schedule
|
83
|
+
|
84
|
+
# SageMath parsed files
|
85
|
+
*.sage.py
|
86
|
+
|
87
|
+
# dotenv
|
88
|
+
.env
|
89
|
+
|
90
|
+
# virtualenv
|
91
|
+
.venv
|
92
|
+
venv/
|
93
|
+
ENV/
|
94
|
+
|
95
|
+
# Spyder project settings
|
96
|
+
.spyderproject
|
97
|
+
.spyproject
|
98
|
+
|
99
|
+
# Rope project settings
|
100
|
+
.ropeproject
|
101
|
+
|
102
|
+
# mkdocs documentation
|
103
|
+
/site
|
104
|
+
|
105
|
+
# mypy
|
106
|
+
.mypy_cache/
|
107
|
+
|
108
|
+
# pycharm
|
109
|
+
/.idea/
|
110
|
+
|
111
|
+
|
112
|
+
# experiments
|
113
|
+
private_*
|
114
|
+
|
115
|
+
# mlflow
|
116
|
+
mlruns
|
117
|
+
|
118
|
+
# vscode
|
119
|
+
.vscode
|
120
|
+
|
121
|
+
# direnv
|
122
|
+
.envrc
|
123
|
+
|
124
|
+
# baseline update files
|
125
|
+
*.updated.json
|
126
|
+
|
127
|
+
# pixi
|
128
|
+
.pixi
|
@@ -0,0 +1,63 @@
|
|
1
|
+
exclude: ^.pixi$
|
2
|
+
repos:
|
3
|
+
- repo: local
|
4
|
+
hooks:
|
5
|
+
# ensure pixi environments are up to date
|
6
|
+
# workaround for https://github.com/prefix-dev/pixi/issues/1482
|
7
|
+
- id: pixi-install
|
8
|
+
name: pixi-install
|
9
|
+
entry: pixi install -e default
|
10
|
+
language: system
|
11
|
+
always_run: true
|
12
|
+
require_serial: true
|
13
|
+
pass_filenames: false
|
14
|
+
# ruff
|
15
|
+
- id: ruff
|
16
|
+
name: ruff
|
17
|
+
entry: pixi run ruff check --fix --exit-non-zero-on-fix --force-exclude
|
18
|
+
language: system
|
19
|
+
types_or: [python, pyi]
|
20
|
+
require_serial: true
|
21
|
+
- id: ruff-format
|
22
|
+
name: ruff-format
|
23
|
+
entry: pixi run ruff format --force-exclude
|
24
|
+
language: system
|
25
|
+
types_or: [python, pyi]
|
26
|
+
require_serial: true
|
27
|
+
# mypy
|
28
|
+
# - id: mypy
|
29
|
+
# name: mypy
|
30
|
+
# entry: pixi run mypy
|
31
|
+
# language: system
|
32
|
+
# types: [python]
|
33
|
+
# require_serial: true
|
34
|
+
# taplo
|
35
|
+
- id: taplo
|
36
|
+
name: taplo
|
37
|
+
entry: pixi run taplo format
|
38
|
+
language: system
|
39
|
+
types: [toml]
|
40
|
+
# pre-commit-hooks
|
41
|
+
- id: trailing-whitespace-fixer
|
42
|
+
name: trailing-whitespace-fixer
|
43
|
+
entry: pixi run trailing-whitespace-fixer
|
44
|
+
language: system
|
45
|
+
types: [text]
|
46
|
+
- id: end-of-file-fixer
|
47
|
+
name: end-of-file-fixer
|
48
|
+
entry: pixi run end-of-file-fixer
|
49
|
+
language: system
|
50
|
+
types: [text]
|
51
|
+
- id: check-merge-conflict
|
52
|
+
name: check-merge-conflict
|
53
|
+
entry: pixi run check-merge-conflict --assume-in-merge
|
54
|
+
language: system
|
55
|
+
types: [text]
|
56
|
+
exclude: ".rst$"
|
57
|
+
# typos
|
58
|
+
- id: typos
|
59
|
+
name: typos
|
60
|
+
entry: pixi run typos --force-exclude
|
61
|
+
language: system
|
62
|
+
types: [text]
|
63
|
+
require_serial: true
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Read the Docs configuration file
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
3
|
+
|
4
|
+
version: 2
|
5
|
+
build:
|
6
|
+
os: ubuntu-22.04
|
7
|
+
tools:
|
8
|
+
python: mambaforge-latest
|
9
|
+
commands:
|
10
|
+
- mamba install -c conda-forge -c nodefaults pixi
|
11
|
+
- pixi run -e docs postinstall
|
12
|
+
- pixi run -e docs docs
|
13
|
+
- pixi run -e docs readthedocs
|
14
|
+
sphinx:
|
15
|
+
configuration: docs/source/conf.py
|
16
|
+
formats:
|
17
|
+
- pdf
|
@@ -0,0 +1,29 @@
|
|
1
|
+
BSD 3-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2022, pydiverse
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
10
|
+
list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
17
|
+
contributors may be used to endorse or promote products derived from
|
18
|
+
this software without specific prior written permission.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,66 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: pydiverse-common
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Common functionality shared between pydiverse libraries
|
5
|
+
Author: QuantCo, Inc.
|
6
|
+
Author-email: Martin Trautmann <windiana@users.sf.net>, Finn Rudolph <finn.rudolph@t-online.de>
|
7
|
+
License: BSD 3-Clause License
|
8
|
+
|
9
|
+
Copyright (c) 2022, pydiverse
|
10
|
+
All rights reserved.
|
11
|
+
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
13
|
+
modification, are permitted provided that the following conditions are met:
|
14
|
+
|
15
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
16
|
+
list of conditions and the following disclaimer.
|
17
|
+
|
18
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
19
|
+
this list of conditions and the following disclaimer in the documentation
|
20
|
+
and/or other materials provided with the distribution.
|
21
|
+
|
22
|
+
3. Neither the name of the copyright holder nor the names of its
|
23
|
+
contributors may be used to endorse or promote products derived from
|
24
|
+
this software without specific prior written permission.
|
25
|
+
|
26
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
27
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
28
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
29
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
30
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
31
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
32
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
33
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
34
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
35
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
36
|
+
License-File: LICENSE
|
37
|
+
Classifier: Development Status :: 4 - Beta
|
38
|
+
Classifier: Intended Audience :: Developers
|
39
|
+
Classifier: Intended Audience :: Science/Research
|
40
|
+
Classifier: License :: OSI Approved :: BSD License
|
41
|
+
Classifier: Programming Language :: Python :: 3
|
42
|
+
Classifier: Programming Language :: Python :: 3.9
|
43
|
+
Classifier: Programming Language :: Python :: 3.10
|
44
|
+
Classifier: Programming Language :: Python :: 3.11
|
45
|
+
Classifier: Programming Language :: Python :: 3.12
|
46
|
+
Classifier: Programming Language :: Python :: 3.13
|
47
|
+
Classifier: Programming Language :: SQL
|
48
|
+
Classifier: Topic :: Database
|
49
|
+
Classifier: Topic :: Scientific/Engineering
|
50
|
+
Classifier: Topic :: Software Development
|
51
|
+
Requires-Python: >=3.9
|
52
|
+
Description-Content-Type: text/markdown
|
53
|
+
|
54
|
+
# pydiverse.common
|
55
|
+
|
56
|
+
[](https://github.com/pydiverse/pydiverse.common/actions/workflows/tests.yml)
|
57
|
+
|
58
|
+
A base package for different libraries in the pydiverse library collection.
|
59
|
+
This includes functionality like a type-system for tabular data (SQL and DataFrame).
|
60
|
+
This type-system is used for ensuring reliable operation of the pydiverse library
|
61
|
+
with various execution backends like Pandas, Polars, and various SQL dialects.
|
62
|
+
|
63
|
+
## Usage
|
64
|
+
|
65
|
+
pydiverse.common can either be installed via pypi with `pip install pydiverse-common` or via
|
66
|
+
conda-forge with `conda install pydiverse-common -c conda-forge`.
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# pydiverse.common
|
2
|
+
|
3
|
+
[](https://github.com/pydiverse/pydiverse.common/actions/workflows/tests.yml)
|
4
|
+
[](https://pydiversecommon.readthedocs.io/en/latest)
|
5
|
+
[](https://pypi.org/project/pydiverse-common)
|
6
|
+
[](https://prefix.dev/channels/conda-forge/packages/pydiverse-common)
|
7
|
+
|
8
|
+
A base package for different libraries in the pydiverse library collection.
|
9
|
+
This includes functionality like a type-system for tabular data (SQL and DataFrame).
|
10
|
+
This type-system is used for ensuring reliable operation of the pydiverse library
|
11
|
+
with various execution backends like Pandas, Polars, and various SQL dialects.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
To install pydiverse common try this:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
git clone https://github.com/pydiverse/pydiverse.common.git
|
19
|
+
cd pydiverse.common
|
20
|
+
|
21
|
+
# Create the environment, activate it and install the pre-commit hooks
|
22
|
+
pixi install
|
23
|
+
pixi run pre-commit install
|
24
|
+
```
|
25
|
+
|
26
|
+
## Testing
|
27
|
+
|
28
|
+
Tests can be run with:
|
29
|
+
|
30
|
+
```bash
|
31
|
+
pixi run pytest
|
32
|
+
```
|
33
|
+
|
34
|
+
## Packaging and publishing to pypi and conda-forge using github actions
|
35
|
+
|
36
|
+
- bump version number in [pyproject.toml](pyproject.toml)
|
37
|
+
- set correct release date in [changelog.md](docs/source/changelog.md)
|
38
|
+
- push increased version number to `main` branch
|
39
|
+
- tag commit with `git tag <version>`, e.g. `git tag 0.7.0`
|
40
|
+
- `git push --tags`
|
41
|
+
|
42
|
+
The package should appear on https://pypi.org/project/pydiverse-common/ in a timely manner. It is normal that it takes
|
43
|
+
a few hours until the new package version is available on https://conda-forge.org/packages/.
|
44
|
+
|
45
|
+
### Packaging and publishing to Pypi manually
|
46
|
+
|
47
|
+
Packages are first released on test.pypi.org:
|
48
|
+
|
49
|
+
- bump version number in [pyproject.toml](pyproject.toml) (check consistency with [changelog.md](docs/source/changelog.md))
|
50
|
+
- push increased version number to `main` branch
|
51
|
+
- `pixi run -e release hatch build`
|
52
|
+
- `pixi run -e release twine upload --repository testpypi dist/*`
|
53
|
+
- verify with https://test.pypi.org/search/?q=pydiverse.common
|
54
|
+
|
55
|
+
Finally, they are published via:
|
56
|
+
|
57
|
+
- `git tag <version>`
|
58
|
+
- `git push --tags`
|
59
|
+
- Attention: Please, only continue here, if automatic publishing fails for some reason!
|
60
|
+
- `pixi run -e release hatch build`
|
61
|
+
- `pixi run -e release twine upload --repository pypi dist/*`
|
62
|
+
|
63
|
+
### Publishing package on conda-forge manually
|
64
|
+
|
65
|
+
Conda-forge packages are updated via:
|
66
|
+
|
67
|
+
- Attention: Please, only continue here, if automatic conda-forge publishing fails for longer than 24h!
|
68
|
+
- https://github.com/conda-forge/pydiverse-common-feedstock#updating-pydiverse-common-feedstock
|
69
|
+
- update `recipe/meta.yaml`
|
70
|
+
- test meta.yaml in pydiverse common repo: `conda-build build ../pydiverse-common-feedstock/recipe/meta.yaml`
|
71
|
+
- commit `recipe/meta.yaml` to branch of fork and submit PR
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
2
|
+
#
|
3
|
+
|
4
|
+
# You can set these variables from the command line, and also
|
5
|
+
# from the environment for the first two.
|
6
|
+
SPHINXOPTS ?=
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
8
|
+
SOURCEDIR = source
|
9
|
+
BUILDDIR = build
|
10
|
+
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
12
|
+
help:
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
14
|
+
|
15
|
+
.PHONY: help Makefile
|
16
|
+
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
19
|
+
%: Makefile
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
21
|
+
|
22
|
+
livehtml:
|
23
|
+
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --watch ../src $(O)
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@ECHO OFF
|
2
|
+
|
3
|
+
pushd %~dp0
|
4
|
+
|
5
|
+
REM Command file for Sphinx documentation
|
6
|
+
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
8
|
+
set SPHINXBUILD=sphinx-build
|
9
|
+
)
|
10
|
+
set SOURCEDIR=source
|
11
|
+
set BUILDDIR=build
|
12
|
+
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
14
|
+
if errorlevel 9009 (
|
15
|
+
echo.
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
20
|
+
echo.
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
22
|
+
echo.https://www.sphinx-doc.org/
|
23
|
+
exit /b 1
|
24
|
+
)
|
25
|
+
|
26
|
+
if "%1" == "" goto help
|
27
|
+
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
29
|
+
goto end
|
30
|
+
|
31
|
+
:help
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
33
|
+
|
34
|
+
:end
|
35
|
+
popd
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# pydiverse.common
|
2
|
+
|
3
|
+
[](https://github.com/pydiverse/pydiverse.common/actions/workflows/tests.yml)
|
4
|
+
|
5
|
+
A base package for different libraries in the pydiverse library collection.
|
6
|
+
This includes functionality like a type-system for tabular data (SQL and DataFrame).
|
7
|
+
This type-system is used for ensuring reliable operation of the pydiverse library
|
8
|
+
with various execution backends like Pandas, Polars, and various SQL dialects.
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
pydiverse.common can either be installed via pypi with `pip install pydiverse-common` or via
|
13
|
+
conda-forge with `conda install pydiverse-common -c conda-forge`.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.10.0 (2025-04-dd)
|
4
|
+
|
5
|
+
## 0.1.0 (2022-09-01)
|
6
|
+
Initial release.
|
7
|
+
|
8
|
+
- `@materialize` annotations
|
9
|
+
- flow definition with nestable stages
|
10
|
+
- zookeeper synchronization
|
11
|
+
- postgres database backend
|
12
|
+
- Prefect 1.x and 2.x support
|
13
|
+
- multi-processing/multi-node support for state exchange between `@materialize` tasks
|
14
|
+
- support materialization for: pandas, sqlalchemy, raw sql text, pydiverse.transform
|