Skip to content

Commit d99077c

Browse files
Merge branch 'dev' | V3.0.2 released
2 parents ac8a25e + 53365a4 commit d99077c

File tree

13 files changed

+97
-42
lines changed

13 files changed

+97
-42
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ All notable changes to this project will be documented in this file. The format
44

55
## Changelog
66

7-
## [V3.0.0] - Major Release
7+
## [V3.0.2] - Minor Release -
8+
9+
- [x] Updating API Documentation
10+
- [x] Get Gender Specific Data
11+
12+
## [V3.0.1] - Minor Release - 18-11-2022
13+
14+
- [x] Code refactor for better readability
15+
- [x] Link updated for pypi website
16+
## [V3.0.0] - Major Release - 09-11-2022
817

918
- [x] Function names changed
1019
- [x] Gender can be passed as a parameter

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ We love your input! We want to make contributing to this project as easy and tra
1515
### Making a PR
1616

1717
> - Make sure you have been assigned the issue to which you are making a PR.
18-
> - If you make PR before being assigned, It may be labeled `invalid` and closed without merging.
18+
> - If you make PR before being assigned, It may be labelled `invalid` and closed without merging.
1919
2020
- Fork the repo and clone it on your machine.
2121
- Add a upstream link to main branch in your cloned repo
@@ -27,7 +27,7 @@ We love your input! We want to make contributing to this project as easy and tra
2727
- Keep your cloned repo upto date by pulling from upstream (this will also avoid any merge conflicts while committing new changes)
2828

2929
```sh
30-
git pull upstream master
30+
git pull upstream dev
3131
```
3232

3333
- Create your feature branch

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
<p align="center">
2+
<a href="https://py-contributors.github.io/audiobook/"><img src="https://capsule-render.vercel.app/api?type=rect&color=009ACD&height=100&section=header&text=RandomProfileGenerator3.0.1&fontSize=40%&fontColor=fffff" alt="website title image"></a>
3+
<h2 align="center">👉 Python Module To Generate Random Profile Data 👈</h2>
4+
</p>
15

2-
<h1 align="center">
3-
<a href="https://pypi.org/project/random-profile/">
4-
Random Profile Generator
5-
</h1>
6-
7-
<h4 align="center">Python Module To Generate Random Profile Data</h4>
6+
<p align="center">
7+
<a href="https://twitter.com/pycontributors"><img src="https://img.shields.io/twitter/follow/pycontributors?style=social" alt="Twitter" /></a>
8+
<a href="https://github.com/codeperfectplus?tab=followers"><img src="https://img.shields.io/github/followers/codeperfectplus.svg?style=social&label=Follow&maxAge=2592000"/></a>
9+
</p>
10+
</br>
811

912
<p align="center">
1013
<img src="https://img.shields.io/pypi/v/random-profile.svg">

docs/command_line_usage.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,18 @@ Get Random Profile version:
8080
random_profile --version
8181
8282
random-profile 0.2.3
83+
84+
85+
Get Only Gender Specific Profiles:
86+
------------
87+
88+
To get gender specific profiles, use the `-ma` or `-fe` flags.
89+
90+
.. code-block:: bash
91+
92+
# n = number of random profiles, p = profile -ma male
93+
random_profile -n 10 -p -ma
94+
95+
# n = number of random profiles, p = profile -fe female
96+
random_profile -n 10 -p -fe
97+

docs/conf.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
from datetime import datetime
1+
import sys
2+
sys.path.append('.')
23

4+
from datetime import datetime
35

4-
project = 'Random Profile Generator'
5-
description = 'A random profile generator for testing purposes.'
6-
author = 'Deeapk Raj'
7-
release = '1.0.1'
6+
__title__ = 'RandomProfileGenerator'
7+
__package_name__ = 'random_profile'
8+
__version__ = '3.0.2'
9+
__description__ = "Python Module To Generate Random Profile Data"
10+
__email__ = "[email protected]"
11+
__author__ = 'Deepak Raj'
12+
__github__ = 'https://github.com/Py-Contributors/RandomProfileGenerator'
13+
__pypi__ = 'https://pypi.org/project/random-profile/'
14+
__license__ = 'MIT License'
15+
16+
project = __package_name__
17+
description = __description__
18+
author = __author__
19+
release = __version__
820
year = datetime.now().year
921
copyright = "{} Deepak Raj".format(year)
1022
source_suffix = ".rst"
@@ -21,17 +33,11 @@
2133

2234
autosectionlabel_prefix_document = True
2335

24-
html_theme = 'sphinx_rtd_theme' # 'pydata_sphinx_theme' 'alabaster'
36+
html_theme = 'sphinx_rtd_theme'
2537

2638
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv']
2739
html_sidebars = {'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']}
2840

29-
rst_epilog = """
30-
.. |project| replace:: Random Profile Generator
31-
.. |copyright| replace:: Copyright © {} Deepak Raj
32-
.. | community | replace:: `Py-Contributors <https://github.com/py-contributors/>`_
33-
""".format(year)
34-
3541
# epub settings
3642
epub_basename = project
3743
epub_theme = 'epub'

random_profile/__about__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__title__ = 'RandomProfileGenerator'
2+
__package_name__ = 'random_profile'
3+
__version__ = '3.0.2'
4+
__description__ = "Python Module To Generate Random Profile Data"
5+
__email__ = "[email protected]"
6+
__author__ = 'Deepak Raj'
7+
__github__ = 'https://github.com/Py-Contributors/RandomProfileGenerator'
8+
__pypi__ = 'https://pypi.org/project/random-profile/'
9+
__license__ = 'MIT License'

random_profile/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from random_profile.main import RandomProfile
1+
from random_profile.main import RandomProfile, __version__
22

3-
__all__ = ["RandomProfile"]
3+
__all__ = [RandomProfile, __version__]

random_profile/api.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from pydantic import create_model
66

77
sys.path.append('.')
8-
from random_profile.main import RandomProfile, VERSION
8+
from random_profile.main import RandomProfile
9+
from random_profile.__about__ import __version__
910

1011
# random_profile==0.2.3 required
1112
rp = RandomProfile()
@@ -17,7 +18,7 @@
1718
metadata = {
1819
"status": "200",
1920
"message": "Success",
20-
"version": VERSION,
21+
"version": __version__,
2122
"author": "Deepak Raj",
2223
"author_email": "[email protected]",
2324
"github": "https://github.com/codeperfectplus"}
@@ -28,7 +29,8 @@
2829

2930

3031
@app.get("/")
31-
def index():
32+
def home():
33+
""" just a home page """
3234
return metadata
3335

3436

@@ -156,7 +158,7 @@ def custom_openapi():
156158
return app.openapi_schema
157159
openapi_schema = get_openapi(
158160
title="Random Profile Generator API",
159-
version=VERSION,
161+
version=__version__,
160162
description="Python Module To Generate Random Profile Data",
161163
routes=app.routes,
162164
)

random_profile/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
sys.path.append('.')
88

99
from random_profile.main import RandomProfile
10-
from random_profile.main import VERSION
10+
from random_profile.__about__ import __version__
1111
from random_profile.api import start_server
12-
from enums.gender import Gender
12+
from random_profile.enums.gender import Gender
1313

1414
parser = argparse.ArgumentParser()
15-
parser.add_argument('-v', '--version', action='version', version=VERSION)
15+
parser.add_argument('-v', '--version', action='version', version=__version__)
1616
parser.add_argument('--repeat', help='Repeat the output', action='store_true')
1717
parser.add_argument('--server', help='Start server', action='store_true')
1818
parser.add_argument('--port', help='Port number', type=int, default=8000)

random_profile/enums/gender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from enum import Enum
22

33

4-
# class syntax
54
class Gender(Enum):
5+
""" Gender Enum Class """
66
MALE = "Male"
77
FEMALE = "Female"

0 commit comments

Comments
 (0)