Skip to content

Commit 379adde

Browse files
authored
V1.0.x (#16)
* first commit version 1.0.x * Delete .DS_Store * Delete .github directory * Delete .tox directory * Delete .coverage * Delete .coveragerc * Update README.md * Delete gators/.DS_Store * added the other transformers and their tests * Added .github/ * Update __init__.py * Fix some lint issues + install libomp for macos in build.yml * Set the github action version to 3.13 * Replaced ruff by black and isort, removed mypy for now * Put pandas back in pyprojet * Add black and isort version and --check in build.yml * Delete tox * Added .github/codeql/codeql-config.yml and set languages correctly * removed py3.14 from the target-version list in pyproject.toml * Added a codeql.yml file * Added the clippers trasnformers * run back and isort
1 parent d7c9967 commit 379adde

File tree

1,105 files changed

+37047
-137396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,105 files changed

+37047
-137396
lines changed

.DS_Store

-6 KB
Binary file not shown.

.coverage

-92 KB
Binary file not shown.

.coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/.DS_Store

-6 KB
Binary file not shown.

.github/workflows/auto-release.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Auto Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
auto-release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # Required to create tags and releases
14+
id-token: write # Required for trusted publishing to PyPI
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Fetch all history for tag detection
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.14'
26+
27+
- name: Get latest tag
28+
id: get_version
29+
run: |
30+
# Get the latest tag matching v1.0.*
31+
LATEST_TAG=$(git tag -l "v1.0.*" | sort -V | tail -1)
32+
33+
if [ -z "$LATEST_TAG" ]; then
34+
# No tags exist, start with v1.0.0
35+
NEW_VERSION="v1.0.0"
36+
else
37+
# Extract patch number and increment
38+
PATCH=$(echo $LATEST_TAG | sed 's/v1.0.//')
39+
NEW_PATCH=$((PATCH + 1))
40+
NEW_VERSION="v1.0.$NEW_PATCH"
41+
fi
42+
43+
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
44+
echo "Next version: $NEW_VERSION"
45+
46+
- name: Install build dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install build twine
50+
51+
- name: Update version in code
52+
run: |
53+
VERSION="${{ steps.get_version.outputs.new_version }}"
54+
# Remove 'v' prefix for Python version
55+
PYTHON_VERSION="${VERSION#v}"
56+
57+
# Update __init__.py
58+
sed -i.bak "s/__version__ = .*/__version__ = \"$PYTHON_VERSION\"/" gators/__init__.py
59+
rm gators/__init__.py.bak || true
60+
61+
- name: Build package
62+
run: python -m build
63+
64+
- name: Check package
65+
run: twine check dist/*
66+
67+
- name: Create and push tag
68+
run: |
69+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
70+
git config --local user.name "github-actions[bot]"
71+
git tag ${{ steps.get_version.outputs.new_version }}
72+
git push origin ${{ steps.get_version.outputs.new_version }}
73+
74+
- name: Create GitHub Release
75+
uses: softprops/action-gh-release@v1
76+
with:
77+
tag_name: ${{ steps.get_version.outputs.new_version }}
78+
name: Release ${{ steps.get_version.outputs.new_version }}
79+
draft: false
80+
prerelease: false
81+
files: dist/*
82+
generate_release_notes: true
83+
84+
# Uncomment to auto-publish to PyPI
85+
# - name: Publish to PyPI
86+
# uses: pypa/gh-action-pypi-publish@release/v1
87+
# with:
88+
# skip-existing: true
89+
# # Use trusted publishing or add:
90+
# # password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/build.yml

Lines changed: 64 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,88 @@
1-
name: build and test
1+
name: Tests
22

33
on:
44
push:
55
branches:
6+
- main
67
- master
78
- develop
89
pull_request:
910
branches:
11+
- main
1012
- master
1113
- develop
1214

1315
jobs:
14-
build:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
allow-prereleases: true
27+
cache: 'pip'
28+
29+
- name: Install linting tools
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install black==24.4.2 isort==5.13.2
33+
34+
- name: Check formatting with black
35+
run: black --check gators/
36+
37+
- name: Sort the imports with isort
38+
run: isort --check-only --profile black gators/
39+
40+
# - name: Type check with mypy
41+
# run: mypy gators/
42+
43+
test:
1544
runs-on: ${{ matrix.os }}
1645
strategy:
46+
fail-fast: false
1747
matrix:
18-
python-version: [3.9]
19-
os: [ubuntu-latest] #ubuntu-latest [macos-latest, ] #
20-
21-
env:
22-
PYTHON_VERSION: ${{ matrix.python-version }}
23-
SPARK_VERSION: ${{ matrix.spark-version }}
24-
PANDAS_VERSION: ${{ matrix.pandas-version }}
25-
PYARROW_VERSION: ${{ matrix.pyarrow-version }}
26-
NUMPY_VERSION: ${{ matrix.numpy-version }}
27-
DEFAULT_INDEX_TYPE: ${{ matrix.default-index-type }}
28-
KOALAS_TESTING: 1
29-
SPARK_LOCAL_IP: 127.0.0.1
30-
# DISPLAY=0.0 does not work in Github Actions with Python 3.5. Here we work around with xvfb-run
31-
PYTHON_EXECUTABLE: xvfb-run python
32-
GITHUB_OAUTH_KEY: ${{ secrets.GITHUB_TOKEN }}
48+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
49+
os: [ubuntu-latest]
50+
include:
51+
- python-version: "3.13"
52+
os: macos-latest
3353

3454
steps:
35-
- uses: actions/checkout@v2
36-
- uses: actions/setup-java@v1
37-
with:
38-
java-version: 1.8
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
3958
- name: Set up Python ${{ matrix.python-version }}
40-
uses: actions/setup-python@v2
59+
uses: actions/setup-python@v5
4160
with:
4261
python-version: ${{ matrix.python-version }}
43-
- name: Install libomp
44-
run: |
45-
if [ "$RUNNER_OS" == "macOS" ]; then
46-
brew install libomp
47-
fi
48-
shell: bash
49-
- name: install dependencies
50-
run: |
51-
pip install --upgrade pip
52-
pip install certifi
53-
pip install tox tox-wheel tox-gh-actions
54-
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements_tox.txt
55-
python setup_build.py build_ext --inplace
56-
python setup_build.py install
57-
- name: tests
58-
run: |
59-
coverage run --omit gators/*/test*.py -m pytest gators && coverage report && coverage xml
60-
- name: Upload coverage to Codecov
61-
uses: codecov/codecov-action@v2
62-
with:
63-
token: ${{ secrets.CODECOV_TOKEN }}
64-
file: coverage.xml
62+
cache: 'pip'
63+
64+
- name: Install libomp on macOS
65+
if: runner.os == 'macOS'
66+
run: brew install libomp
6567

66-
# run: |
67-
# - name: Test with tox
68-
# run: tox
69-
# with:
70-
# token: {{ secrets.CODECOV_TOKEN }}
68+
- name: Install dependencies
69+
run: |
70+
python -m pip install --upgrade pip
71+
pip install -e ".[dev]"
7172
72-
# - run: coverage run -m pytest gators && coverage report && coverage xml
73-
74-
# token: 'ce68bafd-388e-42e8-abf8-b5ea3b328037'
73+
- name: Run tests with coverage
74+
run: |
75+
pytest
7576
77+
- name: Build wheel
78+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
79+
run: |
80+
python -m pip install build
81+
python -m build
7682
77-
# - name: Install dependencies
78-
# run: |
79-
# python -m pip install --upgrade pip
80-
# pip install tox tox-wheel tox-gh-actions
81-
# pip install numpy<1.20.0
82-
# pip install Cython
83-
# - name: Test with tox
84-
# run: tox
83+
- name: Upload wheel
84+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: dist-packages
88+
path: dist/

.github/workflows/codeql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: Initialize CodeQL
2+
uses: github/codeql-action/init@v3
3+
with:
4+
languages: python, actions

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Required for trusted publishing
13+
contents: read
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.14'
23+
24+
- name: Install build dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build twine
28+
29+
- name: Build package
30+
run: python -m build
31+
32+
- name: Check package
33+
run: twine check dist/*
34+
35+
- name: Publish to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
# Uses trusted publishing by default (recommended)
39+
# No token needed if you configure trusted publishing at PyPI
40+
# Alternatively, use a token:
41+
# password: ${{ secrets.PYPI_API_TOKEN }}
42+
skip-existing: true
-829 KB
Binary file not shown.

.tox/log/py36-0.log

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)