Skip to content

Commit e5f20ef

Browse files
fix: datetime, and prevent stackoverflow
1 parent bf70b0b commit e5f20ef

File tree

13 files changed

+434
-58
lines changed

13 files changed

+434
-58
lines changed

.bumpversion.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[bumpversion]
2+
current_version = 0.1.1
3+
commit = True
4+
tag = True
5+
6+
[increment:patch]
7+
files = pyproject.toml
8+
9+
[increment:minor]
10+
files = pyproject.toml
11+
12+
[increment:major]
13+
files = pyproject.toml

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea
2-
python_dd.egg-info
2+
src/dd_tmgbedu.egg-info/
33
dist
44
build
55
__pycache__
6+
key

Pipfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name = "pypi"
55

66
[packages]
77
pytest = "*"
8+
setuptools = "*"
9+
twine = "*"
10+
bumpversion = "*"
811

912
[dev-packages]
1013
twine = "*"

Pipfile.lock

Lines changed: 311 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.sh

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

index.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from python_dd.dd import dd, dump
1+
from datetime import datetime
2+
3+
from src.dd_tmgbedu.dd import dd, dump
24

35

46
class Permission:
@@ -13,6 +15,9 @@ def __init__(self, role):
1315

1416
class User:
1517
classy = 1
18+
example = None,
19+
dict = {}
20+
dob = None
1621

1722
@property
1823
def dyno(self):
@@ -23,13 +28,15 @@ def __init__(self):
2328
self._password = 'password'
2429
self.__token = 'token'
2530
self.role = Role('admin')
31+
self.dob = datetime.now()
2632

2733
def fx(self):
2834
return 3
2935

3036

3137
dump("Hello Python")
3238
dump('')
39+
dump({})
3340

3441
dump(1)
3542
dump(1.123)
@@ -51,5 +58,5 @@ def fx(self):
5158
}
5259
})
5360
dump(User())
54-
61+
dump(None)
5562
# dd(range(0, 5))

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[project]
2+
name = "dd_tmgbedu"
3+
description="The missing `dd` function in python."
4+
readme = "README.md"
5+
version = "0.1.1"
6+
authors = [
7+
{ name = "Bedram Tamang", email = "tmgbedu@gmail.com" },
8+
]
9+
classifiers = [
10+
"Programming Language :: Python :: 3",
11+
"License :: OSI Approved :: MIT License",
12+
"Operating System :: OS Independent",
13+
]
14+
requires-python = ">=3.11"
15+
16+
[project.urls]
17+
Homepage = "https://github.com/bedus-creation/python_dd"
18+
Issues = "https://github.com/bedus-creation/python_dd/issues"

readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ pip install python_dd
1111
```
1212

1313
### Uses
14+
1415
```python
15-
from python_dd.dd import dd
16+
from src.dd_tmgbedu.dd import dd
1617

1718
dd("Hello")
1819
dd(1)
1920
dd(True, True, False, 1, 2)
2021
```
2122

22-
or
23+
or
2324

2425
```python
25-
from python_dd.dd import dump
26+
from src.dd_tmgbedu.dd import dump
2627

2728
dump("Hello")
2829
dump(1)

release.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Check if bumpversion argument is provided
4+
if [ -z "$1" ]; then
5+
echo "Please provide the version bump type (patch, minor, major)."
6+
exit 1
7+
fi
8+
9+
# Run bumpversion with the argument provided (e.g., patch, minor, major)
10+
bumpversion $1
11+
12+
# Clean the dist directory
13+
rm -f -r dist/*
14+
15+
# Build the package
16+
python3 -m build
17+
18+
# Upload to PyPI using twine
19+
twine upload dist/*

setup.py

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

0 commit comments

Comments
 (0)