Skip to content

Commit 7e32457

Browse files
Merge pull request #459 from shankarpandala/dev
Sync to dev
2 parents 607bbaf + 319e2e9 commit 7e32457

24 files changed

+443
-284
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: build
10+
jobs:
11+
py-check:
12+
runs-on: ${{ matrix.config.os }}
13+
name: ${{ matrix.config.os }} (${{ matrix.config.py }})
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
config:
18+
# - { os: windows-latest, py: "3.7" }
19+
# - { os: macOS-latest, py: "3.7" }
20+
- { os: ubuntu-latest, py: "3.6" }
21+
- { os: ubuntu-latest, py: "3.7" }
22+
- { os: ubuntu-latest, py: "3.8" }
23+
- { os: ubuntu-latest, py: "3.9" }
24+
- { os: ubuntu-latest, py: "3.10" }
25+
26+
env:
27+
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
28+
steps:
29+
- name: CHECKOUT CODE
30+
uses: actions/checkout@v2
31+
- name: SETUP PYTHON
32+
uses: actions/setup-python@v1
33+
with:
34+
python-version: ${{ matrix.config.py }}
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install --user --no-cache-dir Cython
39+
pip install --user -r requirements.txt
40+
pip install --user -r requirements_dev.txt
41+
- name: PKG-TEST
42+
run: |
43+
python -m unittest discover tests/

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches:
10+
- master
11+
- dev
12+
13+
jobs:
14+
build:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
20+
fail-fast: false
21+
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v2
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install flake8
35+
36+
- name: Lint with flake8
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
40+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41+
flake8 . --count --exit-zero --max-complexity=10
42+
43+
deploy:
44+
runs-on: ubuntu-latest
45+
needs: build
46+
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'release'
47+
steps:
48+
- name: Check out code
49+
uses: actions/checkout@v2
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@v2
53+
with:
54+
python-version: 3.9
55+
56+
- name: Install dependencies
57+
run: pip install setuptools wheel twine
58+
59+
- name: Build and publish
60+
env:
61+
TWINE_USERNAME: __token__
62+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
63+
run: |
64+
python setup.py sdist bdist_wheel
65+
twine upload dist/*

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Pull Request Docs Check"
2+
on:
3+
- pull_request
4+
5+
jobs:
6+
docs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: ammaraskar/sphinx-action@master
11+
with:
12+
docs-folder: "docs/"
13+
14+
- uses: actions/upload-artifact@v1
15+
with:
16+
name: DocumentationHTML
17+
path: docs/_build/html/
18+
19+
- name: Commit documentation changes
20+
run: |
21+
git clone https://github.com/your_git/repository.git --branch gh-pages --single-branch gh-pages
22+
cp -r docs/_build/html/* gh-pages/
23+
cd gh-pages
24+
git config --local user.email "[email protected]"
25+
git config --local user.name "GitHub Action"
26+
git add .
27+
git commit -m "Update documentation" -a || true
28+
# The above command will fail if no changes were present, so we ignore
29+
# the return code.
30+
- name: Push changes
31+
uses: ad-m/github-push-action@master
32+
with:
33+
branch: gh-pages
34+
directory: gh-pages
35+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will upload a python package uing twine when a release is triggered
2+
3+
name: publish
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install setuptools wheel twine
23+
- name: Build and publish
24+
env:
25+
TWINE_USERNAME: ${{ secrets.PYPI_USERS }}
26+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
27+
run: |
28+
python setup.py sdist bdist_wheel
29+
twine upload dist/*

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ os:
33
- osx
44
- windows
55

6+
dist:
7+
- bionic
8+
- focal
9+
- Jammy
10+
611
jobs:
712
allow_failures:
813
- os: osx
@@ -12,7 +17,7 @@ language: python
1217
python:
1318
- 3.8
1419
- 3.9
15-
- '3.10'
20+
- 3.10
1621

1722
install: pip install -U tox-travis
1823
script: tox
@@ -26,4 +31,4 @@ deploy:
2631
on:
2732
tags: true
2833
repo: shankarpandala/lazypredict
29-
python: 3.x
34+
python: 3.9

AUTHORS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Credits
3+
---
4+
5+
# Development Lead
6+
7+
- Shankar Rao Pandala \<<[email protected]>\>
8+
9+
# Contributors
10+
11+
- Breno Batista da Silva \<<[email protected]>\>

AUTHORS.rst

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

CONTRIBUTING.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: Contributing
3+
---
4+
5+
Contributions are welcome, and they are greatly appreciated! Every
6+
little bit helps, and credit will always be given.
7+
8+
You can contribute in many ways:
9+
10+
# Types of Contributions
11+
12+
## Report Bugs
13+
14+
Report bugs at <https://github.com/shankarpandala/lazypredict/issues>.
15+
16+
If you are reporting a bug, please include:
17+
18+
- Your operating system name and version.
19+
- Any details about your local setup that might be helpful in
20+
troubleshooting.
21+
- Detailed steps to reproduce the bug.
22+
23+
## Fix Bugs
24+
25+
Look through the GitHub issues for bugs. Anything tagged with \"bug\"
26+
and \"help wanted\" is open to whoever wants to implement it.
27+
28+
## Implement Features
29+
30+
Look through the GitHub issues for features. Anything tagged with
31+
\"enhancement\" and \"help wanted\" is open to whoever wants to
32+
implement it.
33+
34+
## Write Documentation
35+
36+
Lazy Predict could always use more documentation, whether as part of the
37+
official Lazy Predict docs, in docstrings, or even on the web in blog
38+
posts, articles, and such.
39+
40+
## Submit Feedback
41+
42+
The best way to send feedback is to file an issue at
43+
<https://github.com/shankarpandala/lazypredict/issues>.
44+
45+
If you are proposing a feature:
46+
47+
- Explain in detail how it would work.
48+
- Keep the scope as narrow as possible, to make it easier to
49+
implement.
50+
- Remember that this is a volunteer-driven project, and that
51+
contributions are welcome :)
52+
53+
# Get Started!
54+
55+
Ready to contribute? Here\'s how to set up [lazypredict]{.title-ref} for
56+
local development.
57+
58+
1. Fork the [lazypredict]{.title-ref} repo on GitHub.
59+
60+
2. Clone your fork locally:
61+
62+
``` shell
63+
$ git clone [email protected]:your_name_here/lazypredict.git
64+
```
65+
66+
3. Install your local copy into a virtualenv. Assuming you have
67+
virtualenvwrapper installed, this is how you set up your fork for
68+
local development:
69+
70+
``` shell
71+
$ mkvirtualenv lazypredict
72+
$ cd lazypredict/
73+
$ python setup.py develop
74+
$ pip install -r requirements_dev.txt
75+
```
76+
77+
4. Create a branch for local development:
78+
79+
``` shell
80+
$ git checkout -b name-of-your-bugfix-or-feature
81+
```
82+
83+
Now you can make your changes locally.
84+
85+
5. When you\'re done making changes, check that your changes pass
86+
flake8 and the tests, including testing other Python versions with
87+
tox:
88+
89+
``` shell
90+
$ flake8 lazypredict tests
91+
$ python setup.py test or pytest
92+
$ tox
93+
```
94+
95+
To get flake8 and tox, just pip install them into your virtualenv.
96+
97+
6. Commit your changes and push your branch to GitHub:
98+
99+
``` shell
100+
$ git add .
101+
$ git commit -m "Your detailed description of your changes."
102+
$ git push origin name-of-your-bugfix-or-feature
103+
```
104+
105+
7. Submit a pull request through the GitHub website.
106+
107+
# Pull Request Guidelines
108+
109+
Before you submit a pull request, check that it meets these guidelines:
110+
111+
1. The pull request should include tests.
112+
2. If the pull request adds functionality, the docs should be updated.
113+
Put your new functionality into a function with a docstring, and add
114+
the feature to the list in README.rst.
115+
3. The pull request should work for Python 2.7, 3.5, 3.6, 3.7 and 3.8,
116+
and for PyPy. Check
117+
<https://travis-ci.org/shankarpandala/lazypredict/pull_requests> and
118+
make sure that the tests pass for all supported Python versions.
119+
120+
# Tips
121+
122+
To run a subset of tests:
123+
124+
``` shell
125+
$ pytest tests.test_lazypredict
126+
```
127+
128+
# Deploying
129+
130+
A reminder for the maintainers on how to deploy. Make sure all your
131+
changes are committed (including an entry in HISTORY.rst). Then run:
132+
133+
``` shell
134+
$ bump2version patch # possible: major / minor / patch
135+
$ git push
136+
$ git push --tags
137+
```
138+
139+
Travis will then deploy to PyPI if tests pass.

0 commit comments

Comments
 (0)