Skip to content

Commit 1f6d7d2

Browse files
authored
Merge pull request #30 from Serapieum-of-alex/more-distributions
more distributions
2 parents 040072e + df3bd5b commit 1f6d7d2

28 files changed

+1468
-2200
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = E203, E266, E501, W503, E741
2+
ignore = E501, W503
33
max-line-length = 88
44
max-complexity = 18
55
select = B,C,E,F,W,T4
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: conda-deployment
2+
3+
on: [push]
4+
5+
jobs:
6+
Main-package:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest]
11+
python-version: ["3.11"]
12+
env:
13+
OS: ${{ matrix.os }}
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: conda-incubator/setup-miniconda@v2
18+
with:
19+
mamba-version: "*"
20+
#use-mamba: true
21+
auto-update-conda: false
22+
environment-file: environment.yml
23+
auto-activate-base: false
24+
activate-environment: test
25+
python-version: ${{ matrix.python-version }}
26+
channels: conda-forge,defaults
27+
channel-priority: true
28+
show-channel-urls: true
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
architecture: x64
34+
35+
- name: Install dev-dependencies
36+
run: |
37+
python -m pip install -r requirements-dev.txt
38+
39+
- name: Run tests
40+
shell: bash -el {0}
41+
run: |
42+
conda info
43+
conda list
44+
conda config --show-sources
45+
conda config --show
46+
pytest -sv
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: gitHub-release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
create-release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Setup GitHub CLI
19+
run: |
20+
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
21+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
22+
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
23+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
24+
&& sudo apt update \
25+
&& sudo apt install gh -y
26+
27+
- name: Extract tag name
28+
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
29+
30+
31+
- name: Create GitHub Release
32+
id: create_release
33+
run: |
34+
gh release create $TAG_NAME --title "$TAG_NAME" --notes-from-tag
35+
env:
36+
GH_TOKEN: ${{ secrets.CREATE_RELEASE }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: pypi-deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
jobs:
11+
Run:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: ["3.9", "3.10", "3.11"]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.os }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
architecture: x64
25+
26+
- name: Install dependencies
27+
run: |
28+
pip install -r requirements.txt -r requirements-dev.txt
29+
python setup.py install
30+
31+
- name: Generate coverage report
32+
run: |
33+
python -m pytest -vvv --cov=statista --cov-report=xml
34+
35+
- name: Upload coverage reports to Codecov with GitHub Action
36+
uses: codecov/codecov-action@v3

.github/workflows/pypi-release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: pypi-release
5+
6+
on:
7+
workflow_dispatch:
8+
release:
9+
types: [released, published, created]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.x"
24+
- name: Install tools
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install setuptools wheel twine
28+
- name: Build and publish
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*
32+
env:
33+
TWINE_USERNAME: ${{ secrets.PYPI_USERS }}
34+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/pypi.yml

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

.github/workflows/ubuntu.yml

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

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fail_fast: true
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.1.0
4+
rev: v4.5.0
55
hooks:
66
- id: end-of-file-fixer
77
name: "[py - check] validate yaml"
@@ -51,14 +51,14 @@ repos:
5151
# args: [ -i, --wrap-summaries, "0" ]
5252

5353
- repo: https://github.com/PyCQA/pydocstyle
54-
rev: 6.1.1
54+
rev: 6.3.0
5555
hooks:
5656
- id: pydocstyle
5757
name: "[py - check] pydocstyle"
5858
files: ^Hapi/
5959

6060
- repo: https://github.com/pycqa/flake8
61-
rev: 6.0.0
61+
rev: 6.1.0
6262
hooks:
6363
- id: flake8
6464
name: "[py - check] flake8"
@@ -83,7 +83,7 @@ repos:
8383

8484
# pre-commit-shell: Checks shell scripts against shellcheck.
8585
- repo: https://github.com/detailyang/pre-commit-shell
86-
rev: v1.0.6
86+
rev: 1.0.5
8787
hooks:
8888
- id: shell-lint
8989
name: "[bash - lint] shell-lint"

HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ History
3434
* add exponential and normal distributions
3535
* modify the pdf, cdf, and probability plot plots
3636
* create separate plot and confidence_interval modules.
37+
38+
0.4.0 (2023-011-23)
39+
------------------
40+
41+
* add Pearson 3 distribution
42+
* Use setup.py instead of pyproject.toml.
43+
* Correct pearson correlation coefficient and add documentation .
44+
* replace the pdf and cdf by the methods from scipy package.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pip install git+https://github.com/MAfarrag/statista
6565
## pip
6666
to install the last release you can easly use pip
6767
```
68-
pip install statista==0.3.0
68+
pip install statista==0.4.0
6969
```
7070

7171
Quick start

0 commit comments

Comments
 (0)