diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..5b99d4e --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,60 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../src/ficto')) + + +# -- Project information ----------------------------------------------------- + +project = 'Ficto' +copyright = '2023, Taeef Najib' +author = 'Taeef Najib' + +# The full version, including alpha/beta/rc tags +release = '0.0.4' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +html_theme_options = { + 'sticky_navigation': True, + 'navigation_depth': 8, + 'includehidden': True, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] \ No newline at end of file diff --git a/docs/config.rst b/docs/config.rst new file mode 100644 index 0000000..6ff8658 --- /dev/null +++ b/docs/config.rst @@ -0,0 +1,697 @@ +Writing Data Config File +--------------------------- + +We have 31 types of value that can be generated. + +.. _customseq: + +customseq +========= + +Generates a custom sequence of integers. + +Parameters: + - `start` (optional): Starting value of the sequence (default: 1). + - `step` (optional): Step size between values (default: 1). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customseq + datatype: int + start: 1 + step: 1 + name: 'ID' + pos: 1 + + +.. _firstname: + +firstname +========= + +Generates random first names. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: firstname + datatype: string + name: 'First Name' + pos: 2 + + +.. _lastname: + +lastname +======== + +Generates random last names. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: lastname + datatype: string + name: 'Last Name' + pos: 3 + + +.. _gender: + +gender +====== + +Generates random gender values. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: gender + datatype: string + name: 'Gender' + pos: 4 + + +.. _country: + +country +======= + +Generates random country names. + +Parameters: + - `countries` (optional): List of specific countries to choose from (default: ['US']). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: country + datatype: string + countries: ['US','UK'] + name: 'Country' + pos: 5 + + +.. _phonenumber: + +phonenumber +=========== + +Generates random phone numbers. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: phonenumber + datatype: string + name: 'Phone No.' + pos: 6 + + +.. _currency: + +currency +======== + +Generates random currency codes. + +Parameters: + - `currency` (optional): List of specific currency codes to choose from (default: ['USD']). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: currency + datatype: string + currency: ['USD', 'GBP', 'AUD', 'CAD'] + name: 'Currency' + pos: 7 + + +.. _customdate: + +customdate +========== + +Generates random dates within a specified range. + +Parameters: + - `start` (optional): Start date in 'DD/MM/YYYY' format (default: '01/01/1900'). + - `end` (optional): End date in 'DD/MM/YYYY' format (default: '31/12/2023'). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customdate + datatype: datetime + start: '01/01/1980' + end: '31/12/2006' + name: 'DOB' + pos: 8 + + +.. _customint: + +customint +========= + +Generates random integers within a specified range. + +Parameters: + - `start` (optional): Start value of the range (default: 0). + - `end` (optional): End value of the range (default: 100). + - `round` (optional): Number of decimal places to round to (default: 1). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customint + datatype: int + start: 10000 + end: 20000 + round: 1000 + name: 'Salary' + pos: 9 + + +.. _customfloat: + +customfloat +=========== + +Generates random floating-point numbers within a specified range. + +Parameters: + - `start` (optional): Start value of the range (default: 0.0). + - `end` (optional): End value of the range (default: 100.0). + - `round` (optional): Number of decimal places to round to (default: 2). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customfloat + datatype: float + start: 97.5 + end: 101.5 + round: 1 + name: 'Body Temp.' + pos: 10 + + +.. _customlist: + +customlist +========== + +Generates a random value from a custom list. + +Parameters: + - `values` (required): List of values to choose from. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customlist + datatype: string + values: ['A+', 'B+', 'AB+', 'O+', 'A-', 'B-', 'AB-', 'O-'] + name: 'Blood Group' + pos: 11 + + +.. _customuuid: + +customuuid +========== + +Generates random UUIDs. + +Parameters: + - `characterlimit` (optional): Maximum number of characters in the UUID (default: 10). + - `numeric` (optional): If True, generate a numeric UUID; otherwise, alphanumeric (default: False). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customuuid + datatype: string + characterlimit: 6 + numeric: True + name: 'Employee ID' + pos: 12 + + +.. _customlorem: + +customlorem +=========== + +Generates random Lorem Ipsum text. + +Parameters: + - `characterlimit` (optional): Maximum number of characters in the Lorem Ipsum text (default: 200). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customlorem + datatype: string + characterlimit: 20 + name: 'Feedback' + pos: 13 + + +.. _email: + +email +===== + +Generates random email addresses. + +Parameters: + - `emailprovider` (optional): List of email providers to choose from. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: email + datatype: string + emailprovider: ['gmail.com','yahoo.com','hotmail.com'] + name: 'Email' + pos: 14 + + +.. _website: + +website +======= + +Generates random website URLs. + +Parameters: + - `domain` (optional): List of domain extensions to choose from (default: ['.com']). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: website + datatype: string + domain: ['.com','.net','.org'] + name: 'URL' + pos: 15 + + +.. _organization: + +organization +============= + +Generates random organization names. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: organization + datatype: string + name: 'Company' + pos: 16 + + +.. _department: + +department +========== + +Generates random department names. + +Parameters: + - `customdept` (optional): List of custom department names to choose from. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: department + datatype: string + customdept: ['Marketing', 'Engineering', 'HR'] + name: 'Dept' + pos: 17 + + +.. _designation: + +designation +============ + +Generates random job titles. + +Parameters: + - `customdes` (optional): List of custom job titles to choose from. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: designation + datatype: string + customdes: ["Executive","Manager","Director"] + name: 'Designation' + pos: 18 + + +.. _passport: + +passport +========= + +Generates random passport numbers. + +Parameters: + - `country` (optional): Country for which the passport number should be generated (default: 'US'). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: passport + datatype: string + country: 'US' + name: 'Passport' + pos: 19 + + +.. _ssn: + +ssn +===== + +Generates random Social Security Numbers (SSNs). + +Parameters: + - `country` (optional): Country for which the SSN should be generated (default: 'US'). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: ssn + datatype: string + country: 'US' + name: 'SSN' + pos: 20 + + +.. _ccn: + +ccn +===== + +Generates random credit card numbers. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: ccn + datatype: string + name: 'Credit Card' + pos: 21 + + +.. _password: + +password +========= + +Generates random passwords. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: password + datatype: string + name: 'Password' + pos: 22 + + +.. _address: + +address +======== + +Generates random addresses. + +Parameters: + - `country` (optional): Country for which the address should be generated (default: 'US'). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: address + datatype: string + country: 'US' + name: 'Address' + pos: 23 + + +.. _lat: + +lat +==== + +Generates random latitude values. + +Parameters: + - `country` (optional): Country for which the latitude should be generated (default: 'US'). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: lat + datatype: string + country: 'US' + name: 'Latitude' + pos: 24 + + +.. _long: + +long +==== + +Generates random longitude values. + +Parameters: + - `country` (optional): Country for which the longitude should be generated (default: 'US'). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: long + datatype: string + country: 'US' + name: 'Longitude' + pos: 25 + + +.. _industry: + +industry +======== + +Generates random industry names. + +Parameters: + - `customindustry` (optional): List of custom industry names to choose from. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: industry + datatype: string + customindustry: ['Fashion and Retail', 'Telecom', 'Technology', 'Automotive', 'Media and Entertainment'] + name: 'Industry' + pos: 26 + +.. _customtime: + +customtime +========== + +Generates random times within a specified range. + +Parameters: + - `start` (optional): Start time (default: '08:00:00'). + - `end` (optional): End time (default: '23:59:59'). + - `clock_type` (optional): Clock type (12 or 24, default: 24). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customtime + datatype: datetime + start: '08:00:00' + end: '23:59:59' + clock_type: 24 + name: 'Time of Arrival' + pos: 27 + +.. _customyear: + +customyear +========== + +Generates random years within a specified range. + +Parameters: + - `start` (optional): Start year (default: 1900). + - `end` (optional): End year (default: 2023). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: customyear + datatype: int + start: 1900 + end: 2023 + name: 'Year' + pos: 28 + + +.. _custommonth: + +custommonth +============ + +Generates random month names or numbers. + +Parameters: + - `start` (optional): Start month (default: 1). + - `end` (optional): End month (default: 12). + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: custommonth + datatype: string + start: 1 + end: 12 + name: 'Month' + pos: 29 + + +.. _prodname: + +prodname +======== + +Generates random product names. + +Parameters: + None. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: prodname + datatype: string + name: 'Product' + pos: 30 + + +.. _prodcat: + +prodcat +======= + +Generates random product categories. + +Parameters: + - `customcats` (optional): List of custom product categories to choose from. + +Example: +^^^^^^^^ + +.. code-block:: yaml + + type: prodcat + datatype: string + customcats: ["Electronics", "Clothing", "Home and Kitchen", "Books", "Toys"] + name: 'Category' + pos: 31 \ No newline at end of file diff --git a/docs/ficto.core.rst b/docs/ficto.core.rst new file mode 100644 index 0000000..ed06648 --- /dev/null +++ b/docs/ficto.core.rst @@ -0,0 +1,46 @@ +ficto.core package +================== + +Submodules +---------- + +ficto.core.generate module +-------------------------- + +This module provides functions to create synthetic data using a YAML configuration file. +It leverages the functionality from the `ficto.helper.data_module` for data sources and +`ficto.helper.builder` for generating data based on the specified configuration. + +Usage +~~~~~~~~~~~~~~~~~~~~~ +1. Use the `create_dataframe` function to generate synthetic data: + +.. code-block:: python + + data_config_path = "path/to/your/config.yaml" + num_rows = 1000 # Specify the number of rows needed in the DataFrame + synthetic_data = create_dataframe(data_config_path, num_rows) + +2. Customize the YAML configuration file according to your data generation requirements. + +Notes: + +* The `create_dataframe` function reads the configuration from a YAML file and generates synthetic data based on the specified column types and options. +* The module utilizes functions from `ficto.helper.data_module` and `ficto.helper.builder` to source data and generate synthetic values, respectively. + +Functions +~~~~~~~~~~~~~~~~~~~~~ +* `create_dataframe`: Creates a pandas DataFrame based on the configuration specified in a YAML file. + +.. automodule:: ficto.core.generate + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: ficto.core + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/ficto.helper.rst b/docs/ficto.helper.rst new file mode 100644 index 0000000..3adaa72 --- /dev/null +++ b/docs/ficto.helper.rst @@ -0,0 +1,107 @@ +ficto.helper package +==================== + +Submodules +---------- + +ficto.helper.builder module +--------------------------- + +This module contains a collection of functions that serve as builders for generating fictional data in various categories. +These functions can be used to create synthetic data for addresses, company names, credit cards, currencies, dates, departments, emails, +first names, genders, industries, last names, latitude and longitude coordinates, passport numbers, passwords, phone numbers, +product names, random dates, social security numbers (SSN), and websites. + +Functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* `generate_address`: Generates a fictional address. +* `generate_company_name`: Generates a fictional company name. +* `generate_credit_card`: Generates a fictional credit card number. +* `generate_currency`: Generates a fictional currency code. +* `generate_custom_month`: Generates a custom month value. +* `generate_custom_prodcats`: Generates custom product categories. +* `generate_custom_sequence`: Generates a custom sequence. +* `generate_custom_time`: Generates a custom time value. +* `generate_custom_year`: Generates a custom year value. +* `generate_customfloat`: Generates a custom floating-point number. +* `generate_customint`: Generates a custom integer. +* `generate_customlist`: Generates a custom list. +* `generate_customlorem`: Generates custom Lorem Ipsum text. +* `generate_customuuid`: Generates a custom UUID. +* `generate_department`: Generates a fictional department name. +* `generate_designation`: Generates a fictional job designation. +* `generate_email`: Generates a fictional email address. +* `generate_first_name`: Generates a fictional first name. +* `generate_gender`: Generates a fictional gender. +* `generate_industry`: Generates a fictional industry category. +* `generate_last_name`: Generates a fictional last name. +* `generate_latitude`: Generates a fictional latitude coordinate. +* `generate_longitude`: Generates a fictional longitude coordinate. +* `generate_passport_number`: Generates a fictional passport number. +* `generate_password`: Generates a fictional password. +* `generate_phone_number`: Generates a fictional phone number. +* `generate_product_name`: Generates a fictional product name. +* `generate_random_date`: Generates a random date. +* `generate_ssn`: Generates a fictional Social Security Number (SSN). +* `generate_website`: Generates a fictional website URL. + +Notes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +These functions are designed to facilitate the generation of diverse fictional data for testing, development, and educational purposes +within the `ficto` package. + +.. automodule:: ficto.helper.builder + :members: + :undoc-members: + :show-inheritance: + +ficto.helper.data\_module module +-------------------------------- + +This module contains predefined lists and dictionaries that can be used as data sources for generating fictional data. +These data sets cover various categories such as names, countries, companies, emails, passwords, industries, and product categories. + +Lists +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* `male_names`: A list of common male first names. +* `female_names`: A list of common female first names. +* `last_names`: A list of common last names. +* `country_latitudes`: A dictionary mapping country codes to latitude ranges. +* `country_longitudes`: A dictionary mapping country codes to longitude ranges. +* `company_prefix`: A list of prefixes for generating fictional company names. +* `company_suffix`: A list of suffixes for generating fictional company names. +* `email_1`, `email_2`, `email_3`: Lists of words used for generating fictional email addresses. +* `password_words_1`, `password_words_2`: Lists of common words for generating passwords. +* `default_departments`: A list of default department names. +* `default_industry`: A list of default industry categories. +* `default_product_categories`: A list of default product categories. + +Dictionaries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* `country_to_code`: A dictionary mapping country names to their ISO country codes. +* `country_to_currency`: A dictionary mapping country names to their currency codes. +* `passport_formats`: A dictionary mapping country codes to passport number formats. +* `ssn_formats`: A dictionary mapping country codes to social security number formats. +* `phone_formats`: A dictionary mapping country codes to phone number formats. +* `designation_mapping`: A dictionary mapping common designations to department names. +* `country_to_states_and_cities`: A dictionary mapping country codes to their states and cities. +* `product_names_dict`: A dictionary containing product names mapped to their respective categories. + + +Note +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This module serves as a centralized data source for various fictional data generation tasks within the `ficto` package. + +.. automodule:: ficto.helper.data_module + :members: + :undoc-members: + :show-inheritance: + +.. Module contents +.. --------------- + +.. .. automodule:: ficto.helper +.. :members: +.. :undoc-members: +.. :show-inheritance: diff --git a/docs/ficto.rst b/docs/ficto.rst new file mode 100644 index 0000000..3b62578 --- /dev/null +++ b/docs/ficto.rst @@ -0,0 +1,120 @@ +ficto package +============= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + ficto.core + ficto.helper + +ficto.main module +----------------- + +This script provides a command-line interface for generating synthetic data files based on a specified data configuration. +It utilizes the `ficto.core.generate` module to create a DataFrame and saves it to either a CSV or JSON file. + +Usage +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Run the script from the command line with the required arguments +.. code-block:: bash + + python main.py -d config.yaml -n 100 -f csv + +2. Customize the command-line arguments based on your data generation requirements + +Arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* `-d`, `--dataconfig`: Path to the YAML file for data configuration. +* `-n`, `--numrows`: Number of rows. +* `-f`, `--filetype`: Type of file to be generated (csv or json). + +Note +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* The script uses the `create_dataframe` function from `ficto.core.generate` to generate synthetic data. +* The generated file is saved in the 'data' sub-folder with a filename indicating the shape of the DataFrame, the number of rows, and the current timestamp. +* Supported file types are CSV and JSON. + +Data Config file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This YAML file serves as a template for configuring data generation in the `ficto` package. It defines various columns, +each specifying a unique aspect of synthetic data to be generated. The configuration options include data types, +constraints, and customization parameters for different types of data. + +Example: + +.. code-block:: yaml + + columns: + - name: ID + type: customseq + datatype: int + start: 1 + step: 1 + pos: 1 + - name: First Name + type: firstname + datatype: string + pos: 2 + - name: Last Name + type: lastname + datatype: string + pos: 3 + + +Column Types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* customseq: Generates a custom sequence of integers. +* firstname: Generates first names. +* lastname: Generates last names. +* gender: Generates gender values. +* country: Generates country names. +* phonenumber: Generates phone numbers. +* currency: Generates currency codes. +* customdate: Generates custom date values. +* customint: Generates custom integer values. +* customfloat: Generates custom float values. +* customlist: Generates values from a custom list. +* customuuid: Generates custom UUID values. +* customlorem: Generates custom Lorem Ipsum text. +* email: Generates email addresses. +* website: Generates website URLs. +* organization: Generates company names. +* department: Generates department names. +* designation: Generates job designations. +* passport: Generates passport numbers. +* ssn: Generates social security numbers. +* ccn: Generates credit card numbers. +* password: Generates passwords. +* address: Generates addresses. +* lat: Generates latitude values. +* long: Generates longitude values. +* industry: Generates industry names. +* customtime: Generates custom time values. +* customyear: Generates custom year values. +* custommonth: Generates custom month values. +* prodname: Generates product names. +* prodcat: Generates product categories. + + +Functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: ficto.main + :members: + :undoc-members: + :show-inheritance: + +.. Module contents +.. --------------- + +.. .. automodule:: ficto +.. :members: +.. :undoc-members: +.. :show-inheritance: diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..c39ca0e --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,49 @@ +.. Ficto documentation master file, created by + sphinx-quickstart on Sat Nov 25 01:44:43 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Ficto - Generate Realistic Demo Data +===================================== + +Ficto is a Python package that allows you to effortlessly generate realistic demo data in CSV or JSON format. With Ficto, you can create datasets with various column types by simply specifying them in a YAML configuration file. + +Features +---------------------------- +* Flexible Configuration: Customize your dataset by defining columns and their types in a YAML file. +* Multiple Formats: Generate datasets in either CSV or JSON format. +* Easy Installation: Install Ficto effortlessly with a single pip command. +* Realistic Demo Data: Create realistic data for testing purpose. +* Command-Line Interface (CLI): User-friendly CLI for quick and simple data generation. + +Installation & Quick Start +--------------------------- + +To install Ficto, use the following `pip` command: + + +.. code-block:: bash + + pip install ficto + +Generate a dataset by providing a YAML configuration file, the number of rows, and the desired file format. For example, to generate a CSV file with 100 rows using a configuration file named config.yaml, run the following command: + +.. code-block:: bash + + ficto -d config.yaml -n 100 -f csv + +This command generates a CSV file inside a newly created `data` folder with 100 rows of demo data based on your data configuration file (i.e.`config.yaml`). + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + modules + config + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..153be5e --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 0000000..084f3d4 --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,7 @@ +ficto +===== + +.. toctree:: + :maxdepth: 4 + + ficto diff --git a/setup.py b/setup.py index 1bd0124..97de93f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() -__version__ = "0.0.3" +__version__ = "0.0.4" REPO_NAME = "ficto" AUTHOR_USER_NAME = "taeefnajib" diff --git a/src/ficto/helper/data_module.py b/src/ficto/helper/data_module.py index 8453ed8..6e1cf9e 100644 --- a/src/ficto/helper/data_module.py +++ b/src/ficto/helper/data_module.py @@ -1,3 +1,4 @@ +# Mapping of countries to their corresponding country codes country_to_code = { "US": "US", "UK": "UK", @@ -33,7 +34,7 @@ "Greece": "GR" # Add more mappings as needed } - +# Mapping of countries to their corresponding currency codes country_to_currency = { "US": "USD", "UK": "GBP", @@ -69,7 +70,7 @@ "Greece": "EUR" # Add more country-to-currency mappings as needed } - +# Passport formats for various countries passport_formats = { "US": "AA######", "UK": "######", @@ -105,7 +106,7 @@ "Greece": "#########" # Add more formats for other countries as needed } - +# Social Security Number (SSN) formats for various countries ssn_formats = { "US": "###-##-####", "UK": "##-##-##", @@ -141,7 +142,7 @@ "Greece": "###-##-####" # Add more formats for other countries as needed } - +# Phone number formats for various countries phone_formats = { "US": "+1-XXX-XXX-XXXX", "UK": "+44-7XXX-XXX-XXX", @@ -177,7 +178,7 @@ "Greece": "+30-6XX-XXX-XXXX" # Add more formats for other countries as needed } - +# Mapping of departments to lists of job designations within each department designation_mapping = { "Marketing": [ "Jr. Executive", @@ -377,7 +378,7 @@ ], } - +# Mapping of countries to states and cities within each state country_to_states_and_cities = { "US": { "Alabama": [ @@ -656,7 +657,7 @@ ], }, } - +# Mapping of product categories to lists of product names within each category product_names_dict = { "Electronics": [ "Smartphone", @@ -1099,8 +1100,7 @@ "Art Apron", ], } - - +# List of common male first names male_names = [ "John", "Robert", @@ -1203,7 +1203,7 @@ "Antonio", "Danny", ] - +# List of common female first names female_names = [ "Mary", "Patricia", @@ -1301,6 +1301,7 @@ "Kristen", "Pauline", ] +# List of common last names last_names = [ "Smith", "Johnson", @@ -1405,7 +1406,7 @@ "Sullivan", "Wallace", ] - +# Dictionary mapping country codes to latitude ranges country_latitudes = { "US": (24.396308, 49.384358), # Contiguous United States "UK": (49.91224, 58.635), # United Kingdom @@ -1441,8 +1442,7 @@ "Greece": (35.81, 41.748) # Add more countries and latitude ranges as needed } - - +# Dictionary mapping country codes to longitude ranges country_longitudes = { "US": (-125.000000, -66.934570), # Contiguous United States "UK": (-8.646362, 1.763306), # United Kingdom @@ -1478,8 +1478,7 @@ "Greece": (20.869, 29.65) # Add more countries and longitude ranges as needed } - - +# List of company name prefixes company_prefix = [ "secure", "premium", @@ -1567,6 +1566,7 @@ "vivid", "integral", ] +# List of company name suffixes company_suffix = [ "tech", "metal", @@ -1593,7 +1593,7 @@ "group", "mechanics", ] - +# List of words for generating email addresses (email_1) email_1 = [ "beautiful", "opera", @@ -1607,6 +1607,7 @@ "mew", "love", ] +# List of words for generating email addresses (email_2) email_2 = [ "xoxo", "story", @@ -1620,8 +1621,9 @@ "silk", "heaven", ] +# List of words for generating email addresses (email_3) email_3 = ["a2z", "1010", "1996", "mozzarella", "x", "80s", "work", "uni"] - +# List of default department names default_departments = [ "Marketing", "Sales", @@ -1646,7 +1648,7 @@ "Data Science", ] - +# List of common words for generating passwords (password_words_1) password_words_1 = [ "apple", "david", @@ -1660,6 +1662,7 @@ "diamond", "eagle", ] +# List of common words and characters for generating passwords (password_words_2) password_words_2 = [ "123", "456", @@ -1674,7 +1677,7 @@ "000000", "sunshine", ] - +# List of default industry categories default_industry = [ "Fashion and Retail", "Telecom", @@ -1721,7 +1724,7 @@ "Blockchain", "Quantum Computing", ] - +# List of default product categories default_product_categories = [ "Electronics", "Clothing",