Skip to content

Commit ca890ca

Browse files
committed
first version distribution
1 parent bd204de commit ca890ca

File tree

8 files changed

+50
-1
lines changed

8 files changed

+50
-1
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
src/Py*

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# The package
2+
combinations is a package used to generate all possible combinations of a given length `k`
3+
on a given set. The set is given as a list, and `k` must be equal to 0 or positive.
4+
5+
# Usage examples
6+
```python
7+
from combs import combinations
8+
9+
l = [89,32,6,7]
10+
k = 2
11+
combs = combinations.find_combinations(l, k)
12+
print(combs)
13+
```
14+
Output :
15+
```
16+
[[89, 32], [89, 6], [89, 7], [32, 6], [32, 7], [6, 7]]
17+
```

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel"
5+
]
6+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[metadata]
2+
name = PyCombs-YM
3+
version = 1.0.0
4+
author = Yanis MANSOUR
5+
author_email = mansouryanis6@gmail.com
6+
description = A package that generates all possible combinations in a given set as a list
7+
long_description = file: README.md
8+
long_description_content_type = text/markdown
9+
url = https://github.com/yanismnsr/PyCombinations
10+
project_urls =
11+
Bug Tracker = https://github.com/yanismnsr/PyCombinations/issues
12+
classifiers =
13+
Programming Language :: Python :: 3
14+
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15+
Operating System :: OS Independent
16+
17+
[options]
18+
package_dir =
19+
= src
20+
packages = find:
21+
python_requires = >=3.0
22+
23+
[options.packages.find]
24+
where = src
File renamed without changes.
File renamed without changes.

tests/CombinationsTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22
import math
3-
from src.combinations import combinations
3+
from src.combs import combinations
44

55
def _combinationsNumber (n, k) :
66
return math.factorial(n) / (math.factorial(k) * math.factorial(n - k))

0 commit comments

Comments
 (0)