Skip to content

Commit c646db4

Browse files
committed
rename django-petra
1 parent a2ced7c commit c646db4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+77
-22
lines changed

.gitignore

+43
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,46 @@ Pipfile.lock
4949

5050
# Ignore the .vscode folder for Visual Studio Code
5151
.vscode/
52+
53+
# Additional Python virtual environments
54+
.python-version # pyenv
55+
.venv/
56+
env/
57+
ENV/
58+
pythonenv*
59+
60+
# Additional IDE/Editor files
61+
*.swp # Vim swap files
62+
*.swo
63+
*.swn
64+
.vim/
65+
*.sublime-* # Sublime Text
66+
.settings/ # Eclipse
67+
.project
68+
.classpath
69+
70+
# Additional testing/coverage files
71+
htmlcov/ # Coverage HTML reports
72+
.tox/ # Tox testing
73+
coverage.xml
74+
*.cover
75+
.hypothesis/
76+
77+
# Additional package/dependency files
78+
pip-log.txt
79+
pip-delete-this-directory.txt
80+
requirements.txt.lock
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
*.ipynb
85+
86+
# Documentation
87+
docs/_build/
88+
_docs/
89+
/site
90+
91+
# Logs and databases
92+
*.log
93+
*.sqlite
94+
*.db

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) [year] [copyright holders]
3+
Copyright (c) 2023-2024 code4mk.org
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

deploy.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
python3 setup.py publish
1+
#!/bin/bash
2+
set -e # Exit on error
3+
4+
echo "Starting deployment process..."
5+
echo "Publishing package using setup.py..."
6+
7+
python3 setup.py publish
8+
9+
echo "✅ Deployment completed successfully!"

drf_friend/__init__.py django_petra/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
__title__ = 'DRF Friend'
3-
__version__ = '0.0.29'
2+
__title__ = 'Django Petra'
3+
__version__ = '0.0.01'
44
__author__ = 'Mostafa'
55

66
# Version synonym
File renamed without changes.
File renamed without changes.
File renamed without changes.

drf_friend/core.py django_petra/core.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def bind_modules_app():
1414
'celery',
1515
]
1616

17-
INSTALLED_APPS.append('drf_friend.project')
18-
INSTALLED_APPS.append('drf_friend.cors')
17+
INSTALLED_APPS.append('django_petra.project')
18+
INSTALLED_APPS.append('django_petra.cors')
1919

2020
# Loop through each module directory
2121
for module_dir in the_modules_path.iterdir():
@@ -39,7 +39,7 @@ def bind_modules_urls():
3939

4040
# Initialize an empty list to store urlpatterns
4141
urlpatterns = []
42-
urlpatterns.append(path(f'hello-drf-friend/', include(('drf_friend.project.urls', 'drf_friend.project'))))
42+
urlpatterns.append(path(f'hello-django-petra/', include(('django_petra.project.urls', 'django_petra.project'))))
4343

4444
# Loop through each module directory
4545
for module_dir in the_modules_path.iterdir():
@@ -67,7 +67,7 @@ def show_modules_url():
6767

6868
# Initialize an empty list to store urlpatterns
6969
the_routes = []
70-
# urlpatterns.append(path(f'hello-drf-friend/', include(('drf_friend.project.urls', 'drf_friend.project'))))
70+
# urlpatterns.append(path(f'hello-drf-friend/', include(('django_petra.project.urls', 'django_petra.project'))))
7171

7272
# Loop through each module directory
7373
for module_dir in the_modules_path.iterdir():
@@ -97,10 +97,10 @@ def show_modules_url():
9797
# Return the urlpatterns list
9898
return the_routes
9999

100-
from drf_friend.initialize import init_drf_friend
100+
from django_petra.initialize import init_django_petra
101101

102102
def initialize():
103-
init_drf_friend()
103+
init_django_petra()
104104

105105

106106

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from drf_friend.initialize.initialize import (
1+
from django_petra.initialize.initialize import (
22
init_cors_middleware,
33
init_all_modules,
44
init_module_urls,
55
)
66

7-
def init_drf_friend():
7+
def init_django_petra():
88
init_cors_middleware()
99
init_all_modules()
1010
init_module_urls()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.py

+14-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get_version(package):
1212
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
1313

1414

15-
version = get_version('drf_friend')
15+
version = get_version('django_petra')
1616

1717
if sys.argv[-1] == 'publish':
1818
os.system("python setup.py sdist bdist_wheel")
@@ -26,7 +26,7 @@ def get_version(package):
2626
# print(" git push --tags")
2727
shutil.rmtree('dist')
2828
shutil.rmtree('build')
29-
shutil.rmtree('drf_friend.egg-info')
29+
shutil.rmtree('django-petra.egg-info')
3030
sys.exit()
3131

3232
def read(f):
@@ -35,25 +35,26 @@ def read(f):
3535

3636
setup(
3737
# Package metadata
38-
name='drf-friend',
39-
version='0.0.30',
40-
url='https://drf-friend.code4mk.org/',
38+
name='django-petra',
39+
version=version,
40+
url='https://django-petra.code4mk.org/',
4141
author='Mostafa Kamal',
4242
author_email='[email protected]',
43-
description='A utility package for Django Rest Framework (DRF) that makes API development easier for developers.',
43+
description='A utility package for Django that makes API development easier for developers.',
4444
long_description=read('README.md'),
4545
long_description_content_type='text/markdown',
46-
keywords=['django', 'drf', 'django-rest-framework', 'django-rest-api', 'drf_friend', 'code4mk'],
46+
keywords=['django', 'drf', 'django-rest-framework', 'django-rest-api', 'django-petra', 'code4mk'],
4747

4848
# Package configuration
4949
packages=find_packages(exclude=['tests*']),
50+
python_requires='>=3.6',
5051

5152
# Dependencies
5253
install_requires=[
5354
"redis",
5455
"boto3",
5556
"psycopg2-binary",
56-
"django-rest-framework",
57+
"djangorestframework",
5758
"python-dotenv",
5859
"celery",
5960
"beautifulsoup4",
@@ -66,14 +67,17 @@ def read(f):
6667
'Development Status :: 3 - Alpha',
6768
'Intended Audience :: Developers',
6869
'License :: OSI Approved :: MIT License',
70+
'Framework :: Django',
71+
'Framework :: Django :: 3.2',
6972
'Programming Language :: Python :: 3',
7073
'Programming Language :: Python :: 3.6',
7174
'Programming Language :: Python :: 3.7',
7275
'Programming Language :: Python :: 3.8',
7376
'Programming Language :: Python :: 3.9',
77+
'Operating System :: OS Independent',
7478
],
7579
project_urls={
76-
'Source': 'https://github.com/code4mk/drf-friend',
77-
'Changelog': 'https://github.com/code4mk/drf-friend',
80+
'Source': 'https://github.com/code4mk/django-petra',
81+
'Changelog': 'https://github.com/code4mk/django-petra/blob/main/CHANGELOG.md',
7882
},
7983
)

0 commit comments

Comments
 (0)