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

migrate to scikit-build-core, misc updates #14

Merged
merged 37 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
42cedc7
offset
zhixiong-tang Oct 21, 2023
a208a6b
partial sort (top k)
zhixiong-tang Oct 21, 2023
d615723
push first
zhixiong-tang Nov 25, 2023
175241e
clean repo
district10 Nov 28, 2023
22fd4c9
fix
district10 Nov 28, 2023
f0bdffc
lint code
district10 Nov 28, 2023
75a6675
Removed submodules
district10 Nov 28, 2023
611ef29
clean
district10 Nov 28, 2023
7d6c884
update makefile
district10 Nov 28, 2023
77c583f
fix
district10 Nov 28, 2023
2f20498
add back git ignored files...
district10 Nov 28, 2023
8d41114
remove x
district10 Nov 28, 2023
239d8d0
fix
district10 Nov 28, 2023
d6109ab
good
district10 Nov 28, 2023
3b83dea
update CI
district10 Nov 28, 2023
ee06762
fix
district10 Nov 28, 2023
fdd1fa2
c++17 for macOS
district10 Nov 29, 2023
bed31b2
fix CI
district10 Nov 29, 2023
3a2870e
fix
district10 Nov 29, 2023
cd6a938
fix
district10 Nov 29, 2023
17e4628
fix
district10 Nov 29, 2023
77b29ab
fix CI
district10 Nov 29, 2023
f9a8291
fix
district10 Nov 29, 2023
94c6351
fix windows build
district10 Nov 29, 2023
a0ba91a
fix windows build
district10 Nov 29, 2023
c9af3f8
not ready
district10 Nov 29, 2023
cbd46ac
fix mode
district10 Nov 29, 2023
54af717
fix
district10 Nov 29, 2023
d212b86
fix M_PI
district10 Nov 29, 2023
0371d44
fix CI
district10 Nov 29, 2023
64c1622
fix CI
district10 Nov 29, 2023
76e7a20
fix
district10 Nov 29, 2023
18d73da
fix
district10 Nov 29, 2023
8b8e936
fix vector
district10 Nov 30, 2023
15d2caa
disable parallel
district10 Nov 30, 2023
19ba44c
move code
district10 Nov 30, 2023
e8bfffa
lint, trigger CI
district10 Dec 2, 2023
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
20 changes: 10 additions & 10 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ on:

jobs:
build:
name: Build with Pip
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-2019, macos-11]
python-version: ["3.8", "3.9", "3.10"]

runs-on: ${{ matrix.platform }}
platform: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.7", "3.11"]

steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Add requirements
run: python -m pip install --upgrade wheel setuptools
- name: Set min macOS version
if: runner.os == 'macOS'
run: |
echo "MACOS_DEPLOYMENT_TARGET=10.14" >> $GITHUB_ENV

- name: Build and install
run: pip install --verbose .[test]
run: pip install --verbose .[test] && make data_pull

- name: Test
run: python -m pytest
32 changes: 16 additions & 16 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ on:
types:
- published

env:
FORCE_COLOR: 3

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -36,29 +43,22 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

# - name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v2
# with:
# platforms: all

- uses: pypa/[email protected]
- uses: pypa/[email protected]
env:
# CIBW_ARCHS: auto64
CIBW_ARCHS_LINUX: x86_64 # aarch64
CIBW_ARCHS_WINDOWS: AMD64 # ARM64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BEFORE_BUILD: pip install numpy fire --prefer-binary
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_WINDOWS: auto ARM64
CIBW_BEFORE_BUILD: pip install fire loguru numpy --prefer-binary && make data_pull
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
CIBW_SKIP: pp* *i686 *musllinux*
CIBW_TEST_SKIP: "*macosx* *-win_arm64"
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=10.14

- name: Verify clean directory
run: git diff --exit-code
Expand Down Expand Up @@ -86,6 +86,6 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.6.4
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ _generate/
*.so
*.py[cod]
*.egg-info
*env*
wheelhouse
site
data/*
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

20 changes: 7 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,31 @@ exclude: '(?x)^3rdparty/(Eigen/.*|.*\..*|rapidjson/.*|spdlog/.*|tl/.*)$'
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
exclude: ^conda\.recipe/meta\.yaml$
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace

# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
exclude: ^(docs)

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.254"
# Check linting and style issues
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.4"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
exclude: ^(docs)

# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.4.2
rev: v1.5.4
hooks:
- id: remove-tabs
exclude: ^(docs|Makefile|data/Makefile)
Expand All @@ -64,7 +59,6 @@ repos:
types: [file]
files: (\.cmake|CMakeLists.txt)(.in)?$

# Suggested hook if you add a .clang-format file
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.0
hooks:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
"concepts": "cpp",
"memory_resource": "cpp",
"ranges": "cpp",
"stop_token": "cpp"
"stop_token": "cpp",
"core": "cpp"
},
"workbench.colorCustomizations": {
// "activityBar.background": "#b80ae3",
Expand Down
60 changes: 60 additions & 0 deletions 3rdparty/Eigen/Eigenvalues
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_EIGENVALUES_MODULE_H
#define EIGEN_EIGENVALUES_MODULE_H

#include "Core"

#include "Cholesky"
#include "Jacobi"
#include "Householder"
#include "LU"
#include "Geometry"

#include "src/Core/util/DisableStupidWarnings.h"

/** \defgroup Eigenvalues_Module Eigenvalues module
*
*
*
* This module mainly provides various eigenvalue solvers.
* This module also provides some MatrixBase methods, including:
* - MatrixBase::eigenvalues(),
* - MatrixBase::operatorNorm()
*
* \code
* #include <Eigen/Eigenvalues>
* \endcode
*/

#include "src/misc/RealSvd2x2.h"
#include "src/Eigenvalues/Tridiagonalization.h"
#include "src/Eigenvalues/RealSchur.h"
#include "src/Eigenvalues/EigenSolver.h"
#include "src/Eigenvalues/SelfAdjointEigenSolver.h"
#include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h"
#include "src/Eigenvalues/HessenbergDecomposition.h"
#include "src/Eigenvalues/ComplexSchur.h"
#include "src/Eigenvalues/ComplexEigenSolver.h"
#include "src/Eigenvalues/RealQZ.h"
#include "src/Eigenvalues/GeneralizedEigenSolver.h"
#include "src/Eigenvalues/MatrixBaseEigenvalues.h"
#ifdef EIGEN_USE_LAPACKE
#ifdef EIGEN_USE_MKL
#include "mkl_lapacke.h"
#else
#include "src/misc/lapacke.h"
#endif
#include "src/Eigenvalues/RealSchur_LAPACKE.h"
#include "src/Eigenvalues/ComplexSchur_LAPACKE.h"
#include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h"
#endif

#include "src/Core/util/ReenableStupidWarnings.h"

#endif // EIGEN_EIGENVALUES_MODULE_H
Loading
Loading