Skip to content

[ENH]Type hints for primitive data types in base module #2736

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
18 changes: 0 additions & 18 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -2683,24 +2683,6 @@
"contributions": [
"code"
]
},
{
"login": "HaroonAzamFiza",
"name": "HaroonAzamFiza",
"avatar_url": "https://avatars.githubusercontent.com/u/183639840?v=4",
"profile": "https://github.com/HaroonAzamFiza",
"contributions": [
"doc"
]
},
{
"login": "Ramana-Raja",
"name": "Ramana Raja",
"avatar_url": "https://avatars.githubusercontent.com/u/83065061?v=4",
"profile": "https://github.com/Ramana-Raja",
"contributions": [
"code"
]
}
],
"commitType": "docs"
Expand Down
6 changes: 1 addition & 5 deletions .github/actions/cpu_all_extras/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Pip install all_extras with CPU versions
description: "For CI testing install the CPU version of dependencies with all extras if on ubuntu"

inputs:
python_version:
description: "Python version used"
required: false
default: "3.11"
additional_extras:
description: "Comma-separated list of additional extras to install"
required: false
Expand All @@ -15,7 +11,7 @@ runs:
using: "composite"
steps:
- name: Install CPU TensorFlow
if: ${{ runner.os == 'Linux' && inputs.python_version != '3.13' }}
if: runner.os == 'Linux'
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
Expand Down
57 changes: 7 additions & 50 deletions .github/utilities/issue_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
It checks if a comment on an issue or PR includes the trigger
phrase (as defined) and a mentioned user.
If it does, it assigns the issue to the mentioned user.
Users without write access can only have up to 2 open issues assigned.
Users with write access (or admin) are exempt from this limit.
If a non-write user already has 2 or more open issues, the bot
comments on the issue with links to the currently assigned open issues.
"""

import json
Expand All @@ -24,52 +20,13 @@
issue = repo.get_issue(number=issue_number)
comment_body = context_dict["event"]["comment"]["body"]
pr = context_dict["event"]["issue"].get("pull_request")
commenter = context_dict["event"]["comment"]["user"]["login"]

# Assign tagged used to the issue if the comment includes the trigger phrase
body = comment_body.lower()
if "@aeon-actions-bot" in body and not pr:
# Assign commenter if comment includes "assign me"
if "assign me" in body:
issue.add_to_assignees(commenter)
# Assign tagged used to the issue if the comment includes the trigger phrase
elif "assign" in body:
mentioned_users = re.findall(r"@[a-zA-Z0-9_-]+", comment_body)
mentioned_users = [user[1:] for user in mentioned_users]
mentioned_users.remove("aeon-actions-bot")
if "@aeon-actions-bot" in body and "assign" in body and not pr:
mentioned_users = re.findall(r"@[a-zA-Z0-9_-]+", comment_body)
mentioned_users = [user[1:] for user in mentioned_users]
mentioned_users.remove("aeon-actions-bot")

for user in mentioned_users:
user_obj = g.get_user(user)
permission = repo.get_collaborator_permission(user_obj)

if permission in ["admin", "write"]:
issue.add_to_assignees(user)
else:
# First check if the user is already assigned to this issue
if user in [assignee.login for assignee in issue.assignees]:
continue

# search for open issues only
query = f"repo:{repo.full_name} is:issue is:open assignee:{user}"
issues_assigned_to_user = g.search_issues(query)
assigned_count = issues_assigned_to_user.totalCount

if assigned_count >= 2:
# link to issue
assigned_issues_list = [
f"[#{assigned_issue.number}]({assigned_issue.html_url})"
for assigned_issue in issues_assigned_to_user
]

comment_message = (
f"@{user}, you already have {assigned_count} "
f"open issues assigned."
"Users without write access are limited to self-assigning two"
"issues.\n\n"
"Here are the open issues assigned to you:\n"
+ "\n".join(
f"- {issue_link}" for issue_link in assigned_issues_list
)
)
issue.create_comment(comment_message)
else:
issue.add_to_assignees(user)
for user in mentioned_users:
issue.add_to_assignees(user)
3 changes: 1 addition & 2 deletions .github/utilities/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ set -euxo pipefail
CMD="jupyter nbconvert --to notebook --inplace --execute --ExecutePreprocessor.timeout=600"

excluded=(
# try removing when 3.9 is dropped
"examples/transformations/signature_method.ipynb"
"examples/transformations/signature_method.ipynb"
)
if [ "$1" = true ]; then
excluded+=(
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/fast_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Python 3.11
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Build project
run: |
Expand All @@ -31,12 +30,6 @@ jobs:
upload-wheels:
runs-on: ubuntu-24.04

environment:
name: release
url: https://pypi.org/p/aeon/
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -45,3 +38,5 @@ jobs:

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/issue_assigned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Create app token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
Expand All @@ -25,10 +25,10 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Install PyGithub
run: pip install -Uq PyGithub
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issue_comment_edited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Create app token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
Expand All @@ -26,10 +26,10 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Install PyGithub
run: pip install -Uq PyGithub
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issue_comment_posted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Install PyGithub
run: pip install -Uq PyGithub

- name: Create app token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/periodic_github_maintenace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:

steps:
- name: Create app token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- name: Stale Branches
uses: crs-k/[email protected].1
uses: crs-k/[email protected].0
with:
repo-token: ${{ steps.app-token.outputs.token }}
days-before-stale: 140
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Run check-manifest
uses: pre-commit/[email protected]
Expand All @@ -35,10 +35,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Run pre-commit
uses: pre-commit/[email protected]
Expand All @@ -57,17 +57,17 @@ jobs:
brew install bash
/opt/homebrew/bin/bash --version

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Use numba cache to set env variables but not restore cache
uses: ./.github/actions/numba_cache
with:
cache_name: "run-notebook-examples"
runner_os: ${{ runner.os }}
python_version: "3.11"
python_version: "3.10"
restore_cache: "false"

- uses: ./.github/actions/cpu_all_extras
Expand All @@ -92,10 +92,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
Expand All @@ -117,17 +117,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Use numba cache to set env variables but not restore cache
uses: ./.github/actions/numba_cache
with:
cache_name: "test-no-soft-deps"
runner_os: ${{ runner.os }}
python_version: "3.11"
python_version: "3.10"
restore_cache: "false"

- name: Install aeon and dependencies
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macOS-14, windows-2022 ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
- name: Checkout
Expand All @@ -184,7 +184,6 @@ jobs:

- uses: ./.github/actions/cpu_all_extras
with:
python_version: ${{ matrix.python-version }}
additional_extras: "dev"

- name: Show dependencies
Expand All @@ -207,10 +206,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Disable Numba JIT
run: echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_core_dep_import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ jobs:
brew install bash
/opt/homebrew/bin/bash --version

- name: Setup Python 3.11
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.10"

- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no numba cache') }}
name: Restore numba cache
uses: ./.github/actions/numba_cache
with:
cache_name: "run-notebook-examples"
runner_os: ${{ runner.os }}
python_version: "3.11"
python_version: "3.10"

- uses: ./.github/actions/cpu_all_extras
with:
Expand Down
Loading