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

Python Package Refactoring #64

Open
wants to merge 133 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
cbfcb02
refactored for shared src format
TNonet Aug 21, 2021
84da25f
Reintroduced RcppArmadillo due to segmentation faults
TNonet Aug 29, 2021
7d24c35
Python API first commit
TNonet Sep 10, 2021
7c0374c
Fixed error handling infinite snr parameter in GenSynthetic
TNonet Sep 18, 2021
f834644
Fixed error in documentation of genlogistic
TNonet Sep 18, 2021
2bd2b68
updating python API to use FitModel and CVFitModel
TNonet Sep 18, 2021
f402e2e
miscellaneous changes and fixes
TNonet Sep 25, 2021
c7b918b
Update .travis.yml
TNonet Sep 26, 2021
d7bd6c8
Update travis CI/CD to run for python and R [1/?]
TNonet Nov 12, 2021
75bd058
Merge pull request #7 from TNonet/shared
TNonet Nov 12, 2021
b178fc2
Remove os options for Travis CI/CD on python build
TNonet Nov 12, 2021
3573d21
Create python_CI.yml
TNonet Nov 12, 2021
17dbe4d
Update python_CI.yml
TNonet Nov 12, 2021
5380a86
Update python_CI.yml
TNonet Nov 12, 2021
b244acc
Update python_CI.yml
TNonet Nov 12, 2021
b992da3
Update python_CI.yml
TNonet Nov 12, 2021
e82dc5c
Update setup.py
TNonet Nov 12, 2021
a3af357
Update python_CI.yml
TNonet Nov 12, 2021
a8dacc4
Merge pull request #8 from TNonet/shared
TNonet Nov 12, 2021
11ff687
Update python_CI.yml
TNonet Nov 12, 2021
40c6f77
Update setup.py
TNonet Nov 12, 2021
65cb6dd
Update setup.py
TNonet Nov 12, 2021
46af360
Update setup.py
TNonet Nov 12, 2021
49eef5b
Update setup.py
TNonet Nov 12, 2021
645a9a9
Update python_CI.yml
TNonet Nov 12, 2021
8c8765e
Update python_CI.yml
TNonet Nov 12, 2021
f91e1df
Update python_CI.yml
TNonet Nov 12, 2021
130893e
Update python_CI.yml
TNonet Nov 12, 2021
325934b
Update python_CI.yml
TNonet Nov 12, 2021
ed1aa7a
Update python_CI.yml
TNonet Nov 12, 2021
da5a8f4
Delete .Rbuildignore
TNonet Nov 12, 2021
e85697b
Move .astylerc file to R package
TNonet Nov 12, 2021
64c72c9
Merge branch 'master' of https://github.com/TNonet/L0Learn
TNonet Nov 12, 2021
a99f1a8
Create r.yml
TNonet Nov 12, 2021
9166bc4
Rename python_CI.yml to python.yml
TNonet Nov 12, 2021
1edf872
Update r.yml
TNonet Nov 12, 2021
9adb5ec
Update r.yml
TNonet Nov 12, 2021
2fb3ef7
Update test_L0Learn_intercept.R
TNonet Nov 12, 2021
ca7f55d
Update test_L0Learn_intercept.R
TNonet Nov 14, 2021
0fbdcb1
Update README.md
TNonet Nov 16, 2021
2d62079
Update r.yml
TNonet Nov 16, 2021
caf80fa
Remove need for raster in test_L0Learn_bounds
TNonet Nov 16, 2021
b10f616
Update r.yml
TNonet Nov 16, 2021
8b6e6f3
Update r.yml
TNonet Nov 16, 2021
8b8a082
Create README.md
TNonet Nov 17, 2021
df12291
Change README file type to rst
TNonet Nov 17, 2021
abe1773
Update r.yml
TNonet Nov 19, 2021
b25a375
Update r.yml
TNonet Nov 19, 2021
7196c24
Update r.yml
TNonet Nov 19, 2021
23af4f9
remove `raster` and `covr` from DESCRIPTION Suggests
TNonet Nov 19, 2021
a74008b
Update .gitignore
TNonet Nov 19, 2021
d6bd213
Update .gitignore
TNonet Nov 19, 2021
3ef612f
Update .gitignore
TNonet Nov 19, 2021
eca5c01
update python documentation
TNonet Nov 19, 2021
5120d64
Update r.yml
TNonet Nov 20, 2021
07d9d7d
bug fixes and test coverage for python fit / cvfit interface
TNonet Nov 21, 2021
eb2e5c8
Create LICENSE
TNonet Nov 21, 2021
87f99e1
Update pyproject.toml to direct pytest to not test coverage on C++ code
TNonet Nov 21, 2021
5396eba
Update setup.py to recompile for coverage analysis
TNonet Nov 21, 2021
b9e9bab
Update python.yml
TNonet Nov 21, 2021
0ab4f28
Update python.yml
TNonet Nov 21, 2021
ac83913
Update python.yml
TNonet Nov 21, 2021
89f020b
Update python.yml
TNonet Nov 21, 2021
bd3d3d2
update test_check R with reporter
TNonet Nov 21, 2021
8f74303
Update r.yml
TNonet Nov 22, 2021
8b74702
Update R_L0Learn_Interface.cpp for covr issue.
TNonet Nov 22, 2021
c2155ff
Update r.yml
TNonet Nov 22, 2021
81fe1de
Update r.yml
TNonet Nov 22, 2021
a1fbd7e
Update r.yml
TNonet Nov 22, 2021
d6d3566
Add check on excludeFirstK parameter value
TNonet Nov 23, 2021
077729c
Update r.yml
TNonet Nov 23, 2021
e57392c
Merge pull request #9 from TNonet/py_doc
TNonet Nov 24, 2021
11c6947
Update README.md
TNonet Nov 24, 2021
006f486
Remove unnecessary np_to_arma_check
TNonet Nov 24, 2021
dbf335b
Remove name conflict of test_max_iter_* interfering with test coverage
TNonet Nov 24, 2021
84eac69
Update test_fit.py to properly test the correct parameter configurations
TNonet Nov 24, 2021
4935e19
Update X matrix checks and sparse X handling
TNonet Nov 24, 2021
6b15a4e
Update test coverages on models and fit functions
TNonet Nov 26, 2021
f14369e
Improved test coverage for FitModel.predict and FitModel.score
TNonet Nov 26, 2021
14ab2ca
Updated Documentation
TNonet Dec 3, 2021
8900724
Updating Documentation for Github Pages
TNonet Dec 3, 2021
76d010c
testing github-pages
TNonet Dec 3, 2021
36ae565
testing github-pages prt2
TNonet Dec 3, 2021
db79bd2
Set theme jekyll-theme-cayman
TNonet Dec 3, 2021
decc77d
Create .nojekyll
TNonet Dec 3, 2021
46b257b
Merge branch 'master' of https://github.com/TNonet/L0Learn
TNonet Dec 3, 2021
0c0d3d2
Create python_docs.yml
TNonet Dec 3, 2021
ec03a2a
Update python_docs.yml
TNonet Dec 3, 2021
5c541cd
Update python_docs.yml
TNonet Dec 3, 2021
af09de6
Update docs format
TNonet Dec 3, 2021
8725ee5
Update README.md
TNonet Dec 3, 2021
b14a465
Change README file type to md
TNonet Dec 3, 2021
4337abf
Merge branch 'master' of https://github.com/TNonet/L0Learn
TNonet Dec 3, 2021
74b74d0
Documentation update
TNonet May 1, 2022
a1a139e
Update Makefile
TNonet May 1, 2022
dc6f86e
Update python_docs.yml
TNonet May 1, 2022
ff7769e
Update python_docs.yml
TNonet May 1, 2022
ec97488
Update python_docs.yml
TNonet May 1, 2022
39a8d0d
Update python_docs.yml
TNonet May 1, 2022
5c750a0
Update python_docs.yml
TNonet May 1, 2022
7eb59b0
Update python_docs.yml
TNonet May 1, 2022
55e4d00
Update python_docs.yml
TNonet May 1, 2022
d11ad2d
Update python_docs.yml
TNonet May 1, 2022
98c772c
Refactor package location
TNonet May 5, 2022
186b0c0
Create wheels.yml
TNonet May 5, 2022
1a1742a
Update wheels.yml
TNonet May 5, 2022
7a8d4af
Update wheels.yml
TNonet May 5, 2022
4a8db6e
Update wheels.yml
TNonet May 6, 2022
8a404b5
Use carma instead of cython for C++ extension bindings (#10)
TNonet Jun 1, 2022
1333939
merge conflicts
TNonet Jun 1, 2022
1ec2718
Update python.yml
TNonet Jun 1, 2022
e46302b
Install test extra for CI check
TNonet Jun 1, 2022
95256be
Upgrade pip before install
TNonet Jun 1, 2022
ada5c25
Update python.yml
TNonet Jun 1, 2022
ed9da38
Updating CI checks
TNonet Jun 1, 2022
7b34a72
Update python.yml
TNonet Jun 2, 2022
3fbd1b7
Update wheels.yml
TNonet Jun 2, 2022
5457af2
Update python.yml
TNonet Jun 2, 2022
3b80e05
try using use_scm_version
TNonet Jun 3, 2022
7e97f10
Revert "try using use_scm_version"
TNonet Jun 3, 2022
db575da
Release on tags
TNonet Jun 3, 2022
49e6319
Set status to beta
TNonet Jun 3, 2022
8eb4aaa
Update documentation
TNonet Jun 4, 2022
0f22bca
Merge branch 'master' of https://github.com/hazimehh/L0Learn into haz…
TNonet Jun 4, 2022
93b9498
t push origin masterMerge branch 'hazimehh-master'
TNonet Jun 4, 2022
755e17d
Delete CDL012LogisticSwaps.cpp
TNonet Jun 4, 2022
35b3864
Bring in changes from jiachangliu/L0Learn (#12)
TNonet Jun 4, 2022
83f75da
remove python coveralls badge as it is broken
TNonet Apr 12, 2023
835d3bc
Deprecate np.float in favor of np.float64 for numpy 1.20+ releases
TNonet Apr 12, 2023
724d3f8
Update test_models.py
TNonet Apr 15, 2023
ebef7c3
Update setup.py
TNonet Apr 15, 2023
89b390f
Fix indent (#13)
TheoGuyard Jan 21, 2024
674f781
Update wheels.yml (#14)
TNonet Jan 22, 2024
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
95 changes: 95 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Python CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths:
- "python/**"
- '.github/workflows/python.yml'

pull_request:
branches: [ master ]
paths:
- "python/**"
- '.github/workflows/python.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
include:
- os: macos-latest
- os: ubuntu-latest
INSTALL_DEPS: |
sudo apt-get install -y liblapack-dev
bash scripts/install_linux_libs.sh
defaults:
run:
working-directory: ./python

steps:
- name: Checkout l0learn
uses: actions/checkout@v2
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: install-dependencies
run: ${{ matrix.INSTALL_DEPS }}

- name: Install L0Learn
run: |
python -m pip install --upgrade pip
pip install .

coverage:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./python

steps:
- name: Checkout l0learn
uses: actions/checkout@v2
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: install-dependencies
run: |
sudo apt-get install -y liblapack-dev
bash scripts/install_linux_libs.sh

- name: Install L0Learn
run: |
pip install .

- name: Run Tests and Coverage
run: |
pip install pytest-cov coveralls hypothesis
pytest tests/ --cov=l0learn

- name: Coveralls
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

34 changes: 34 additions & 0 deletions .github/workflows/python_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions

name: Python Docs

# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Pandoc
run: |
conda install pandoc
pip install nbsphinx

- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "python/doc/"
61 changes: 61 additions & 0 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: R CI

on:
push:
branches: [ master ]
paths:
- "R/**"
- '.github/workflows/r.yml'

pull_request:
branches: [ master ]
paths:
- "R/**"
- '.github/workflows/r.yml'


workflow_dispatch:

jobs:
build:
runs-on: macos-latest
strategy:
matrix:
r-version: ['3.6.3', '4.1.1', 'release']

defaults:
run:
working-directory: R

steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.r-version }}
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v1
with:
pandoc-version: '2.7.3'
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck", "devtools"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check
run: rcmdcheck::rcmdcheck("R", args = "--no-manual", error_on = "error", check_dir = "check")
shell: Rscript {0}
- uses: TNonet/actions/setup-r-dependencies@master
with:
cache-version: 1
extra-packages: |
covr
xml2
working-directory: R

- name: Test coverage
run: |
covr::package_coverage(
type = "none",
code = "testthat::test_package('L0Learn', reporter = testthat::JunitReporter$new(file = 'test-results.xml'))")
shell: Rscript {0}
79 changes: 79 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build and Deploy

on:
workflow_dispatch:

push:
# Pattern matched against refs/tags
tags:
- '**'

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] # windows-2019, ]


steps:
- name: Checkout l0learn
uses: actions/checkout@v2
with:
submodules: true

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.5.0

- name: Build wheels
run: |
cd python
python -m cibuildwheel --output-dir l0learn-wheelhouse
env:
CIBW_SKIP: pp* *-win32 *-manylinux_i686 *musllinux*
CIBW_BEFORE_ALL_LINUX: "yum install -y lapack-devel || apt-get install -y liblapack-dev && bash scripts/install_linux_libs.sh"
CIBW_BEFORE_TEST: "pip install pytest numpy hypothesis"
CIBW_TEST_COMMAND: "pytest {package}/tests"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_BUILD_VERBOSITY: 3

- uses: actions/upload-artifact@v2
with:
name: l0learn-wheelhouse
path: python/l0learn-wheelhouse/

upload-to-pypip:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Publish a Python distribution to PyPI
runs-on: ubuntu-latest
needs: build_wheels

steps:
- name: Checkout l0learn
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Download l0learn-wheelhouse artifact
uses: actions/download-artifact@v3
with:
name: l0learn-wheelhouse
path: python/l0learn-wheelhouse/

- name: upload-artifact
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: python/l0learn-wheelhouse/

Loading