Skip to content
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
32 changes: 27 additions & 5 deletions .github/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,35 @@
CI/CD workflows and repo automation.

## Workflows (source of truth)
- `intel-ci.yml` — Intel CI: builds and tests the conda packages of `conda-recipe` and the wheels, for the platforms and Python versions the recipe and `pyproject.toml` declare (`ci/matrix.py`); see `ci/README.md`
- `build-with-clang.yml` — Intel clang compatibility checks
- `build-with-standard-clang.yml` — standard clang compatibility checks
- `build_pip.yml` — pip build pipeline with pre-release NumPy
- `intel-ci.yml` — builds and tests the conda packages of `conda-recipe/` and
the wheels, for the platforms and Python versions the recipe and
`pyproject.toml` declare (`ci/matrix.py`); see `ci/README.md`
- `build_pip.yml` — editable pip build and test with `icx`, including
pre-release NumPy
- `build-with-clang.yml` — build and test with `icx` from the oneAPI apt
repository
- `build-with-standard-clang.yml` — build and test with upstream clang
- `pre-commit.yml` — lint/format checks
- `openssf-scorecard.yml` — security scanning
- `coverity.yml` — Coverity static analysis (see `coverity/README.md`)
- `openssf-scorecard.yml` — OpenSSF Scorecard
- `zizmor.yml` — GitHub Actions security lint
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved

Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
The three pip workflows run `pytest --pyargs mkl_umath` against the editable
install. `intel-ci.yml` installs each built conda package and wheel in a test
job of its own and runs the suite with `ci/test.py`.

## Templates and config
- `pull_request_template.md` — PR description, verification, and checklist
- `ISSUE_TEMPLATE/` — bug report and feature request forms; `config.yml` adds
contact links that send security reports to Intel's vulnerability process
and usage questions to the README
- `dependabot.yml` — update schedule for GitHub Actions and pre-commit hooks
- `CODEOWNERS` — default reviewers
- `copilot-instructions.md` — behavior policy for coding agents

## Policy
- Treat workflow YAML as canonical for platform/Python matrices, except `intel-ci.yml`, whose conda matrix is `conda-recipe/conda_build_config.yaml` and whose wheel matrix is the Python classifiers in `pyproject.toml`.
- Avoid doc claims about CI coverage unless present in workflow config.
- Follow the conventions every workflow here uses and zizmor checks: pin each
action to a full commit SHA with a version comment, set least-privilege
`permissions`, and set `persist-credentials: false` on checkouts.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Bug report
description: Report incorrect results, a crash, or a build failure
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
For security vulnerabilities, do not open an issue — follow [SECURITY.md](https://github.com/IntelPython/mkl_umath/blob/main/SECURITY.md).

- type: textarea
id: description
attributes:
label: Description
description: What happened, and what did you expect instead?
validations:
required: true

- type: textarea
id: reproducer
attributes:
label: Reproducer
description: A minimal, self-contained snippet. Include the ufunc, input values, and dtype.
render: python
validations:
required: true

- type: dropdown
id: install-source
attributes:
label: How was `mkl_umath` installed?
options:
- Intel conda channel (software.repos.intel.com)
- conda-forge
- pip, Intel index (software.repos.intel.com)
- pip / PyPI
- Built from source
validations:
required: true

- type: textarea
id: versions
attributes:
label: Versions
description: |
Output of:
```
python -c "import mkl_umath, numpy; print(mkl_umath.__version__); print(numpy.__version__)"
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
```
Add the MKL version (`conda list mkl` or `pip list | grep -i mkl`), your OS, and your Python version too.
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
If you built from source, or the build failed: the compiler and version (`icx --version` or `clang --version`), the `-Dmkl_threading` value, and the build log. Skip the `python -c` line if the import fails.
render: shell
validations:
required: true

- type: textarea
id: notes
attributes:
label: Anything else
description: |
Optional. Whether NumPy patching was active (`mkl_umath.is_patched()`), whether the result differs from stock NumPy, or a non-default `MKL_NUM_THREADS`.
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Security vulnerability
url: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html
about: Report security vulnerabilities through Intel's process, not a public issue.
- name: Question about usage
url: https://github.com/IntelPython/mkl_umath/blob/main/README.md
about: Check the README first, including the patching section.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature request
description: Propose a new ufunc loop, dtype, or capability
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: What problem does this solve?
description: The use case, not the implementation.
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposal
description: |
What you would like `mkl_umath` to do. If it covers a NumPy ufunc, name it — NumPy's semantics are the contract for patched loops.
validations:
required: true

- type: input
id: upstream
attributes:
label: Upstream equivalent
description: Link to the NumPy docs for the ufunc, if there is one.
validations:
required: false

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Optional. Workarounds you are using today.
validations:
required: false
10 changes: 6 additions & 4 deletions .github/copilot-instructions.md
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Higher-precedence rules override lower-precedence context.

## Contribution expectations
- Keep changes atomic and single-purpose.
- Preserve runtime patching API (`use_in_numpy()`, `restore()`, `is_patched()`) unless explicitly requested.
- Preserve the runtime patching API (`patch_numpy_umath()`, `restore_numpy_umath()`,
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
`is_patched()`, and the `mkl_umath()` context manager) unless explicitly requested.
Keep the deprecated `use_in_numpy()` and `restore()` aliases until a release removes them.
- For behavior changes, update tests in `mkl_umath/tests/` in the same step.
- For bugs, include a regression test.
- Do not modify generated artifacts directly when template/source files are the intended edit points.
Expand All @@ -32,9 +34,9 @@ Higher-precedence rules override lower-precedence context.
- Never include secrets or credentials in code/docs.

## Source-of-truth files
- Build/config: `pyproject.toml`, `meson.build`
- Dependencies/packaging: `pyproject.toml`, `conda-recipe*/meta.yaml`
- CI: `.github/workflows/*.yml`
- Build/config: `pyproject.toml`, `meson.build`, `meson.options`
- Dependencies/packaging: `pyproject.toml`, `conda-recipe/meta.yaml`
- CI: `.github/workflows/*.yml`, `ci/README.md`
- API: `mkl_umath/__init__.py`, `mkl_umath/src/_patch_numpy.pyx`
- Core implementation: `mkl_umath/src/*.{c,c.src,pyx}`
- Tests: `mkl_umath/tests/`
Expand Down
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Description

<!-- What changed and why. Link any related issues. -->

## Verification

<!-- The commands you ran, and the platform and versions you ran them on. -->

- Tests: <!-- e.g. `pytest mkl_umath/tests`, Python 3.12 / NumPy 2.x, Linux -->
- Lint: <!-- `pre-commit run --all-files` -->

## Not verified

<!--
Anything skipped or left to CI, and why. Examples: Windows, the
conda build, the benchmarks. Write "none" if you ran everything relevant.
-->

## Checklist

- [ ] Results match stock NumPy, or the difference is intentional and called out above.
- [ ] Behavior changes have tests in `mkl_umath/tests/`; bug fixes have a regression test.
- [ ] `CHANGELOG.md` updated under `## [dev]` with a `[gh-NNN](https://github.com/IntelPython/mkl_umath/pull/NNN)` link, or the change isn't user-visible.

<!-- See CONTRIBUTING.md for the build and test workflow, and AGENTS.md for the module map. -->
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ var/
pip-log.txt
pip-delete-this-directory.txt

# Virtual environments, test caches, local env files
Comment thread
jharlow-intel marked this conversation as resolved.
Resolved
.venv/
venv/
.pytest_cache/
.env

# Unit test / coverage reports
htmlcov/
.tox/
Expand Down Expand Up @@ -87,3 +93,9 @@ mkl_umath/src/__umath_generated.c
mkl_umath/src/mkl_umath_loops.c
mkl_umath/src/mkl_umath_loops.h
mkl_umath/src/_patch.c

# ASV benchmark artifacts
.asv/

# Developer-local coding agent settings
.claude/settings.local.json
Loading
Loading