diff --git a/Dockerfile b/Dockerfile index 0b2d6a75..b13a4b77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,41 @@ -FROM python:3.11-slim - -# Install dependencies -RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 libsasl2-dev curl gcc libldap2-dev libpq-dev python3-dev\ - - && DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} \ - && mkdir -p $DOCKER_CONFIG/cli-plugins \ - && curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose \ - && chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose - -# Set the working directory and copy the application files -WORKDIR /datahub -COPY . /datahub - -# Upgrade pip and install required Python packages -RUN python -m pip install --upgrade pip \ - && pip install python-ldap==3.3.1 \ - && pip install --upgrade pyopenssl \ - && pip install -r requirements.txt - -# Set environment variables -ENV PYTHONUNBUFFERED 1 - -# Expose port 8000 for the Django app -EXPOSE 8000 - -# Command to run the Django development server -CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] - +# ------------ Stage 1: Build dependencies ------------- + FROM python:3.11-slim as builder + + # Install system build dependencies + RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential gcc curl libpq-dev libsasl2-dev libldap2-dev python3-dev \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + + # Create a virtual environment + RUN python -m venv /opt/venv + ENV PATH="/opt/venv/bin:$PATH" + + # Copy and install Python dependencies + COPY requirements.txt . + RUN pip install --upgrade pip \ + && pip install --no-cache-dir python-ldap==3.3.1 \ + && pip install --no-cache-dir pyopenssl \ + && pip install --no-cache-dir -r requirements.txt + + # ------------ Stage 2: Final minimal image ------------- + FROM python:3.11-slim + + WORKDIR /app + + # Install runtime dependencies only + RUN apt-get update && apt-get install -y --no-install-recommends \ + ffmpeg libsm6 libxext6 libsasl2-dev libldap2-dev libpq-dev \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + + # Copy virtualenv and source code from builder + COPY --from=builder /opt/venv /opt/venv + ENV PATH="/opt/venv/bin:$PATH" + + # Copy app source code + COPY . . + + ENV PYTHONUNBUFFERED 1 + EXPOSE 8000 + + CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] + \ No newline at end of file diff --git a/Restructured_Agricultural_Data_with_Descriptions.csv b/Restructured_Agricultural_Data_with_Descriptions.csv deleted file mode 100644 index 669ef22b..00000000 --- a/Restructured_Agricultural_Data_with_Descriptions.csv +++ /dev/null @@ -1,235 +0,0 @@ -Category,Subcategory,Description,title -Cereals,Maize,"Maize, also known as corn, is a widely cultivated cereal grain that is native to the Americas. It is a versatile crop that is consumed in various forms, such as as a vegetable, grain, or feed for livestock. Maize plants can grow up to several meters in height and produce large, elongated ears that are covered in rows of kernels. The kernels come in a range of colors, including yellow, white, and blue, and can be used in an array of culinary dishes and products. Maize is not only a staple food source for many cultures but also serves as an important ingredient in various industries, such as biofuel production and animal feed.","""The Essentials of Successful Maize Farming: A Comprehensive Guide for Farmers""" -Cereals,Paddy,"Paddy is a grassy field where rice is cultivated, typically found in tropical and subtropical regions. The vibrant green landscape of a paddy field is characterized by flooded or waterlogged conditions to support the growth of rice plants. These fields are an integral part of traditional agricultural practices in many Asian countries, offering a picturesque view of lush greenery and waterways. Paddy fields require careful irrigation and maintenance to ensure a successful rice harvest, making them a vital component of the agricultural landscape in many parts of the world.","""Maximizing Yields: Essential Tips for Paddy Farmers""" -Cereals,Wheat,"Wheat is a versatile and widely cultivated cereal grain that is a staple food in many cultures around the world. It is known for its nutrient-rich properties, providing essential vitamins, minerals, and fiber. Wheat is commonly used in a variety of culinary applications, from baking bread and cakes to making pasta and pastries. With its distinctive nutty flavor and chewy texture, wheat is a highly versatile ingredient that adds depth and nutrition to a wide array of dishes. Whether enjoyed as whole grains, flour, or bran, wheat remains a popular choice for its delicious taste and health benefits.","""The ABCs of Wheat Farming: A Comprehensive Guide for Farmers""" -Cereals,Barley,"Barley is a versatile cereal grain with a rich nutty flavor and a chewy texture. It is a staple ingredient in many cuisines around the world and is commonly used in soups, stews, salads, and as a base for beer and spirits. Barley is known for its high fiber content, vitamins, and minerals, making it a nutritious addition to any diet. Harvested from the grass family, barley is a resilient and hardy crop that thrives in various climates and conditions. With its earthy and wholesome taste, barley adds depth and heartiness to a wide range of dishes, making it a favorite in both traditional and modern cooking.","""Barley Farming 101: A Comprehensive Guide for Beginner Farmers""" -Cereals,Boro paddy,"Boro paddy is a short-grain variety of rice known for its beautiful light brown color and aromatic fragrance. It is cultivated mainly in the northeastern region of India and is a staple food for many communities in the region. Boro paddy is prized for its long and slender grains, which cook up fluffy and tender, making it ideal for a wide variety of dishes. With a slightly nutty flavor and a pleasing texture, Boro paddy is a versatile ingredient that can be used in both savory and sweet recipes. It is rich in nutrients and is a great source of energy, making it a popular choice for a healthy and satisfying meal."," ""The Essential Guide to Boro Paddy Farming""" -Cereals,Oats,"Oats are a popular whole grain known for their numerous health benefits and versatility in cooking. They are a staple ingredient in breakfast dishes like oatmeal, granola, and overnight oats, as well as used in baking recipes for cookies, bread, and bars. Oats are rich in fiber, vitamins, and minerals, making them a nutritious choice for promoting heart health, digestion, and overall wellbeing. With a slightly nutty flavor and chewy texture, oats can be enjoyed in both sweet and savory dishes, making them a versatile and satisfying addition to any diet.","""The Essential Guide to Growing and Harvesting Oats: A Farmer's Manual""" -Cereals,Baby Corn/ Sweet corn,"Baby corn, also known as young corn or mini corn, is a vegetable harvested from corn plants early in their growth stage, typically before the kernels mature. With a tender texture and mild flavor, baby corn is a popular ingredient in various cuisines, especially in Asian dishes. Its small size and delicate appearance make it an appealing addition to stir-fries, salads, and appetizers. Baby corn is not only visually appealing but also packed with nutrients such as vitamins, minerals, and dietary fiber, making it a healthy choice for adding a nutritious touch to your meals.","""Growing Sweet Corn: A Beginner's Guide""" -Cereals,Quinoa,"Quinoa, often referred to as a superfood, is a highly nutritious and versatile grain-like seed originating from South America. Known for its exceptional health benefits, quinoa is packed with protein, fiber, vitamins, and minerals. Its delicate texture and slightly nutty flavor make it a popular choice for a wide range of dishes, from salads and pilafs to breakfast bowls and baked goods. Additionally, quinoa is gluten-free and easy to digest, making it an excellent option for those with dietary restrictions or seeking a healthy alternative to traditional grains. Incorporating quinoa into your diet can enhance overall well-being and add a delicious and nutritious element to your meals.","""Quinoa Farming 101: A Beginner's Guide for Aspiring Farmers""" -Pulses,Horse Gram,"Horse gram, scientifically known as Macrotyloma uniflorum, is a legume native to the Indian subcontinent and is cultivated in various other regions of the world. This small, oval-shaped pulse has a nutty and earthy flavor, making it a popular ingredient in traditional cuisines. Horse gram is a rich source of protein, dietary fiber, and essential nutrients such as iron, calcium, and antioxidants. It is highly valued for its medicinal properties and is believed to have various health benefits, including aiding in weight management, improving digestion, and reducing cholesterol levels. Whether used in soups, stews, or salads, horse gram is a versatile and nutritious ingredient that adds a unique flavor to a wide range of dishes.","""The Ultimate Guide to Cultivating Horse Gram: A Comprehensive Manual for Successful Farming""" -Pulses,Lentil,"Lentils are small, lens-shaped legumes that come in a variety of colors, including green, brown, black, and red. They are a nutritious and versatile ingredient commonly used in cooking around the world. Lentils are low in calories but high in protein, fiber, and various vitamins and minerals, making them a popular choice for those looking to add plant-based protein to their diet. They have a slightly nutty flavor and a firm texture when cooked, making them ideal for soups, stews, salads, and more. Lentils are easy to prepare and can be a delicious and hearty addition to any meal."," ""Lentil Farming 101: A Comprehensive Guide for New Farmers""" -Pulses,Pulses cultivation,"Pulses cultivation involves the methodical planting, nurturing, and harvesting of leguminous crops such as chickpeas, lentils, peas, and beans. These nutrient-dense crops are vital sources of protein, fiber, and essential nutrients in many diets around the world. Pulses cultivation typically requires well-drained soil, sufficient sunlight, and adequate moisture for optimal growth. Farmers may employ sustainable agricultural practices such as crop rotation and intercropping to promote soil health and maximize yields. Pulses cultivation plays a crucial role in sustainable agriculture, as these crops have the ability to fix nitrogen in the soil, reducing the need for synthetic fertilizers. Harvested pulses can be consumed as whole grains, ground into flour, canned, or dried for long-term storage, making them versatile ingredients in a wide range of culinary dishes.","""Maximizing Yield: A Guide to Successful Pulses Cultivation""" -Pulses,Pigeon Pea,"Pigeon pea, scientifically known as Cajanus cajan, is a leguminous plant cultivated for its nutritious seeds. Also known as ""arhar dal"" or ""tuvar dal"" in Indian cuisine, pigeon pea is a versatile crop that is commonly used in cooking various dishes around the world. The plant features small, round, beige-colored seeds that are rich in protein, fiber, vitamins, and minerals. Pigeon pea plants have a woody stem and can grow up to 1-4 meters in height, producing clusters of yellow or red flowers. This drought-tolerant and nitrogen-fixing plant plays a crucial role in sustainable agriculture and provides essential nourishment in many cuisines.","""Pigeon Pea Farming 101: A Comprehensive Guide for Successful Cultivation""" -Pulses,Chickpea,"Chickpeas, also known as garbanzo beans, are nutritious legumes packed with protein, fiber, and essential vitamins and minerals. These round, beige beans have a slightly nutty flavor and a firm texture, making them a versatile ingredient in various cuisines around the world. Chickpeas can be used in salads, stews, soups, curries, and even ground into flour for baking. They are a popular choice for plant-based diets due to their high protein content and ability to be used as a meat substitute in dishes like falafel and veggie burgers. Chickpeas are also known for their health benefits, including aiding in digestion, reducing cholesterol, and promoting heart health."," ""Optimizing Chickpea Cultivation: Essential Strategies for Farmers""" -Pulses,Lathyrus,"Lathyrus, also known as sweet peas, are a genus of flowering plants in the legume family, Fabaceae. They are known for their colorful and fragrant blossoms that come in a range of hues including pink, purple, white, and red. Lathyrus plants typically have delicate tendrils that help them climb and trail, making them popular choices for vertical gardens and hanging baskets. These elegant flowers are a favorite among gardeners for their graceful appearance and sweet scent, making them a charming addition to any garden or flower arrangement.","""Growing Lathyrus: A Comprehensive Guide for Farmers""" -Pulses,Rajma (Beans),"Rajma, also known as kidney beans, are legumes that are popular in Indian cuisine for their robust flavor and creamy texture. These beans are medium-sized, oval-shaped, and have a reddish-brown color with a smooth skin. Rajma are a versatile ingredient that can be used in a variety of dishes, from hearty curries to flavorful salads. They are rich in protein, fiber, and essential nutrients, making them a nutritious addition to any meal. When cooked, rajma have a tender yet firm texture, and they absorb flavors well, making them a favorite ingredient in many vegetarian and vegan dishes. Whether simmered in a spicy tomato-based gravy or incorporated into a zesty bean salad, rajma adds depth and heartiness to any dish.","""The Ultimate Guide to Growing Healthy Rajma Beans: A Farmer's Handbook""" -Pulses,Black gram,"Black gram, also known as urad dal or black lentil, is a small, black-skinned legume that is widely consumed in South Asian cuisine. This pulse is rich in nutrients such as protein, fiber, and minerals like iron, magnesium, and potassium. It has a rich, nutty flavor and creamy texture when cooked, making it a popular ingredient in curries, stews, and dals. Black gram is often used in Indian dishes like dal makhani, idli, and dosa, and is a staple in vegetarian and vegan diets due to its high protein content. It is also valued for its health benefits, including aiding digestion, promoting heart health, and boosting energy levels. Harvested from the Vigna mungo plant, black gram is a versatile and nutritious ingredient that adds depth and flavor to a wide variety of dishes."," ""Maximizing Yields: A Comprehensive Guide to Black Gram Cultivation""" -Pulses,Mothbean,"Mothbean, also known as Matki or Turkish gram, is a small, brown legume that is popular in South Asian and Middle Eastern cuisines. This nutrient-dense pulse is rich in protein, fiber, and various vitamins and minerals, making it a valuable addition to a balanced diet. Mothbeans have a nutty flavor and a firm texture when cooked, making them versatile for use in soups, stews, curries, salads, and other dishes. Additionally, they are easy to cook and digest, making them a convenient and healthy choice for plant-based diets."," ""Growing Mothbeans: A Comprehensive Guide for Farmers""" -Pulses,Cowpea,"Cowpea, also known as black-eyed pea or southern pea, is a drought-tolerant and heat-loving legume that is widely grown for its nutritious seeds. This annual plant produces clusters of creamy white, pink, or purple flowers which develop into long pods containing edible seeds. The seeds are a good source of protein, fiber, and essential vitamins and minerals. Cowpeas are versatile in the kitchen and can be used in soups, stews, salads, and as a side dish. They are easy to cultivate and are highly valued for their ability to fix nitrogen in the soil, making them a beneficial crop for sustainable agriculture practices.","""Essential Guide to Growing Cowpeas: A Farmer's Perspective""" -Pulses,Green Gram,"Green Gram, also known as mung bean or moong dal, is a small green legume that is native to India but is commonly cultivated in various parts of Asia. This highly nutritious pulse is a staple in many cuisines around the world due to its delicate flavor and versatility in cooking. Green Gram is rich in protein, fiber, vitamins, and minerals, making it a popular choice for vegetarian and vegan diets. It is often used in soups, curries, salads, and sprouts, and is known for its easy digestibility and health benefits. With its earthy taste and numerous culinary possibilities, Green Gram is a wholesome and nutritious ingredient that can be enjoyed in a variety of dishes.","""Growing Green Gram: A Comprehensive Guide for Farmers""" -Pulses,Peas,"Peas are small, spherical legumes that are commonly consumed as a vegetable. They are known for their mildly sweet flavor and smooth texture. Peas are a versatile ingredient that can be enjoyed fresh, frozen, or dried, and are a popular addition to a wide variety of dishes, from soups and salads to stir-fries and pasta dishes. Rich in vitamins, minerals, and fiber, peas are not only delicious but also nutritious, making them a healthy choice for adding color and flavor to your meals."," ""Peas Farming 101: A Comprehensive Guide for New Farmers""" -Pulses,kabuli chana (White chickpea),"Kabuli chana, also known as white chickpeas, is a versatile legume known for its mild, nutty flavor and buttery texture. These round, cream-colored beans are a popular ingredient in various cuisines worldwide, prized for their high protein and fiber content. Kabuli chana can be cooked in stews, curries, salads, and dips, or roasted and seasoned as a crunchy snack. With a firm texture that holds up well in cooking, kabuli chana is a nutritious and delicious addition to any meal."," ""Maximizing Yields: A Guide to Cultivating Kabuli Chana (White Chickpea)""" -Pulses,Ricebean (Rajmoong),"Ricebean, also known as Rajmoong, is a legume crop that belongs to the Vigna genus. It is a versatile and nutritious crop that is popular in Asian cuisine. The ricebean plant features slender pods containing small, oval-shaped seeds that are rich in protein, fiber, and essential nutrients. With a delicate, nutty flavor, ricebeans can be cooked and used in various dishes such as soups, curries, salads, and stews. This small but mighty legume offers numerous health benefits and is a valuable addition to a balanced diet."," ""The Ultimate Guide to Ricebean (Rajmoong) Farming""" -Oilseeds,Linseed (Flaxseed),"Linseed, also known as flaxseed, is a small, oval-shaped seed that comes from the flax plant. It has a mild, nutty flavor and is a nutrient-dense food source packed with essential nutrients like omega-3 fatty acids, fiber, and antioxidants. Linseed is a versatile ingredient that can be used in a variety of dishes, such as smoothies, baked goods, or as a topping for salads and yogurt. It is also commonly used to make flaxseed oil, which has numerous health benefits. Linseed is known for its potential health benefits, including improved heart health, digestion, and reduced inflammation.","""Maximize Your Yields: A Beginner's Guide to Growing Linseed (Flaxseed)""" -Oilseeds,Mustard,"Mustard is a versatile condiment with a tangy and slightly spicy flavor profile. It is made from ground mustard seeds mixed with vinegar, water, and various seasonings depending on the type. Mustard can range in color from bright yellow to dark brown, with different intensities of heat. It is commonly used as a topping for hot dogs and sandwiches, as well as in salad dressings, marinades, and sauces. Mustard adds a bold and zesty kick to dishes, making it a popular staple in many kitchens around the world.","""Mastering Mustard Farming: Essential Guide for Farmers""" -Oilseeds,Niger (Sarguja),"Niger National Park, also known as Sarguja National Park, is a pristine protected area located in the Sarguja district of Chhattisgarh, India. This park is renowned for its diverse flora and fauna, including rare and endangered species like tigers, leopards, elephants, and various species of birds. The park offers a mix of dense forests, grasslands, and water bodies, creating a unique habitat that attracts nature enthusiasts and wildlife lovers from around the world. Visitors can explore the park through guided safaris, nature walks, and bird watching activities, providing a memorable and immersive experience in the heart of nature.","""Optimizing Farming Practices in Niger (Sarguja): A Guide for Farmers""" -Oilseeds,Sunflower,"Sunflowers are iconic and vibrant flowers known for their bright yellow petals and dark centers, resembling the sun. These stunning blooms can grow to impressive heights and have a unique ability to track the sun's movements throughout the day. Sunflowers symbolize adoration, loyalty, and longevity, making them a popular choice for bouquets and floral arrangements. With their cheerful appearance and sunny disposition, sunflowers are sure to brighten up any garden or space."," ""Sunflower Cultivation Guide: Growing Tips and Best Practices for Farmers""" -Oilseeds,Safflower (Kusum),"Safflower, also known as Kusum, is an annual flowering plant that belongs to the Asteraceae family. This plant is native to the Mediterranean, Middle East, and Central Asia regions, and is cultivated in many parts of the world for its culinary, medicinal, and ornamental uses. The safflower plant has bright yellow, orange, or red flowers that bloom in summer, attracting pollinators such as bees and butterflies. The seeds of the safflower plant are rich in oil, which is commonly used in cooking and as a natural dye. Safflower is also known for its medicinal properties, with the oil being used in traditional medicine for its anti-inflammatory and antioxidant benefits. The plant is easy to grow and requires well-drained soil and full sun to thrive. With its vibrant flowers and versatile uses, safflower is a valuable addition to any garden or landscape.","""Maximizing Profit with Safflower: A Comprehensive Guide for Kusum Farmers""" -Oilseeds,Sesame,"Sesame is a flowering plant that produces small, oval-shaped seeds that are commonly used in culinary applications. The seeds are known for their rich, nutty flavor and are often used as a topping for breads, pastries, and other baked goods. Sesame seeds can also be ground into a paste known as tahini, which is a key ingredient in dishes like hummus. In addition to their culinary uses, sesame seeds are also popular in traditional medicine and are believed to have various health benefits. The plant itself has small, bell-shaped flowers and can grow up to three feet tall. Sesame is cultivated in many parts of the world and is a versatile ingredient in many cuisines.","""Optimizing Sesame Farming: A Comprehensive Guide for Farmers""" -Oilseeds,Groundnut,"Groundnut, also known as peanut, is a versatile legume that is grown for its edible seeds. This plant belongs to the Fabaceae family and is native to South America, but it is now cultivated in many parts of the world. Groundnuts are an excellent source of protein, essential nutrients, and healthy fats, making them a popular and nutritious snack. The plant itself has a distinctive growth habit with bright yellow flowers that develop into pods containing the seeds. Groundnuts are commonly used in cooking, baking, and for making peanut butter, providing a rich and nutty flavor to a variety of dishes. Additionally, groundnuts are often used in confectionery products and are a staple ingredient in many cuisines worldwide. Overall, groundnuts are a versatile and nutritious legume with a wide range of culinary uses.","""Complete Guide to Growing and Harvesting Groundnuts: A Farmer's Manual""" -Oilseeds,Castor,"The Castor is a versatile and durable piece of furniture that combines style and functionality. With a sleek design and smooth rolling casters, it provides convenience and mobility in any space. Made from high-quality materials, the Castor is built to last and can complement a variety of decor styles. Whether used as a side table, serving cart, or accent piece, the Castor is a practical and stylish addition to any room.","""The Ultimate Guide to Castor Farming: A Comprehensive Handbook for Farmers""" -Oilseeds,Taramira,"Taramira, also known as Garden Cress or Halim Seeds, is a small flowering plant that belongs to the mustard family. It is native to Western Asia and some parts of Europe. Taramira is known for its tiny, peppery leaves and seeds that are widely used in culinary applications for their unique flavor and health benefits. The plant has a delicate appearance with small white flowers and thin stems. Taramira seeds are rich in essential nutrients like iron, calcium, and vitamins, making them a popular ingredient in traditional dishes and herbal remedies. With a distinct peppery taste, Taramira adds a flavorful punch to salads, soups, and curries. Additionally, the plant is valued for its medicinal properties, known for aiding digestion and improving overall health.","""Maximizing Taramira Yield: A Comprehensive Guide for Farmers""" -Oilseeds,Rapeseed,"Rapeseed, also known as canola, is a vibrant yellow-flowering plant in the Brassicaceae family. It's cultivated primarily for its oil-rich seeds, which are a valuable source of edible oil and protein-rich meal. The plant's tall, slender stalks support clusters of small, four-petaled flowers that attract pollinators. Rapeseed is a hardy crop, able to thrive in diverse climates and soil conditions, making it a versatile and widely cultivated agricultural commodity. With its striking appearance and valuable yield, rapeseed plays a key role in the global oilseed industry.","""Maximizing Yield: A Rapeseed Farmer's Guide""" -Oilseeds,Soyabean,"Soybeans, also known as soya beans, are versatile and nutritious legumes that are popular in plant-based diets worldwide. They are a rich source of protein, fiber, vitamins, and minerals, making them a valuable addition to a balanced diet. With a mild, nutty flavor, soybeans can be consumed in various forms such as tofu, tempeh, soy milk, edamame, and soy sauce. They are also used as a key ingredient in many meat alternatives, providing a sustainable protein source for vegetarians and vegans. Soybeans are known for their numerous health benefits, including heart health, bone health, and improved digestion. Overall, soybeans are a versatile and nutrient-dense food that can be enjoyed in a variety of dishes for their taste and health-promoting properties."," ""Soyabean Farming 101: A Comprehensive Guide for Beginners""" -Millets,Little Millet,"Little Millet, scientifically known as Panicum sumatrense, is a small-grained, gluten-free cereal that belongs to the Poaceae family. It is widely cultivated in India, Africa, and Southeast Asia. Little Millet is a highly nutritious grain with a mild, nutty flavor, making it a popular choice for alternative grains in cooking. It is rich in essential nutrients such as fiber, protein, iron, and antioxidants. This grain is also easy to digest and is known for its low glycemic index, making it a great choice for diabetics and those looking to manage their blood sugar levels. Little Millet can be used in a variety of dishes, including porridges, salads, stews, and baked goods, offering a versatile and nutritious alternative to traditional grains.","""The Ultimate Guide to Little Millet Farming: Everything Farmers Need to Know""" -Millets,Pearl Millet,"Pearl Millet, scientifically known as Pennisetum glaucum, is a resilient and versatile annual cereal crop that is widely cultivated in arid and semi-arid regions. This hardy, drought-tolerant grass belongs to the Poaceae family and is characterized by its tall stature, long, slender leaves, and dense cylindrical seed heads. The seeds of Pearl Millet are small and round with a distinctive pearly appearance, hence the name. This nutrient-rich grain is a staple food in many parts of Africa and Asia, valued for its high levels of protein, fiber, and essential nutrients. Pearl Millet is not only a valuable food source but also serves as fodder for livestock and is commonly used in traditional medicine. Its adaptability to harsh growing conditions and minimal water requirements make it an important crop for food security and sustainable agriculture in challenging environments.","""Maximizing Pearl Millet Yields: Proven Strategies for Farmers""" -Millets,Sorghum,"Sorghum, also known as milo, is a versatile and gluten-free cereal grain that is widely cultivated for its numerous culinary and agricultural uses. This tall grass plant produces clusters of edible grains that can be ground into flour, popped like popcorn, or used to make syrups and beverages. With a mildly sweet and nutty flavor, sorghum is a popular ingredient in various dishes around the world, including porridges, stews, baked goods, and even alcoholic beverages. In addition to its culinary applications, sorghum is also valued for its drought tolerance, making it an important crop in regions with limited water availability. Rich in nutrients like fiber, antioxidants, and vitamins, sorghum is a nutritious and sustainable food choice that can be enjoyed in a variety of ways.","""The Essential Guide to Successful Sorghum Farming""" -Millets,Finger Millet,"Finger Millet, scientifically known as Eleusine coracana, is a nutritious cereal crop widely cultivated in Africa and Asia. It is a hardy, drought-resistant plant that thrives in semi-arid regions, making it an important staple food for many communities. Finger Millet is known for its high nutritional value, being rich in iron, calcium, fiber, and essential amino acids. It is often ground into flour and used to make porridge, bread, or traditional dishes like roti or idli. Recognized for its health benefits, Finger Millet is gaining popularity as a superfood due to its role in improving digestion, combating malnutrition, and supporting overall well-being.","""Maximizing Finger Millet Yields: Essential Tips for Farmers""" -Millets,Kodo millet,"Kodo millet, scientifically known as Paspalum scrobiculatum, is a nutrient-rich ancient grain that is highly valued for its health benefits. This mild, nutty-flavored grain is a staple in many Indian cuisines and is gaining popularity worldwide for its gluten-free and low glycemic index properties. Kodo millet is a good source of essential nutrients such as fiber, protein, vitamins, and minerals, making it a great choice for a healthy diet. It is known for its versatility in cooking, being used in various dishes like porridge, pilafs, salads, and baked goods. With its numerous health benefits and delicious taste, kodo millet is a nutritious addition to any balanced diet.","""The Nutrient-Packed Superfood: Kodo Millet Farming Guide""" -Millets,Millets,"Millets are a group of small-seeded grains that are highly nutritious and versatile in cooking. These ancient grains have been a staple food in many cultures for centuries due to their exceptional health benefits. Millets are rich in essential nutrients such as iron, calcium, magnesium, and fiber, making them a great addition to a balanced diet. They are gluten-free, low in glycemic index, and have been shown to help in maintaining stable blood sugar levels. With a nutty flavor and a unique texture, millets can be used in a variety of dishes, including porridge, salads, casseroles, and baked goods. Incorporating millets into your diet can provide a range of health benefits and add a delicious twist to your meals.","""The Power of Millets: Nourishing Your Farm for a Sustainable Future""" -Vegetables,French Bean,"French beans, also known as green beans or string beans, are slender, vibrant green pods that are a popular vegetable in many cuisines around the world. These tender and crisp beans have a sweet flavor and are a good source of vitamins A, C, and K, as well as fiber and antioxidants. French beans can be steamed, sautéed, stir-fried, or even eaten raw in salads, making them a versatile and nutritious addition to any meal. With their bright color and fresh taste, French beans are a delightful and healthy choice for enhancing your culinary creations."," ""Cultivating Success: A Guide to Growing French Beans""" -Vegetables,Runner Bean,"The Runner Bean is a popular garden vegetable known for its vibrant green color and long, slender pods. This climbing plant produces beautiful red or white flowers that attract pollinators to the garden. The Runner Bean is prized for its delicious, tender pods that are crisp and flavorful when harvested young. This vegetable is easy to grow in well-drained soil with ample sunlight, making it a favorite among home gardeners. With its high nutritional content and versatility in the kitchen, the Runner Bean is a staple in many cuisines around the world."," ""Growing Runner Beans: A Guide for Farmers""" -Vegetables,Beans,"Beans are a versatile and nutritious staple in many cuisines around the world. These legumes come in a variety of colors, shapes, and sizes, from kidney beans to black beans to chickpeas. Beans are a great source of plant-based protein, fiber, vitamins, and minerals, making them an excellent choice for vegetarian and vegan diets. They can be used in a wide range of dishes, including soups, stews, salads, dips, and more. Whether you're looking to boost your protein intake, increase your fiber consumption, or simply add some variety to your meals, beans are a delicious and healthy option to consider."," ""Maximizing Bean Crop Yields: A Practical Guide for Farmers""" -Vegetables,Kidney Beans,"Kidney beans are a popular type of legume that are kidney-shaped and have a mild, nutty flavor. They are known for their rich red color and smooth, creamy texture when cooked. Kidney beans are packed with nutrients such as protein, fiber, and various vitamins and minerals, making them a healthy addition to any meal. They are versatile and can be used in a variety of dishes including soups, stews, salads, and chili. Kidney beans are a staple ingredient in many cuisines around the world and are loved for their delicious taste and nutritional benefits.","""Growing Happy and Healthy Kidney Beans: A Guide for Farmers""" -Vegetables,Brinjal,"The brinjal, also known as eggplant or aubergine, is a popular vegetable known for its deep purple, glossy skin and mild, slightly bitter flavor. With a smooth texture when cooked, brinjal is a versatile ingredient used in various cuisines around the world. This vegetable is rich in fiber, vitamins, and minerals, making it a nutritious addition to any diet. Whether grilled, roasted, fried, or stewed, brinjal can be enjoyed in a wide range of dishes, from curries and stir-fries to dips and spreads.","""Optimizing Brinjal Yield: A Guide for Farmers""" -Vegetables,Cabbage,"Cabbage is a leafy green or purple vegetable that belongs to the Brassica family, known for its dense, compact head of leaves. It has a crunchy texture and a slightly sweet or peppery flavor, making it a versatile ingredient in various cuisines around the world. Cabbage is high in nutrients like vitamin C, vitamin K, and fiber, making it a healthy addition to salads, stir-fries, soups, and more. It can be eaten raw, cooked, or fermented to create dishes like coleslaw, kimchi, and sauerkraut. Cabbage is a staple crop in many cultures and is widely available in supermarkets year-round."," ""Cultivating Success: A Guide to Cabbage Farming""" -Vegetables,Cauliflower,"Cauliflower is a versatile and nutritious vegetable belonging to the Brassica family, known for its dense, compact head of white florets. With a mild and slightly nutty flavor, cauliflower can be enjoyed both raw and cooked in various dishes, from soups and salads to stir-fries and casseroles. It is a rich source of vitamins, minerals, and antioxidants, making it a popular choice for those seeking a healthy diet. Cauliflower can be white, orange, purple, or green in color, offering a visually appealing addition to any plate. Known for its ability to absorb flavors, cauliflower is often used as a substitute for higher-carb ingredients, making it a versatile and nutritious option for a wide range of culinary creations."," ""Growing and Harvesting Cauliflower: A Practical Guide for Farmers""" -Vegetables,Chilli,"Chilli, also spelled as chili or chile, is a popular spice that is used to add heat and flavor to dishes. It is a small, red or green spicy fruit from the Capsicum plant family. Chillis come in various shapes, sizes, and levels of spiciness, with the heat intensity measured on the Scoville scale. This fiery ingredient is commonly used in cuisines around the world to enhance the taste of dishes such as curries, stews, sauces, and salsas. Chillis are not only known for their spicy kick but also for their health benefits, as they are rich in vitamins, antioxidants, and capsaicin, which is believed to have various health properties. Whether dried, powdered, fresh, or in sauce form, chillis are a versatile ingredient that adds a flavorful punch to a wide range of culinary creations.","""Maximizing Your Chilli Crop: Essential Tips for Farmers""" -Vegetables,Capsicum,"Capsicum, also known as bell pepper or sweet pepper, is a vibrant and versatile vegetable that comes in a variety of colors such as red, yellow, orange, and green. With a crisp and juicy flesh, capsicum adds a sweet and tangy flavor to dishes, making it a popular ingredient in salads, stir-fries, and stews. Packed with vitamins and antioxidants, capsicum not only enhances the taste of dishes but also offers numerous health benefits. Its vibrant colors and distinct flavor profile make it a staple in cuisines around the world.","""Maximizing Capsicum Crop Yields: Essential Tips for Farmers""" -Vegetables,Tomato,"Tomato is a vibrant and versatile fruit that is commonly used in culinary dishes around the world. With its bright red color and juicy texture, the tomato adds a burst of flavor to salads, sandwiches, sauces, and more. Known for its sweet and slightly tangy taste, tomatoes are rich in essential nutrients like vitamin C, potassium, and lycopene. Whether enjoyed raw or cooked, the tomato's versatility and fresh taste make it a staple ingredient in a variety of cuisines.","""Mastering Tomato Farming: A Comprehensive Guide for Farmers""" -Vegetables,Carrot,"Carrots are root vegetables with a distinct orange color and a crunchy texture. They are known for their sweet and earthy flavor, making them a popular and versatile ingredient in both savory and sweet dishes. Carrots are packed with nutrients, including beta-carotene, fiber, and vitamins A and K, making them a healthy addition to any diet. Whether eaten raw as a snack, cooked in soups and stews, or juiced for a refreshing drink, carrots are a nutritious and delicious vegetable enjoyed worldwide.","""Mastering Carrot Cultivation: A Comprehensive Guide for Farmers""" -Vegetables,Pumpkin,"Pumpkins are large, round, orange squash that are often associated with autumn and Halloween. With a thick exterior skin and soft, fibrous interior, pumpkins are popular for their versatility in cooking and decorating. They are commonly used in a variety of dishes such as pies, soups, and roasted vegetables. Pumpkins are also a favorite for carving into Jack-o'-lanterns during Halloween festivities. Their vibrant color and unique shape make them a symbol of the fall season and a beloved staple in many households."," ""Pumpkin Farming 101: A Comprehensive Guide for Farmers""" -Vegetables,Radish,"Radishes are crisp, peppery vegetables that belong to the Brassicaceae family, known for their bright red or pink skin and white flesh. They have a distinctive spicy flavor that adds a zing to salads, sandwiches, and other dishes. Radishes are a versatile ingredient that can be eaten raw, roasted, pickled, or sautéed, providing a burst of freshness and crunch to any meal. With their high water content and low calories, radishes are also a nutritious choice, packed with vitamins, minerals, and antioxidants. Overall, radishes are a flavorful and vibrant addition to any culinary creation.","""Maximizing Radish Yield: Proven Strategies for a Bountiful Harvest""" -Vegetables,Cucumber,"Cucumbers are a popular vegetable known for their crisp texture and refreshing flavor. They are long, cylindrical in shape, with a smooth, dark green skin. Cucumbers are often eaten raw in salads, sandwiches, and as a healthy snack. They are low in calories and high in water content, making them a hydrating and nutritious option. Cucumbers are also used in pickling and can be mixed into various dishes for added freshness and crunch. With their mild, slightly sweet taste, cucumbers are a versatile vegetable that can be enjoyed in a variety of culinary creations."," ""The Essential Guide to Cucumber Farming""" -Vegetables,Beetroot,"Beetroot is a vibrant and versatile root vegetable that comes in deep purple-red hues. Its sweet and earthy flavor profile makes it a popular ingredient in salads, soups, stews, and smoothies. With its nutrient-rich content, including high levels of fiber, vitamins, and minerals, beetroot is known for its potential health benefits, such as improving heart health and boosting stamina. Whether roasted, pickled, or grated raw, beetroot adds a pop of color and a burst of flavor to various dishes, making it a beloved ingredient in many cuisines around the world.","""Maximizing Beetroot Yields: Tips for Successful Farming""" -Vegetables,Garlic,"Garlic is a versatile and pungent bulb that is widely used in cooking for its distinctive flavor and aroma. With a long history of culinary and medicinal uses, garlic is known for its strong and sharp taste that can vary from mild to intense depending on how it is prepared. It is commonly used to enhance the flavor of savory dishes, sauces, and marinades, as well as being a popular ingredient in traditional remedies for various health benefits. Garlic is also prized for its ability to add depth and complexity to a wide range of cuisines, making it a staple in kitchens around the world."," ""Garlic Farming 101: A Comprehensive Guide for Beginner Farmers""" -Vegetables,Ginger,"Ginger is a flowering plant that is widely known for its distinctive spicy flavor and various health benefits. The root of the ginger plant is used in a variety of culinary and medicinal applications around the world. It has a pungent aroma and a warm, slightly sweet taste that adds depth to dishes. Ginger is often used to alleviate nausea, aid digestion, reduce inflammation, and boost the immune system. It can be consumed fresh, dried, powdered, or in the form of ginger tea, and is a versatile ingredient in both savory and sweet recipes. With its potent flavor profile and numerous health-promoting properties, ginger is a beloved ingredient in many households and cuisines."," ""Essential Tips for Successful Ginger Farming""" -Vegetables,Knolkhol,"Knolkhol, also known as Kohlrabi, is a unique and versatile vegetable that belongs to the cabbage family. This cool-season crop features a round, bulbous stem that grows above ground and has a pale green, purple, or white outer skin. The inner flesh is crisp, tender, and mildly sweet with a flavor reminiscent of a cross between cabbage and broccoli stems. Knolkhol can be enjoyed raw in salads, slaws, and crudites, or cooked in stir-fries, soups, stews, and roasts. Packed with nutrients like vitamin C, fiber, and potassium, Knolkhol is a nutritious addition to any diet and is loved for its crunchy texture and subtle, earthy taste.","""Maximizing Your Knolkhol Harvest: Essential Farming Tips""" -Vegetables,Onion,"The onion is a versatile and pungent bulb vegetable known for its layers of papery skin and distinctive, strong flavor. Available in various colors and sizes, onions are used in a wide range of culinary dishes around the world, adding depth and aroma to soups, stews, salads, and more. With a texture that varies from crisp and crunchy when raw to soft and sweet when cooked, onions are a staple ingredient that can be enjoyed in a myriad of delicious ways.","""Local Onion Farmer Shocked to Discover All His Onions Have Vanished Overnight""" -Vegetables,Okra,"Okra, also known as lady's finger or bhindi, is a flowering plant with edible green seed pods. This vegetable is rich in nutrients such as vitamins A, C, and K, as well as folate and fiber. With a mild flavor and a unique slimy texture when cooked, okra is commonly used in dishes from various cuisines around the world, including soups, stews, curries, and stir-fries. It is known for its potential health benefits, including promoting digestion, aiding in weight management, and improving heart health. Whether fried, roasted, or added to gumbo, okra is a versatile ingredient that adds a distinct taste and texture to a wide range of dishes."," ""Growing Okra: A Guide for Farmers""" -Vegetables,Elephant Foot Yam,"The Elephant Foot Yam, also known as Amorphophallus paeoniifolius, is a tropical plant native to South Asia and Southeast Asia. It is a perennial tuberous plant that produces large, bulbous underground tubers that resemble an elephant's foot, hence its name. The plant has a unique and striking appearance with large, palmately lobed leaves and a tall, spadix that emits a foul odor to attract pollinators. The tubers are edible and are a popular ingredient in many Asian cuisines, known for their starchy texture and nutty flavor. In traditional medicine, the Elephant Foot Yam is believed to have various health benefits such as aiding in digestion and reducing inflammation. Overall, this plant is prized for its culinary uses, unique appearance, and potential medicinal properties.","""Growing Elephant Foot Yam: A Farmer's Guide to Cultivating and Harvesting This Nutritious Root Vegetable""" -Vegetables,Potato,"Potatoes are starchy root vegetables that are a staple food in many cuisines around the world. They come in a variety of shapes, sizes, and colors including white, red, yellow, and purple. Potatoes are rich in carbohydrates, vitamins, and minerals, making them a nutritious and versatile ingredient in dishes such as mashed potatoes, French fries, potato salads, and more. Known for their earthy flavor and fluffy texture when cooked, potatoes are a versatile and widely-loved vegetable that can be enjoyed in numerous ways."," ""Potatoes 101: A Guide for Aspiring Farmers""" -Vegetables,Mushroom,"Mushrooms are a type of fungus that are known for their unique shape, texture, and earthy flavor. These versatile fungi can range in size, color, and taste, with varieties such as button, portobello, shiitake, and more. Mushrooms are rich in nutrients, including vitamins, minerals, and antioxidants, making them a popular ingredient in various cuisines worldwide. Whether sautéed, grilled, stuffed, or added to soups and stews, mushrooms add a depth of flavor and umami richness to dishes. With a spongy texture and an earthy aroma, mushrooms are a delicious and nutritious addition to any meal.","""The Ultimate Guide to Mushroom Cultivation for Beginners""" -Vegetables,Leafy vegetables,"Leafy vegetables are a nutritious and versatile group of plants that are known for their vibrant colors and rich flavors. These vegetables are typically characterized by their tender leaves and may include varieties such as spinach, kale, lettuce, collard greens, and Swiss chard. Leafy vegetables are packed with essential vitamins, minerals, and antioxidants, making them a valuable addition to a healthy diet. With their crisp textures and earthy tastes, these greens can be enjoyed raw in salads, steamed, sautéed, or blended into smoothies for a refreshing and nutrient-dense meal. Incorporating leafy vegetables into your diet can help support overall health and well-being, making them a popular choice among health-conscious individuals and culinary enthusiasts alike.","""The Ultimate Guide to Growing Leafy Vegetables: Tips and Techniques for a Pristine Harvest""" -Vegetables,Spinach,"Spinach is a leafy green vegetable known for its vibrant green color and nutrient-rich profile. It has a mild and slightly earthy flavor, making it a versatile ingredient in various dishes. Packed with vitamins, minerals, and antioxidants, spinach is renowned for its health benefits including promoting heart health, improving digestion, and supporting healthy skin. Whether enjoyed raw in salads, cooked in soups and stir-fries, or blended into smoothies, spinach is a delicious and nutritious addition to any diet.","""Cultivating Success: A Guide to Growing Spinach on the Farm""" -Vegetables,Bathua,"Bathua, also known as Chenopodium album or lamb's quarters, is a leafy green vegetable native to Asia and Southern Europe. It is characterized by its vibrant green color and a slightly tangy flavor profile. Bathua is a versatile ingredient commonly used in Indian cuisine, where it is often sautéed with spices, added to curries, or used in smoothies and salads. This nutritious leafy green is packed with vitamins, minerals, and antioxidants, making it a popular choice for those looking to incorporate more greens into their diet. With its earthy taste and soft texture, bathua is a delicious and healthy addition to any meal.","""The Nutrient-Rich Superfood: Bathua Farming Simplified""" -Vegetables,Coriander,"Coriander, also known as cilantro or Chinese parsley, is a versatile herb with a distinctive flavor and aroma. It is a popular ingredient in various cuisines around the world, known for its bright, citrusy notes with a hint of earthiness. Coriander is commonly used fresh as a garnish or in cooking, adding a refreshing and zesty touch to dishes. It is also prized for its potential health benefits, including anti-inflammatory and digestive properties. With its vibrant green leaves and seeds that can be ground into a spice, coriander is a staple herb that adds depth and complexity to a wide range of dishes."," ""The Ultimate Guide to Growing Coriander: A Farmer's Handbook""" -Vegetables,Rajgira,"Rajgira, also known as Amaranth, is a highly nutritious and gluten-free pseudocereal that has been cultivated and consumed for centuries. This ancient grain is rich in protein, fiber, vitamins, and minerals, making it a popular choice for a healthy diet. Rajgira has a unique nutty flavor and a versatile culinary application, used in various dishes like porridge, bread, snacks, and desserts. With its impressive nutritional profile and delicious taste, Rajgira is a great addition to any balanced diet for individuals looking to boost their health and well-being.","""Rajgira Farming 101: A Beginner's Guide to Growing Amaranth""" -Vegetables,Fenugreek,"Fenugreek is a versatile and aromatic herb that is commonly used in cooking for its distinct flavor profile, which is a combination of sweet and slightly bitter notes. With its small, green leaves and tiny, amber-colored seeds, fenugreek offers a unique taste that is often described as earthy and nutty, with a hint of maple-like sweetness. This herb is a staple in Indian and Middle Eastern cuisines, where it is used in a variety of dishes such as curries, stews, and bread. In addition to its culinary uses, fenugreek is also known for its potential health benefits, including improving digestion, reducing inflammation, and boosting milk production in nursing mothers. Overall, fenugreek is a flavorful and versatile herb that adds depth and complexity to a wide range of dishes."," ""Maximizing Fenugreek Yields: A Comprehensive Guide for Farmers""" -Vegetables,Microgreens,"Microgreens are young vegetable greens that are harvested just a few weeks after germination. These tiny, nutrient-packed greens are bursting with flavor and vibrant colors, making them a popular choice for garnishing dishes and adding a fresh, crisp taste to salads, sandwiches, and more. With their delicate textures and intense flavors, microgreens are a favorite among chefs and home cooks alike for their versatility and visual appeal. Whether used as a topping, a flavorful accent, or enjoyed on their own, microgreens are a delicious and nutritious addition to any meal.","""Growing Microgreens: A Beginner's Guide to Cultivating Nutrient-Packed Greens at Home""" -Vegetables,Arugula,"Arugula, also known as rocket or rucola, is a peppery and slightly nutty leafy green vegetable commonly used in salads and as a garnish. With deep green, jagged leaves, arugula adds a bold and refreshing flavor to dishes. Rich in vitamins A and K, as well as calcium and potassium, arugula is a nutritious addition to a balanced diet. Its distinct flavor profile makes it a versatile ingredient that can be enjoyed raw in salads, sandwiches, and wraps, or cooked in pasta dishes, pizzas, and soups. Add a touch of freshness and zing to your meals with this flavorful and nutrient-packed green vegetable.","""The Essential Guide to Growing Arugula: Tips for Successful Harvesting""" -Vegetables,Amaranth (Ramdana),"Amaranth, also known as Ramdana, is a highly nutritious and versatile ancient grain that has been cultivated for thousands of years. This pseudo-cereal is a powerhouse of essential nutrients, including high-quality proteins, fiber, vitamins, and minerals. It has a nutty and earthy flavor, making it a popular choice in various cuisines around the world. - -Amaranth is gluten-free, making it a great option for individuals with gluten sensitivities or celiac disease. It is also rich in antioxidants, which help protect the body against oxidative stress and inflammation. This nutrient-dense grain can be consumed in various forms, including whole grains, flour, flakes, or popped like popcorn. - -In addition to its nutritional benefits, amaranth is also easy to incorporate into your diet. It can be used in soups, salads, porridges, baked goods, and even as a rice substitute. With its impressive health benefits and delicious taste, amaranth (Ramdana) is a wonderful addition to a balanced and wholesome diet.","""Growing Amaranth (Ramdana): A Guide for Farmers""" -Vegetables,Bitter gourd,"Bitter gourd, also known as bitter melon or Momordica charantia, is a unique and nutritious vegetable with a distinct bitter taste. This oblong-shaped gourd features a rough, bumpy skin that ranges in color from dark green to light green. The flesh of the bitter gourd is crunchy and watery, with a slightly bitter flavor that can be an acquired taste for some. Despite its intense bitterness, bitter gourd is highly regarded for its various health benefits, as it is rich in vitamins, minerals, and antioxidants. This versatile vegetable is commonly used in Asian and Indian cuisines, where it is often stir-fried, stuffed, or added to soups and curries to balance out other flavors. The bitterness of the gourd is believed to have medicinal properties, making it a popular ingredient in traditional medicine practices.","""Bitter Gourd Cultivation: From Seed to Harvest""" -Vegetables,Ridge Gourd,"Ridge gourd, also known as Luffa acutangula, is a popular vegetable that belongs to the cucumber family. It is characterized by its elongated shape with green ridged skin. The tender flesh inside is white with small seeds. Ridge gourd has a mild and slightly sweet flavor, making it versatile for various culinary dishes. This vegetable is not only delicious but also packed with essential nutrients like vitamins, minerals, and antioxidants. It is commonly used in Asian, Indian, and Middle Eastern cuisines in curries, stir-fries, soups, and stews. Ridge gourd is known for its health benefits, such as aiding digestion, improving skin health, and boosting immunity. Whether stewed, fried, or sautéed, this vegetable adds a unique flavor and texture to any meal."," ""Growing Ridge Gourd: A Beginner's Guide for Bountiful Harvests""" -Vegetables,Cucurbitaceous crops,"Cucurbitaceous crops belong to the gourd family and are characterized by their trailing vines, palmate leaves, and large, fleshy fruits. These crops include popular vegetables such as cucumbers, pumpkins, squashes, and melons. Known for their high water content and distinct flavors, Cucurbitaceous crops are versatile ingredients used in a variety of culinary dishes worldwide. They are also valued for their nutritional benefits, being rich in vitamins, minerals, and antioxidants. Cucurbitaceous crops are grown in diverse climates and soil types, making them a staple in many agricultural settings. Their vibrant colors, unique shapes, and delicious taste make them a favorite among gardeners and consumers alike.","""Grow Your Best: Mastering Cucurbitaceous Crops for a Bountiful Harvest""" -Vegetables,Ash Gourd,"Ash gourd, also known as winter melon or white gourd, is a type of vine-grown vegetable widely cultivated in many parts of Asia. This large, oval-shaped gourd has a smooth, pale green skin and a mild, slightly sweet taste. It is often used in Asian cuisine for its versatility in both savory and sweet dishes. Ash gourd is also valued for its high water content and potential health benefits, such as being low in calories and rich in nutrients like Vitamin C and fiber. Whether added to soups, stews, stir-fries, or desserts, ash gourd adds a refreshing and subtle flavor to a variety of culinary creations.","""A Guide to Growing Ash Gourd: From Seed to Harvest""" -Vegetables,Turnip,"The turnip is a versatile root vegetable that belongs to the Brassica family. Its outer skin is typically purple or white, while the inner flesh is white and crunchy. Turnips have a slightly peppery flavor that can vary in intensity depending on the variety. They are commonly used in cooking, either roasted, mashed, or added to soups and stews. Turnips are a nutritious vegetable, rich in vitamins C and K, as well as fiber and antioxidants. They are a popular and affordable ingredient in many cuisines around the world.","""The Turnip Farming Handbook: A Comprehensive Guide for Beginner Farmers""" -Vegetables,Kale,"Kale is a versatile leafy green vegetable known for its robust flavor and nutrient-packed profile. It belongs to the cruciferous vegetable family and is highly regarded for its health benefits, being an excellent source of vitamins A, C, and K, as well as minerals like calcium and iron. With its dark green, curly leaves, kale adds texture and color to salads, smoothies, soups, and stir-fries. Its earthy and slightly bitter taste makes it a popular choice for health-conscious individuals looking to incorporate more nutrient-dense foods into their diet. Whether enjoyed raw or cooked, kale is a flavorful and nutritious addition to any meal.","""Maximizing Kale Growth: Essential Tips for Farmers""" -Vegetables,Gourd,"Gourds are a versatile and decorative type of fruit that belong to the squash family. These hard-skinned fruits come in a variety of shapes and sizes, ranging from round to elongated with smooth or warty textures. Gourds are commonly used for ornamental purposes, as well as for crafting and creating musical instruments. Their vibrant colors and unique patterns make them a popular choice for home decoration and artistic projects. Additionally, gourds are also edible and can be cooked in various dishes, adding a mild and nutty flavor to soups, stews, and curries. With their characteristic appearance and endless possibilities, gourds are a fascinating and valuable addition to both culinary and artistic endeavors.","""Mastering Gourd Farming: A Comprehensive Guide for Farmers""" -Vegetables,Sem phali,"The Sem phali is a small, round fruit that is known for its vibrant orange color and sweet, tangy flavor. It is a tropical fruit that grows on tall, slender trees in warm climates. The fruit has a smooth skin that is easy to peel, revealing juicy, segmented flesh inside. Sem phali is often enjoyed fresh as a snack or used in salads, desserts, and juices. With its refreshing taste and high vitamin C content, Sem phali is a popular choice for those looking to add a burst of tropical flavor to their meals."," ""Optimizing Sem Phali Farming Techniques for Increased Yields""" -Vegetables,Vegetable crop management,"Vegetable crop management is a critical aspect of successful farming that involves various practices to ensure optimal growth, health, and productivity of vegetable crops. This includes activities such as soil preparation, seed selection, planting, irrigation, weed and pest control, fertilization, pruning, and harvesting. Proper vegetable crop management techniques help minimize disease outbreaks, maximize yield, improve crop quality, and promote sustainable farming practices. By implementing sound management practices, farmers can enhance the overall success of their vegetable crops and achieve higher profitability in the agricultural industry.","""Essential Guide to Vegetable Crop Management for Farmers""" -Vegetables,Vegetable Nursery,"Welcome to the Vegetable Nursery, a vibrant and thriving haven for all your gardening needs! Step into a world of lush greenery and colorful bounty, where rows of neatly organized seedlings and young plants eagerly await their new homes in your garden. Take a leisurely stroll through the verdant aisles and breathe in the fresh, earthy scents of nature all around you. Our knowledgeable staff are always on hand to offer expert advice and guidance, ensuring that you find the perfect vegetables to suit your garden and culinary aspirations. Whether you're a seasoned green thumb or a budding gardener, the Vegetable Nursery is a sanctuary of growth and abundance, where you can cultivate your own little slice of paradise. Come and embark on a journey of discovery and transformation as you nurture these tiny treasures into bountiful harvests of delicious, homegrown goodness.","""Growing Your Own Greens: A Vegetable Nursery Guide""" -Vegetables,Vegetable varieties,"Vegetable varieties encompass a diverse range of plants that can be grown and consumed for their edible parts. From vibrant red tomatoes to crisp green lettuces, there is a vast assortment of colors, shapes, sizes, and flavors to choose from. Whether it's the leafy greens like spinach and kale, the root vegetables like carrots and potatoes, or the nightshades like peppers and eggplants, each variety offers unique nutritional benefits and culinary possibilities. With possibilities for growing in gardens, farms, and even urban settings, vegetable varieties are a staple of healthy diets worldwide.","""Essential Guide to Vegetable Varieties: A Comprehensive Overview for Farmers""" -Vegetables,Bottle gourd,"Bottle gourd, also known as calabash, is a versatile and nutritious vegetable with a mild, slightly sweet flavor. This elongated fruit has a pale green smooth skin with a tender white flesh inside. It belongs to the gourd family and is commonly used in various culinary dishes around the world. Bottle gourd is low in calories and high in water content, making it a great addition to a healthy diet. It can be cooked in a variety of ways, such as sautéed, stir-fried, or added to soups and stews. With its subtle taste and soft texture, bottle gourd is a popular choice for those looking to incorporate more vegetables into their meals.","""Maximizing Yield: Bottle Gourd Farming Essentials""" -Vegetables,Colocasia ,"Colocasia, commonly known as elephant ear or taro, is a tropical plant prized for its large, heart-shaped leaves and striking appearance. Native to Southeast Asia, Colocasia is a popular choice for adding a tropical flair to gardens and landscapes. The plant typically grows 3-6 feet tall and wide, with leaves that can reach up to 2 feet in length. Colocasia thrives in moist, well-draining soil and requires partial shade to full sun to flourish. Its unique foliage and dramatic presence make Colocasia a standout choice for adding a touch of exotic beauty to any outdoor space.","""Maximizing Your Colocasia Harvest: Essential Tips for Farmers""" -Fruits,Banana,"Bananas are one of the most popular and widely consumed fruits known for their distinctive sweet flavor and creamy texture. They are a rich source of essential nutrients such as potassium, vitamin C, and dietary fiber. Bananas are typically elongated in shape, with a vibrant yellow peel that turns brown as they ripen. These versatile fruits can be eaten on their own, sliced into cereal or yogurt, blended into smoothies, or used in baking. With their convenient packaging and natural sweetness, bananas make a nutritious and delicious snack for people of all ages.","""Essential Guide to Banana Farming""" -Fruits,Papaya,"Papaya, also known as papaw or pawpaw, is a tropical fruit with a unique sweet flavor and vibrant orange flesh. The fruit is pear-shaped and can grow up to 20 inches in length. Papayas are rich in vitamins A and C, fiber, and antioxidants, making them a nutritious addition to any diet. The fruit's smooth texture and tropical taste make it a popular ingredient in smoothies, salads, and desserts. Papayas are known for their digestive enzymes, making them a great choice for aiding in digestion and supporting gut health. With its refreshing taste and health benefits, papaya is a versatile and delicious fruit enjoyed around the world."," ""Papaya Farming 101: A Beginner's Guide to Growing Healthy Papayas""" -Fruits,Watermelon,"Watermelon is a refreshing and juicy fruit known for its vibrant green rind and bright red flesh, dotted with black seeds. It has a sweet and summery flavor, with a high water content making it a perfect hydrating snack. This iconic fruit is often enjoyed in slices, chunks, or blended into refreshing beverages. With its crisp texture and delicious taste, watermelon is a popular choice for picnics, barbecues, and summer gatherings.","""Maximizing Watermelon Yields: Essential Tips for Farmers""" -Fruits,Mango,"The mango is a tropical fruit known for its juicy and sweet flavor. It has a distinctive aroma and a smooth, brightly colored skin that ranges from green to orange-red when ripe. The flesh of the mango is succulent and fibrous, with a large, flat pit in the center. This versatile fruit can be enjoyed fresh, added to salads, blended into smoothies, or used in a variety of dishes ranging from salsas to desserts. Rich in vitamins A and C, as well as dietary fiber, the mango is not only delicious but also nutritious. With its refreshing taste and numerous health benefits, the mango is a popular fruit enjoyed all around the world."," ""Maximizing Mango Yield: Essential Tips for Farmers""" -Fruits,Pomegranate,"Pomegranate is a vibrant and nutrient-rich fruit with a unique and intriguing appearance. It is known for its vibrant red color, tough outer skin, and hundreds of juicy seeds, each encapsulated in a delicious and tangy juice. The pomegranate is revered for its antioxidant properties and is often associated with health and vitality. With a sweet and slightly tart flavor profile, this exotic fruit offers a burst of flavor and freshness in every bite. It is commonly enjoyed on its own, added to salads, desserts, or used to make refreshing juices and sauces. The pomegranate is not only delicious but also a symbol of abundance, fertility, and prosperity in many cultures around the world.","""The Ultimate Guide to Pomegranate Farming: Tips and Techniques for a Bountiful Harvest""" -Fruits,Citrus,"Citrus fruits are a vibrant and tangy group of fruits known for their refreshing flavors and high vitamin C content. They come in a variety of shapes, colors, and sizes, ranging from the juicy sweetness of oranges and clementines to the zesty tartness of lemons and limes. Citrus fruits are not only delicious on their own but also add a bright burst of flavor to dishes and beverages. Known for their juicy, pulpy interiors and thin, fragrant peels, citrus fruits are a staple in many cuisines around the world. From the popular navel oranges to the exotic pomelos, citrus fruits are beloved for their unique combination of sweet and sour flavors. Rich in antioxidants and nutrients, citrus fruits are a healthy and flavorful addition to any diet."," ""Maximizing Citrus Farming Yield: Essential Tips for Farmers""" -Fruits,Dates,"Dates are sweet and chewy fruits that grow on the date palm tree and are known for their high nutritional value. These golden-brown fruits are often used as a natural sweetener in various dishes and desserts, as well as enjoyed on their own as a quick and healthy snack. Dates are rich in fiber, vitamins, and minerals, making them a popular choice for promoting digestive health and providing a natural source of energy. Whether eaten fresh or dried, dates offer a deliciously sweet flavor with a hint of caramel undertones, making them a versatile ingredient for both sweet and savory recipes.","""Maximizing Yield with Strategic Date Selection for Farmers""" -Fruits,Ber,"Ber is a versatile and innovative device that combines sleek design with advanced technology. It features a user-friendly interface, seamless connectivity options, and high-performance components, making it the ideal companion for productivity and entertainment on the go. With its durable construction and compact form factor, Ber is perfect for users looking for a reliable and portable solution for their digital needs. Whether you're a professional on the move or a tech-savvy individual, Ber is sure to impress with its cutting-edge features and exceptional functionality.","""Essential Farming Techniques for Beginners""" -Fruits,Amla,"Amla, also known as Indian gooseberry, is a small green fruit renowned for its potent health benefits. It is a rich source of vitamin C, antioxidants, and essential nutrients that promote overall well-being. Amla is commonly used in traditional Ayurvedic medicine to boost immunity, improve digestion, and enhance hair and skin health. This superfood is known for its tangy and slightly bitter taste, making it a versatile ingredient in various culinary dishes, herbal teas, and herbal supplements. Incorporating Amla into your diet can provide a natural way to support your body's vitality and longevity.","""Maximizing Amla Harvest: Essential Tips for Amla Farmers""" -Fruits,Bael,"Bael is a powerful and charismatic demon in demonology and occult practices. Often depicted as a fearsome warrior with the ability to manipulate fire, he exudes an aura of authority and command. With a reputation for intelligence and cunning, Bael is a master of strategy and tactics, making him a formidable adversary or ally in spiritual workings. His presence is considered to bring protection, strength, and the courage to face challenges head-on. As a demon associated with leadership and ambition, those who work with Bael may seek guidance in achieving their goals and overcoming obstacles in their path.","""Optimizing Bael Farming Techniques for Maximum Yield""" -Fruits,Guava,"Guava is a tropical fruit known for its unique flavor profile that combines a sweet and tangy taste with floral undertones. The fruit is round or oval in shape with a green or yellow skin that often varies in texture from smooth to slightly bumpy. When ripe, the flesh of the guava can range from white to pink in color and contains numerous small edible seeds. Guavas are prized for their high vitamin C content and are commonly enjoyed fresh, in juices, jams, and desserts. The aroma of a ripe guava is sweet and fragrant, reminiscent of a tropical paradise."," ""Maximizing Guava Yield: Essential Farming Practices for Increased Productivity""" -Fruits,Lemon,"Lemons are vibrant yellow citrus fruits with a tangy and refreshing flavor. Known for their sour taste, lemons are a popular ingredient in a wide variety of culinary dishes, beverages, and desserts. They are rich in vitamin C and antioxidants, making them a healthy addition to any diet. Lemons are also commonly used for their aromatic zest and juice, which can add brightness and acidity to many recipes. With a versatile nature and invigorating scent, lemons are a beloved fruit that can elevate the flavor profile of any dish."," ""Maximizing Lemon Yields: A Farming Guide for Citrus Growers""" -Fruits,Muskmelon,"Muskmelon, also known as cantaloupe, is a popular and refreshing fruit that belongs to the Cucurbitaceae family. It has a sweet and juicy orange flesh with a unique musky aroma that is both fragrant and delicious. The outer skin is netted with a greenish color when ripe, and the inner flesh is filled with numerous seeds that are easily scooped out. Muskmelon is packed with essential nutrients like vitamin C, vitamin A, potassium, and fiber, making it a healthy and hydrating snack option. Its flavor profile is a delightful combination of sweetness and muskiness, making it a perfect addition to fruit salads, desserts, smoothies, and refreshing summer drinks.","""Maximizing Muskmelon Yields: Essential Tips for Farmers""" -Fruits,Fruit plant nursery,"Welcome to our fruit plant nursery, where you can find a wide variety of healthy and vibrant fruit plants to start your own orchard or garden. Our nursery specializes in offering fruit trees, bushes, and vines that are carefully cultivated and ready to thrive in your garden. Whether you are looking for traditional favorites like apple, pear, and peach trees, or more exotic options like fig, pomegranate, and citrus plants, we have something for every taste and preference. Come visit us to browse our selection and bring home the joy of growing your own fresh and delicious fruits right at your doorstep.","""Growing Abundance: Your Guide to Fruit Plant Nursery Success""" -Fruits,Fruit cultivation guide,"The fruit cultivation guide is a comprehensive resource designed to help individuals successfully grow a variety of fruits in their garden or orchard. This guide provides detailed information on selecting the right fruit plants, preparing the soil, planting techniques, irrigation, fertilization, pest and disease management, and harvesting practices. Whether you are a novice gardener or seasoned horticulturist, this guide offers step-by-step instructions and helpful tips to enhance your fruit cultivation skills and maximize your harvest yield. With clear and concise guidance, this resource is your go-to reference for cultivating a bountiful and healthy fruit garden.","""Essential Guide to Fruit Cultivation: A comprehensive handbook for successful farming""" -Fruits,Orchard management,"Orchard management involves the planning, maintenance, and supervision of fruit production in orchards. This includes tasks such as planting, pruning, fertilizing, and harvesting fruit trees. Effective orchard management aims to maximize fruit quality and yield while minimizing costs and environmental impact. It requires knowledge of horticulture, pest and disease control, irrigation systems, and sustainable farming practices. Successful orchard management is crucial for ensuring a healthy and productive orchard that can provide a steady supply of high-quality fruits.","""Optimizing Orchard Productivity: Best Practices for Effective Management""" -Fruits,Chickoo,"Chickoo, also known as sapodilla, is a tropical fruit native to the Americas and popular in Southeast Asia and the Indian subcontinent. It has a rough brown skin and soft, sweet, grainy flesh that is often described as a combination of pear, caramel, and brown sugar flavors. Chickoo is rich in nutrients like fiber, vitamin C, and antioxidants, making it a healthy snack option. This fruit is commonly consumed fresh or used in desserts, smoothies, and jams. Its unique taste and creamy texture make it a delightful addition to any culinary creation.","""Chickoo Farming 101: A Comprehensive Guide for Beginners""" -Fruits,Grapes,"Grapes are small, round fruit typically found in clustered bunches on climbing vines. They come in a variety of colors, including green, red, and purple, and can be sweet or tart in flavor. Grapes are widely enjoyed fresh as a snack or used in a variety of culinary dishes, from salads to desserts. They are known for their juicy texture and distinct grape flavor, making them a popular fruit option for both snacking and cooking. In addition to their delicious taste, grapes are also packed with essential nutrients, including vitamins C and K, antioxidants, and fiber, making them a healthy and refreshing choice for a balanced diet.","""Maximizing Grape Farming Yields: Essential Tips for Farmers""" -Fruits,Apple,"The apple is a widely cultivated fruit that is known for its crisp texture and sweet flavor. It is typically round in shape with a smooth skin that can range in color from green to red to yellow. Apples are a versatile fruit that can be eaten fresh, cooked, or juiced. They are a good source of dietary fiber, vitamin C, and various antioxidants, making them a healthy and nutritious snack choice. With a wide variety of apple cultivars available, there is a type of apple to suit every taste preference.","""Growing Delicious Apples: A Farmer's Guide""" -Fruits,Melons,"Melons are a type of fruit that belong to the Cucurbitaceae family, known for their juicy and sweet flesh. They come in a variety of shapes, sizes, and colors, with some popular types including watermelon, cantaloupe, honeydew, and galia melon. Melons are typically grown in warm climates and are a favorite summertime treat due to their refreshing and hydrating properties. Rich in vitamins A and C, as well as other nutrients, melons are a delicious and healthy addition to any diet. With their distinct aroma and succulent taste, melons are a versatile fruit enjoyed fresh on their own, in salads, smoothies, cocktails, and desserts."," ""Maximizing Your Melon Harvest: Essential Tips for Melon Farmers""" -Fruits,Litchi,"Litchi, also known as lychee, is a tropical fruit with a rough, reddish-pink skin and juicy, translucent white flesh. With a sweet and floral flavor profile, litchi offers a delightful combination of freshness and sweetness. The fruit is characterized by a single large seed in the center, surrounded by the succulent flesh that bursts with flavor with each bite. Litchi is rich in vitamin C, antioxidants, and other essential nutrients, making it a healthy and refreshing treat. Enjoyed fresh, in cocktails, desserts, or salads, litchi is a versatile and delicious fruit that captures the essence of exotic tropical regions.","""The Ultimate Guide to Growing and Harvesting Litchis""" -Fruits,Coconut,"Coconuts are tropical fruits with a hard, brown outer shell and a sweet, fibrous inner flesh. They are a versatile ingredient used in a variety of culinary dishes and beverages, as well as in beauty and skincare products. Coconuts are known for their rich, tropical flavor and are popular in both sweet and savory recipes. They are also a good source of nutrients such as fiber, vitamins, and minerals, making them a healthy addition to your diet. With their iconic shape and distinct flavor, coconuts are a beloved and versatile fruit enjoyed around the world.","""The Essential Guide to Coconut Farming""" -Fruits,Custard apple,"Custard apple, also known as sugar apple or sweetsop, is a tropical fruit with a green, scaly exterior and creamy white flesh inside. It has a sweet and rich flavor reminiscent of a blend of banana, pineapple, and vanilla. The fruit is typically consumed fresh or used in smoothies, desserts, and jams. Custard apples are a good source of vitamins and minerals, making them a nutritious and delicious addition to a balanced diet.","""Cultivating and Caring for Custard Apples: A Comprehensive Guide for Farmers""" -Flowers,Geranium,"Geraniums are beautiful flowering plants known for their vibrant and colorful blooms. With delicate petals ranging in shades of pink, red, purple, and white, these hardy plants are popular choices for gardens and flower beds. Geraniums are versatile and low-maintenance, able to thrive in various climates and soil conditions. Their distinctive fragrance and attractive foliage make them a favorite for adding pops of color to any outdoor space. Whether used as ground cover, in containers, or as borders, geraniums are sure to add beauty and charm to any garden setting.","""Growing Geraniums: A Beginner's Guide to Successful Farming""" -Flowers,Marigold,"Marigold is a vibrant and cheerful flowering plant known for its bright and sunny appearance. With its distinctive golden, orange, or yellow petals, this popular garden favorite adds a pop of color to any landscape. Marigolds are prized for their bold and fragrant blooms that attract pollinators like bees and butterflies. Easy to grow and low-maintenance, the marigold is a versatile plant that can be used in flower beds, borders, containers, or as a natural pest deterrent in vegetable gardens. Known for its symbolism of optimism and prosperity, the marigold is a symbol of joy and positive energy in many cultures around the world.","""Optimizing Marigold Cultivation: A Guide for Farmers""" -Flowers,Rose,"The rose is a classic symbol of love and beauty, known for its delicate petals and sweet fragrance. With a wide range of colors and varieties, roses have been cultivated for centuries and hold a special place in many cultures and traditions. Whether used in floral arrangements, as gifts, or in gardens, the rose is a timeless and elegant flower that captures the essence of romance and elegance."," ""Rose Farming 101: A Beginner's Guide to Cultivating Beautiful Blooms""" -Flowers,Bougainvillea,"Bougainvillea is a beautiful and vibrant flowering plant known for its striking, brightly colored bracts that surround its small, inconspicuous flowers. With its cascading growth habit and thorny branches, Bougainvillea adds a touch of exotic charm to gardens and landscapes. This hardy and drought-tolerant plant is popular in warm, tropical regions for its long blooming period and easy maintenance. Bougainvillea comes in a variety of colors, including shades of pink, purple, red, orange, and white, making it a versatile and eye-catching addition to any garden setting.","""Growing and Caring for Bougainvillea Plants: A Comprehensive Guide for Farmers""" -Flowers,Flowers farming,"Flower farming is the art and science of cultivating various types of flowers for commercial or personal use. This practice involves sowing seeds, nurturing seedlings, and caring for blooming plants to produce vibrant and fragrant flowers. Flower farmers may grow a diverse range of blooms, including roses, sunflowers, tulips, and daisies, among many others. Through meticulous attention to detail and a deep understanding of plant care, flower farmers can create stunning and colorful displays of nature's beauty. Whether for floral arrangements, bouquets, events, or landscaping, flower farming is a rewarding and visually captivating endeavor.","""Growing Beautiful Blooms: A Guide to Successful Flower Farming""" -Flowers,Ornamental plants,"Ornamental plants are cultivated for their aesthetic appeal, adding beauty and charm to indoor and outdoor spaces. These plants come in a variety of shapes, sizes, colors, and textures, making them versatile for different design schemes and preferences. Ornamental plants are often used to create visually appealing landscapes, gardens, and interior decor. They can be flowering or foliage plants, with some varieties offering seasonal blooms or year-round interest. Whether used as focal points, accents, or borders, ornamental plants enhance the environment and create a sense of tranquility and harmony.","""Growing Beautiful Ornamental Plants: A Practical Guide for Farmers""" -Flowers,Gladiolus,"Gladiolus, also known as the sword lily, is a vibrant and elegant flowering plant that belongs to the iris family. It is characterized by tall spikes of blooms in a wide range of colors, including shades of pink, red, purple, orange, yellow, and white. The sword-shaped leaves add to its striking appearance, making it a popular choice for cut flower arrangements and garden borders. Gladiolus blooms from late spring to early fall, adding a splash of color and beauty to any garden or floral display. With their tall and majestic presence, Gladiolus flowers are often associated with strength, honor, and admiration.","""The Ultimate Guide to Growing Gladiolus: Essential Tips for Successful Cultivation""" -Medicinal and Aromatic,Tulsi,"Tulsi, also known as Holy Basil, is a sacred herb widely recognized for its medicinal properties and spiritual significance in Hindu culture. This aromatic and flavorful plant is revered for its potent healing properties, including anti-inflammatory, anti-bacterial, and anti-viral benefits. With a distinct peppery taste and aroma, Tulsi is often used in herbal teas, Ayurvedic remedies, and culinary dishes. Its leaves are rich in antioxidants, essential oils, and nutrients that promote overall well-being and stress relief. Embraced for its calming and purifying effects, Tulsi is a symbol of health, prosperity, and devotion in traditional Indian medicine and religious practices.","""The Essentials of Tulsi Cultivation: A Comprehensive Guide for Farmers""" -Medicinal and Aromatic,Isabgol,"Isabgol, also known as psyllium husk, is a natural fiber derived from the seeds of the Plantago ovata plant. It is widely used as a dietary supplement for its high soluble fiber content, which can aid in digestion and promote bowel regularity. Isabgol is often used to relieve constipation, diarrhea, and other gastrointestinal issues. It may also help lower cholesterol levels and improve heart health. Isabgol is available in the form of powder, capsules, or husk, and can be easily incorporated into your daily routine for overall wellness and digestive health.","""Isabgol: The Ultimate Guide for Farmers""" -Medicinal and Aromatic,Opium,"Opium is a highly potent substance derived from the sap of the opium poppy plant, known for its sedative and pain-relieving properties. This substance has been used for thousands of years in various cultures for medicinal, spiritual, and recreational purposes. Opium is often processed into various forms such as morphine and heroin, which have strong addictive qualities. It can have both euphoric effects and dangerous consequences, making its use highly regulated and controlled in many countries. Opium has a complex history and continues to be a subject of intrigue and controversy in the realms of medicine, pharmacology, and drug policy.","""Maximizing Opium Crop Yields: A Farmer's Guide to Cultivation and Harvesting""" -Medicinal and Aromatic,Lemon Grass,"Lemongrass, also known as Cymbopogon, is a tall perennial grass that is prized for its citrusy and earthy aroma. This herb is commonly used in Asian cuisine for its refreshing and zesty flavor. Lemongrass is known for its medicinal properties and is often used in traditional medicine for its calming and stress-relieving effects. The plant is characterized by long, slender green leaves and a bulbous base that imparts a strong lemon flavor when crushed. Lemongrass is a versatile herb that can be used in teas, soups, curries, and marinades to add a unique and aromatic touch to dishes.","""The ABCs of Growing and Harvesting Lemongrass: A Beginner's Guide for Farmers""" -Medicinal and Aromatic,Palmarosa,"Palmarosa, also known as Cymbopogon martinii, is a sweet-scented tropical grass native to India and widely cultivated for its aromatic oil. It features long, slender leaves and graceful, feathery plumes of flowers, giving it a delicate and elegant appearance. The essential oil extracted from Palmarosa is prized for its rosy, floral fragrance with hints of citrus and herbaceous undertones, making it a popular ingredient in perfumes, skincare products, and aromatherapy. Palmarosa is valued for its soothing and rejuvenating properties, often used to promote relaxation, balance emotions, and nourish the skin. Whether enjoyed in a diffuser, blended into massage oils, or incorporated into skincare routines, Palmarosa provides a refreshing and uplifting experience that enhances overall well-being.","""Palmarosa Cultivation Guidelines: A Comprehensive Manual for Farmers""" -Medicinal and Aromatic,Bamboo,"Bamboo is a tall, fast-growing type of grass that is known for its versatility and sustainability. This plant has a unique appearance with long, hollow stems and green foliage, often used for landscaping, construction, and as a food source in some cultures. Bamboo is prized for its strength and flexibility, making it ideal for a wide range of applications, from building materials to furniture and decor. Its rapid growth rate and minimal environmental impact make it a popular choice for those seeking eco-friendly alternatives.","""The Essentials of Bamboo Farming: A Comprehensive Guide for Farmers""" -Medicinal and Aromatic,Betelvine,"Betelvine, scientifically known as Piper betle, is a perennial evergreen vine native to Southeast Asia. This aromatic and ornamental plant is widely cultivated for its heart-shaped leaves that are glossy, smooth, and fragrant. The Betelvine is culturally significant in many countries, where its leaves are commonly chewed either alone or with other ingredients as a stimulant and for traditional purposes. The vine produces small, white flowers and red fruit, adding beauty to gardens and landscapes. With its cultural significance and attractive appearance, the Betelvine is a versatile and intriguing plant that holds a special place in many traditions.","""The Ultimate Guide to Betelvine Cultivation: Tips for Successful Farming""" -Medicinal and Aromatic,Mint,"Mint is a versatile herb known for its refreshing aroma and flavor. With its bright green leaves and aromatic scent, mint is commonly used in various culinary dishes, beverages, and even in natural remedies. This herb brings a cool and crisp sensation to dishes, making it a popular choice for adding a burst of freshness to salads, cocktails, desserts, and more. With its invigorating taste and numerous health benefits, mint is a beloved herb that can elevate any dish or beverage with its unique and delightful flavor profile.","""Maximizing Mint Yield: Essential Tips for Farmers""" -Medicinal and Aromatic,Ashwagandha,"Ashwagandha, also known as Withania somnifera, is an ancient medicinal herb that has been used in Ayurvedic medicine for centuries. It is known for its adaptogenic properties, helping the body cope with stress and anxiety. Ashwagandha is also believed to boost energy levels, improve cognitive function, and support overall vitality. This versatile herb is often taken in supplement form, offering a wide range of potential health benefits for those seeking a natural way to support their well-being.","""Unlocking the Power of Ashwagandha for Enhanced Crop Growth""" -Medicinal and Aromatic,Turmeric,"Turmeric is a vibrant golden spice that comes from the rhizomes of the Curcuma longa plant. Known for its earthy and slightly bitter flavor, turmeric is a staple in Indian and Southeast Asian cuisine, where it is used in a variety of dishes such as curries, soups, and stews. Beyond its culinary uses, turmeric is also revered for its potential health benefits, as it contains curcumin, a compound with anti-inflammatory and antioxidant properties. This spice has been used for centuries in traditional medicine practices for its potential healing properties. With its striking color and distinct taste, turmeric adds a unique depth of flavor and a pop of color to a wide range of dishes.","""The Benefits of Turmeric Farming: A Guide for Farmers""" -Medicinal and Aromatic,Medicinal and Aromatic plants,"Medicinal and aromatic plants are a diverse group of flora known for their therapeutic properties and pleasing fragrances. These plants are cultivated and utilized for their medicinal benefits, which can range from improving respiratory health to alleviating stress and promoting relaxation. In addition to their therapeutic uses, these plants are often valued for the essential oils they produce, which find applications in perfumery, cosmetics, and aromatherapy. Cultivating and harvesting medicinal and aromatic plants not only supports traditional healing practices but also contributes to the pharmaceutical and cosmetic industries. With a rich history of use in various cultures around the world, these plants continue to be appreciated for their natural healing properties and aromatic qualities.","""Growing Medicine: Harnessing the Power of Medicinal and Aromatic Plants in Farming""" -Medicinal and Aromatic,Sarpagandha,"Sarpagandha, also known as Indian snakeroot, is a medicinal plant prized for its therapeutic properties and traditional uses in Ayurvedic medicine. This perennial herb features small, white flowers and wrinkled, lance-shaped leaves, typically growing in tropical and subtropical regions. Sarpagandha is renowned for its calming effects on the nervous system, making it a popular remedy for managing stress, anxiety, and insomnia. The root of the plant contains alkaloids that are believed to have antihypertensive properties, making it a valuable tool in treating high blood pressure and related cardiovascular conditions. When used in appropriate dosages under the guidance of a healthcare professional, Sarpagandha can offer relief and promote overall well-being.","""Sarpagandha Cultivation 101: A Comprehensive Guide for Farmers""" -Medicinal and Aromatic,Shatavari,"Shatavari, also known as Asparagus racemosus, is a perennial herb native to India and the Himalayas. This medicinal plant is highly valued in Ayurvedic and traditional medicine for its rejuvenating and nourishing properties. Shatavari is characterized by its delicate, feathery foliage and small, fragrant white flowers that grow in clusters. The plant's tuberous roots are the most commonly used part, known for their adaptogenic and female reproductive health benefits. Shatavari is believed to support hormonal balance, boost immunity, promote digestive health, and enhance overall vitality. Additionally, it is often utilized to help alleviate symptoms of menopause, improve lactation in nursing mothers, and aid in maintaining healthy reproductive functions."," ""Boost Your Shatavari Harvest: Essential Tips for Successful Farming""" -Medicinal and Aromatic,Aloe vera,"Aloe vera is a succulent plant known for its medicinal properties and ornamental beauty. With its thick, fleshy green leaves that are filled with a gel-like substance, this plant has been used for centuries in skin care and healing practices. Aloe vera is a popular houseplant due to its easy maintenance and air-purifying qualities. It is also commonly used in skincare products, such as lotions and creams, for its soothing and moisturizing effects. Overall, Aloe vera is a versatile and beneficial plant that brings both aesthetic appeal and wellness benefits to any space.","""The Ultimate Guide to Growing Thriving Aloe Vera Plants: From Seed to Harvest""" -Medicinal and Aromatic,Long pepper,"Long pepper, also known as Piper longum, is a flowering vine that produces elongated, blackish-brown spikes of tiny fruits. This spice is known for its pungent aroma and spicy flavor with hints of earthiness and warmth. Long pepper is commonly used in various cuisines to add a unique kick to dishes and is believed to have medicinal properties such as aiding digestion and improving respiratory health. With a history dating back to ancient times, long pepper continues to be a sought-after ingredient in both culinary and traditional medicine practices."," ""Boost Your Crop Yield with Long Pepper: A Complete Guide for Farmers""" -Medicinal and Aromatic,White Musli,"White Musli, also known as Chlorophytum borivilianum, is a perennial herb that belongs to the Liliaceae family. This rare and highly prized herb is native to India and is renowned for its various medicinal and therapeutic properties. White Musli has been traditionally used in Ayurvedic medicine as an aphrodisiac, adaptogen, and rejuvenating tonic for overall health and vitality. This herb is known for its ability to boost energy levels, improve stamina, enhance sexual performance, and support hormonal balance. White Musli is also valued for its antioxidant, anti-inflammatory, and immune-boosting properties. Additionally, it is considered a natural remedy for various health issues such as erectile dysfunction, infertility, and fatigue. Whether consumed in powdered form, as a supplement, or incorporated into herbal formulations, White Musli is a versatile and beneficial botanical that promotes well-being and vitality.","""Ultimate Guide to White Musli Cultivation""" -Medicinal and Aromatic,Green chiretta,"Green chiretta, also known as Andrographis paniculata, is a flowering herbaceous plant that is prized for its medicinal properties. It is native to South Asian countries like India and Sri Lanka, but is now cultivated in other regions as well. Green chiretta has small lance-shaped leaves and produces small white flowers. It is commonly used in traditional medicine for its immune-boosting and anti-inflammatory properties. The bitter-tasting herb is often consumed as a tea or in supplement form to promote overall health and well-being.","""Growing Green Chiretta: A Comprehensive Guide for Farmers""" -Medicinal and Aromatic,Heart-leaved moonseed,"Heart-leaved moonseed, also known as Tinospora cordifolia, is a perennial climbing shrub that is native to tropical and subtropical regions of Asia, Africa, and Australia. This plant is characterized by its heart-shaped leaves and small, greenish-yellow flowers that bloom in clusters. The Heart-leaved moonseed is highly valued in traditional medicine for its various health benefits, including its anti-inflammatory, anti-oxidant, and immune-boosting properties. It is commonly used to treat a range of ailments, such as fevers, diabetes, and arthritis. In addition to its medicinal uses, the Heart-leaved moonseed is also a popular ornamental plant, often grown for its lush foliage and climbing habit. It thrives in well-drained soil and prefers partial shade to full sun. Overall, the Heart-leaved moonseed is a versatile and attractive plant that offers both aesthetic beauty and therapeutic value.","""Introduction to Heart-Leaved Moonseed: Cultivation and Care Guide for Farmers""" -Medicinal and Aromatic,Gurmar,"Gurmar, also known as Gymnema Sylvestre, is a perennial woody vine native to tropical forests of India, Africa, and Australia. This herb is commonly used in traditional Ayurvedic medicine for its potential health benefits. Gurmar is known for its unique property of suppressing the taste of sweetness, making it popular among those looking to manage sugar cravings and support healthy blood sugar levels. Its leaves are often used to make herbal teas, extracts, and supplements. Gurmar is also believed to have anti-inflammatory, antioxidant, and anti-diabetic properties, contributing to its growing popularity in natural health circles."," ""Unlocking the Power of Gurmar: A Comprehensive Guide for Farmers""" -Medicinal and Aromatic,Neem,"Neem, also known as Azadirachta indica, is a versatile and highly valued tree native to the Indian subcontinent. Its distinctive leaves have a bitter taste and a strong, pungent odor that is characteristic of the plant. Neem is renowned for its numerous medicinal properties, as it is a natural source of antioxidants, antimicrobial compounds, and anti-inflammatory agents. It has been traditionally used in Ayurvedic medicine for treating various ailments, including skin conditions, dental issues, and digestive problems. Additionally, neem is widely utilized in organic agriculture and pest control due to its insecticidal properties. This sacred tree holds cultural significance in India and is often referred to as the ""Village Pharmacy"" for its myriad of health benefits.","""Neem Cultivation Guide: Growing and Caring for Your Neem Trees""" -Medicinal and Aromatic,Sadabahar or sadaphuli,"Sadabahar, also known as sadaphuli, is a delicate and charming flowering plant that is characterized by its dainty trumpet-shaped flowers and glossy green leaves. This plant is often cherished for its ability to bloom profusely throughout the year, bringing a touch of beauty and cheer to any garden or indoor space. The sadabahar emits a subtle, sweet fragrance that adds to its appeal, making it a popular choice for those seeking a lovely and low-maintenance plant to enhance their surroundings. With its enduring blooming cycle and vibrant colors, the sadabahar is a symbol of hope and resilience in the world of flora.","""Cultivating and Caring for the Eternal Sadabahar: A Comprehensive Guide for Farmers""" -Medicinal and Aromatic,Chandrika,"Chandrika is a name with Indian origin meaning ""moonlight"" or ""moonbeam"". This name exudes elegance and beauty, reflecting a sense of charm and grace. Chandrika is often associated with a calm and serene persona, someone who shines brightly and illuminates the lives of those around her. With a mystical and ethereal quality, Chandrika is a name that evokes a sense of wonder and enchantment.","""Maximizing Soil Health: A Practical Guide for Chandrika Farmers""" -Medicinal and Aromatic,Garden cress,"Garden cress, also known as Lepidium sativum, is a fast-growing, edible herb with delicate green leaves and a pungent, peppery flavor. This annual plant belongs to the Brassicaceae family and is commonly used as a culinary herb or garnish in salads, sandwiches, and soups. Garden cress is rich in vitamins, minerals, and antioxidants, making it a popular choice for adding a nutritional boost to dishes. Easy to grow in containers or garden beds, garden cress is a versatile and flavorful addition to any kitchen garden."," ""Optimizing Garden Cress Growth: Essential Techniques for Farmers""" -Medicinal and Aromatic,Jatropha,"Jatropha is a versatile and resilient plant known for its vibrant green leaves and clusters of small, star-shaped flowers that range in color from white to pink. This tropical plant is native to Central America and has spread to other regions due to its adaptability to various climates. The Jatropha plant is prized for its seeds, which can be processed to extract oil that is used in biodiesel production. Its hardy nature and low maintenance requirements make it a popular choice for landscaping and agroforestry projects. With a combination of beauty and utility, Jatropha is a valuable addition to any garden or agricultural setting."," ""Jatropha Farming 101: A Beginner's Guide to Cultivating High-Yield Jatropha Plants""" -Medicinal and Aromatic,Spices,"Spices are aromatic and flavorful substances used to season and enhance the taste of food. They come from various parts of plants such as seeds, bark, roots, fruits, and flowers, and have been an essential part of culinary traditions around the world for centuries. Spices can add depth, complexity, and richness to dishes, transforming ordinary meals into extraordinary culinary experiences. Whether used individually or blended together, spices are versatile ingredients that can elevate the flavor profile of both savory and sweet dishes. From warming cinnamon to fiery chili peppers, each spice brings its unique personality to the table, creating a symphony of flavors that tantalize the taste buds.","""Essential Guide to Growing and Harvesting Spices: A Farmer's Manual""" -Commercial Crops,Kesari,"Kesari is a traditional Indian sweet dish known for its rich, creamy texture and vibrant orange color. This delightful dessert is made from a combination of semolina, sugar, ghee, and water, flavored with cardamom, saffron, and garnished with nuts such as almonds and cashews. Kesari is often served at special occasions and celebrations as a symbol of joy and prosperity, and its aromatic and indulgent taste is sure to delight the taste buds of those who try it."," ""Boosting Crop Yield: A Comprehensive Guide for Farmers""" -Commercial Crops,Chia,"Chia is a versatile flowering plant that is native to Mexico and Guatemala. Known for its tiny edible seeds, chia is a popular superfood that is rich in nutrients such as omega-3 fatty acids, fiber, and antioxidants. The plant itself grows to be about 3 feet tall and produces beautiful purple or white flowers. Chia seeds can be consumed whole or ground and are often added to smoothies, yogurt, oatmeal, and baked goods. This resilient plant is easy to grow and thrives in a variety of climates, making it a favorite among health-conscious individuals and gardeners alike."," ""Maximizing Yields: Essential Tips for Chia Farming Success""" -Commercial Crops,Isabgol,"Isabgol, also known as psyllium husk, is a natural and effective dietary fiber supplement derived from the seeds of the Plantago ovata plant. This versatile ingredient is commonly used to promote digestive health and relieve constipation by adding bulk to the stool and supporting regular bowel movements. Isabgol is known for its ability to absorb water and form a gel-like substance in the stomach, which aids in promoting a feeling of fullness and regulating blood sugar levels. It is also often used in baking and cooking as a binding agent or thickening agent. Isabgol is popular for its gentle and non-irritating effects on the digestive system, making it a popular choice for individuals looking to improve their overall gut health and well-being.","""The Farmer's Guide to Growing Isabgol: Cultivation Tips and Best Practices""" -Commercial Crops,Commercial Crops,"Commercial crops are cultivated for the purpose of selling for profit or trade. These crops are typically high-yielding and in demand in the market. They are grown on a large scale with the intention of generating revenue for farmers and agribusinesses. Commercial crops include a wide range of plant species such as grains, fruits, vegetables, and cash crops like coffee, tea, cotton, and sugar cane. These crops play a vital role in the global economy, providing food, raw materials, and income for millions of people worldwide. Commercial crops are carefully managed and cultivated to ensure high quality and maximize yields for maximum financial return.","""Essential Guide to Profitable Commercial Crops Farming""" -Commercial Crops,Sugarcane,"Sugarcane is a tall, perennial grass with thick, jointed stalks that are rich in sugar content. This tropical plant is cultivated in many regions for its sweet sap, which is used to produce sugar, molasses, and other sweeteners. Sugarcane is characterized by its vibrant green leaves and fibrous stalks, which can grow up to several meters in height. Its sweet and juicy flavor makes it a popular ingredient in various food and beverage products, as well as a renewable source of bioenergy. Sugarcane is not only a versatile crop but also plays a significant economic role in agriculture and industry worldwide.","""Sugarcane Cultivation 101: A Comprehensive Guide for Farmers""" -Commercial Crops,Gum farming,"Gum farming is the cultivation of gum-producing trees, primarily acacia and eucalyptus species, for the extraction of gum arabic and other gum resins. This agricultural practice involves carefully tending to the trees to promote gum production, which is essential for a variety of industries including food, pharmaceuticals, and cosmetics. Gum farmers often utilize sustainable and environmentally-friendly practices to ensure the health and longevity of the trees, as well as to protect the natural ecosystem. The process of gum farming typically involves tapping the trees to collect the gum resin, refining and processing the gum, and then packaging it for sale to various markets around the world. Gum farming requires expertise in tree cultivation, harvesting techniques, and gum extraction methods to ensure a high-quality product that meets the demands of the global market.","""Mastering the Art of Gum Farming: A Comprehensive Guide for Farmers""" -Commercial Crops,Lac cultivation,"Lac cultivation is a traditional method of harvesting resin from the lac insect to produce shellac, a versatile natural product used in various industries such as cosmetics, pharmaceuticals, and wood finishing. The cultivation process involves carefully nurturing the lac insects on specific host plants, such as the peepal or kusum tree, until they secrete resinous excretions called lac. This lac is collected, processed, and purified to create shellac, which can be used as a binding agent, protective coating, or polish. Lac cultivation requires expertise and precision to ensure a high-quality product with diverse applications in the market.","""Mastering the Art of Lac Cultivation: A Comprehensive Guide for Farmers""" -Commercial Crops,Cotton,"Cotton is a soft, fluffy natural fiber that grows in a protective capsule around the seeds of cotton plants. Known for its versatility and comfort, cotton is widely used in the textile industry for clothing, bedding, and other household items. It is breathable, moisture-wicking, and easy to care for, making it a popular choice for everyday wear. Cotton comes in a variety of colors and patterns, and its durability ensures that it can withstand frequent washing and wearing. With its natural properties and sustainable cultivation methods, cotton remains a timeless and beloved material in the world of fashion and home decor."," ""Cotton Farming 101: A Comprehensive Guide for New Farmers""" -Fodder Crops,Fodder crops management,"Fodder crops management involves the cultivation and maintenance of specific plants that are grown to provide food and nutrients for livestock. This process includes selecting suitable crop varieties, preparing the soil, sowing seeds, watering, fertilizing, and maintaining the crop to ensure optimal growth. Fodder crops are typically harvested at specific times to maximize nutritional value and yield for feeding animals. Proper management practices are essential to ensure a sustainable and efficient supply of fodder for livestock, supporting their health and productivity.","""Maximizing Yield: A Comprehensive Guide to Fodder Crops Management""" -Fodder Crops,Azolla,"Azolla is a genus of small floating aquatic ferns that are often found in freshwater ecosystems. These plants have a unique relationship with cyanobacteria, which allows them to fix nitrogen from the atmosphere, making them excellent natural fertilizers. Azolla is known for its rapid growth rate and ability to form dense mats on the water's surface, providing habitat and food for various aquatic species. Due to its nitrogen-fixing capabilities, Azolla is often used in agriculture as a green manure crop to improve soil fertility. This versatile plant is also being studied for its potential use in biofuel production and water purification initiatives.","""The Ultimate Guide to Azolla Farming: Everything You Need to Know""" -Fodder Crops,Barseem,"Barseem is a versatile and hardy plant known for its luscious green foliage and small, vibrant flowers. This perennial herb is commonly found in temperate regions and is highly prized for its nutritional value and medicinal properties. With a clover-like appearance, Barseem adds a touch of beauty to gardens and landscapes while also attracting beneficial insects. Known for its ability to improve soil fertility and prevent erosion, Barseem is a popular choice for farmers and gardeners alike. Its resilience, ease of cultivation, and multiple uses make it a valuable asset in sustainable gardening and agriculture practices.","""Maximizing Barseem Yield: A Comprehensive Guide for Farmers""" -Fodder Crops,Rizka,"Rizka is a beautiful and powerful name of Indonesian origin meaning ""hope."" People named Rizka are known for their strong willpower, determination, and positive attitude. They have a magnetic personality that draws others towards them. Rizkas are natural leaders who excel in both personal and professional settings. With a creative and innovative mindset, they are always exploring new ideas and pushing boundaries to achieve their goals. Rizkas are compassionate and empathetic individuals who always strive to make a positive impact on the world around them.","""Maximizing Harvest Yields: Essential Farming Practices for Rizka Farmers""" -Fodder Crops,Fodder beet,"Fodder beet, also known as mangold or mangel-wurzel, is a robust and nutritious root vegetable that is commonly grown as livestock feed. This crop produces large, elongated roots with a high sugar content, making it a valuable source of energy for cattle, sheep, and other grazing animals. Fodder beet plants have broad, dark green leaves that can also be fed to livestock. Known for its high yield potential and drought tolerance, fodder beet is a popular choice for farmers looking to increase animal productivity and optimize feed resources.","""Fodder Beet: Maximizing Livestock Nutrition and Efficiency""" -Fodder Crops,Lucerne,"The Lucerne is a picturesque city located in central Switzerland, nestled amidst the stunning Swiss Alps and surrounded by the tranquil waters of Lake Lucerne. This historic city is known for its well-preserved medieval architecture, including the iconic Chapel Bridge and the towering Musegg Wall. Visitors can stroll along the charming cobblestone streets, explore the quaint old town with its colorful buildings, and admire the breathtaking views of the surrounding mountains. Lucerne also offers a vibrant cultural scene, with numerous museums, art galleries, and music festivals to enjoy. Whether you're interested in history, outdoor activities, or simply soaking in the scenic beauty, Lucerne has something to offer every traveler.","""Enhancing Lucerne Yield: Practical Tips for Farmers""" -Fodder Crops,Fodder grasses,"Fodder grasses are a diverse group of grass species cultivated specifically for their use as fodder for livestock. These grasses are typically known for their rapid growth, high nutritional content, and resilience to various environmental conditions. Fodder grasses play a crucial role in the agricultural industry by providing a reliable source of feed for livestock, helping to improve animal health and productivity. From common varieties like ryegrass and clover to more specialized species such as Sudan grass and timothy, fodder grasses contribute significantly to the sustainability and efficiency of livestock farming operations.","""Essential Guide to Fodder Grasses for Maximum Livestock Nutrition""" -Fodder Crops,Silage,"Silage is a type of animal feed typically made from fermented grass or other green fodder. It is commonly used to provide nutrition to livestock such as cows, sheep, and goats. Silage production involves storing and fermenting freshly cut plant material in airtight conditions, allowing beneficial bacteria to break down the sugars and create a preserved feed source. Silage can vary in moisture content, nutrient composition, and quality depending on the type of plants used and the fermentation process. This feed option is a cost-effective way to preserve and extend the shelf life of forage crops for year-round feeding of animals.","""Maximizing Nutrient Value: A Guide to High-Quality Silage Production for Farmers""" -Fodder Crops,Green fodder,"Green fodder is a term used to describe fresh, young plants that are harvested and fed to livestock as a source of nutrition. It typically consists of leafy greens and grasses that are high in essential nutrients such as vitamins, minerals, and fiber. Green fodder is known for its high palatability and digestibility, making it an important part of a balanced diet for livestock animals. This nutrient-rich feed promotes healthy digestion, growth, and overall well-being in animals, making it a valuable resource in the agricultural industry.","""Maximizing Nutrient-Rich Green Fodder for Livestock Health""" -Organic Farming,Organic Compost,"Organic compost is a nutrient-rich, earthy material that is created through the natural decomposition of organic matter such as food scraps, yard waste, and plant material. This dark, crumbly substance is a sustainable and eco-friendly way to enrich soil and improve its structure, promoting healthy plant growth. Organic compost helps retain moisture, suppress weeds, and reduce the need for chemical fertilizers, making it an essential component of organic gardening practices. By recycling organic waste and returning valuable nutrients to the soil, organic compost supports a healthy and vibrant ecosystem in your garden or landscape.","""Ultimate Guide to Organic Compost: A Path to Healthier Soil and Bountiful Harvests""" -Organic Farming,Green Manure,"Green manure refers to crops that are grown and then incorporated into the soil to improve its fertility and structure. These cover crops are planted specifically to add nutrients, organic matter, and suppress weeds. Green manure helps in increasing soil productivity, water retention, and can reduce the need for synthetic fertilizers. It also promotes beneficial microbial activity in the soil, which can enhance plant growth and overall soil health. By utilizing green manure practices, farmers and gardeners can support sustainable agriculture and improve the long-term health of their land.","""The Power of Green Manure: Boosting Soil Health & Crop Yield""" -Organic Farming,Organic Fertilizers,"Organic fertilizers are natural fertilizers derived from animal matter, plant extracts, and minerals. These fertilizers provide essential nutrients to plants in a slow-release form, promoting healthy growth and improving soil fertility. They are environmentally friendly, as they are biodegradable and do not contain harmful chemicals that can harm the soil or water sources. Organic fertilizers are perfect for organic gardening practices and can help improve the overall health of plants while also reducing the carbon footprint of agriculture.","""Essential Guide to Organic Fertilizers for Sustainable Farming""" -Organic Farming,Bio pesticides,"Biopesticides are organic-based pest control products derived from natural sources such as plants, bacteria, fungi, and minerals. These eco-friendly alternatives offer environmentally sustainable solutions for managing pests while minimizing harm to beneficial insects, wildlife, and the ecosystem. Biopesticides are highly effective at targeting specific pests while posing minimal risks to human health and the environment. They are commonly used in agriculture, horticulture, and forestry as a safe and viable alternative to synthetic chemical pesticides. With growing concerns about pesticide residues in food and potential ecological impacts, biopesticides are becoming increasingly popular for their ability to provide effective pest management while promoting sustainable agriculture practices.","""Breaking Down Biopesticides: A Farmer's Guide to Natural Pest Control""" -Organic Farming,Beneficial microbes,"Beneficial microbes, also known as ""good bacteria"" or ""probiotics,"" are microorganisms that provide various health benefits to their hosts. These microbes play a key role in maintaining a healthy microbiome and promoting overall well-being. They can help with digestion, nutrient absorption, immune system function, and even mental health. Beneficial microbes can be found in fermented foods like yogurt, kefir, and sauerkraut, as well as in dietary supplements. Incorporating these microbes into your diet can support a healthy gut and improve your overall health.","""Harnessing the Power of Beneficial Microbes in Agriculture""" -Organic Farming,Organic farming features,"Organic farming is a sustainable agricultural method that prioritizes the use of natural processes and resources to cultivate crops and raise livestock. Key features of organic farming include the avoidance of synthetic pesticides and chemical fertilizers, the promotion of biodiversity and soil health, and the use of practices such as crop rotation and composting for nutrient cycling and pest management. Organic farmers also focus on animal welfare, aiming to provide animals with access to natural environments and diets. By adhering to strict organic regulations, farmers help to protect the environment, public health, and promote long-term sustainability in food production.","""The Essentials of Successful Organic Farming: A Comprehensive Guide for Farmers""" -INM and IPM Practices,Biological pest disease management,"Biological pest disease management is a sustainable and eco-friendly approach to controlling pests and diseases in agriculture and gardening. It involves the use of natural enemies, such as predators, parasitoids, and pathogens, to suppress pest populations and reduce the need for chemical pesticides. By harnessing the power of nature, biological pest disease management aims to protect crops and plants while minimizing harm to beneficial organisms and the environment. This method is effective, cost-efficient, and helps maintain a balance in the ecosystem, promoting long-term pest control solutions.","""Essential Guide to Controlling Pests and Diseases on Your Farm""" -INM and IPM Practices,Integrated nutrient management,"Integrated nutrient management (INM) is a sustainable approach to managing soil fertility and plant nutrition that involves the judicious use of organic and inorganic fertilizers, along with other sustainable practices such as crop rotations, cover cropping, and conservation tillage. By combining different nutrient sources and practices, INM aims to optimize nutrient availability to plants, improve soil health, and increase crop productivity while minimizing environmental impact. This holistic approach considers the interactions between soil, plants, and nutrients to create a balanced and efficient nutrient management system that promotes long-term agricultural sustainability.","""Balancing Your Farm's Nutrients: A Guide to Integrated Nutrient Management""" -INM and IPM Practices,Integrated pest disease management,"Integrated pest disease management (IPDM) is a holistic and sustainable approach to controlling and managing pests and diseases in agricultural settings. It involves the combination of various pest control strategies, such as cultural practices, biological control, physical controls, and chemical controls, to minimize the impact of pests and diseases on crops. - -IPDM aims to reduce reliance on synthetic pesticides and promote the use of environmentally friendly and economically viable practices. By integrating multiple control methods, IPDM helps to prevent the development of pesticide resistance in pests and minimizes the risk of harmful effects on non-target species and the environment. - -This comprehensive approach to pest and disease management considers the interactions between plants, pests, and their environment, emphasizing prevention and long-term solutions rather than solely relying on reactive measures. Through careful monitoring and strategic decision-making, IPDM helps farmers achieve sustainable pest control while maintaining healthy crop production and ecosystem balance."," ""Optimizing Pest and Disease Control Strategies for Increased Crop Health: A Guide for Farmers""" -INM and IPM Practices,Chemical pesticides,"Chemical pesticides are man-made substances designed to protect crops, gardens, and structures from harmful pests like insects, weeds, and fungi. These pesticides work by disrupting the metabolism, growth, or reproduction of pests, ultimately leading to their death or elimination. They come in various forms such as sprays, dusts, baits, and granules, and are typically applied using specialized equipment. While chemical pesticides are effective at controlling pest populations and increasing crop yields, they can also have negative impacts on the environment, human health, and non-target organisms if not used properly. It is important to follow safety guidelines and regulations when using chemical pesticides to minimize these risks.","""Understanding Chemical Pesticides: A Primer for Farmers""" -INM and IPM Practices,Micronutrients,"Micronutrients are essential nutrients that are required by the body in small amounts in order to support various physiological functions and maintain overall health. These include vitamins (such as vitamin A, B, C, D, E, and K) and minerals (such as iron, zinc, calcium, magnesium, and potassium). Micronutrients play a crucial role in energy production, metabolism, immune function, and cell growth and repair. They are commonly found in a variety of foods, including fruits, vegetables, whole grains, lean proteins, and dairy products. Adequate intake of micronutrients is essential for preventing deficiency-related health issues and promoting optimal well-being."," ""Essential Micronutrients for Optimal Crop Health: A Farmer's Guide""" -INM and IPM Practices,Weed Management,"Weed management involves the strategic implementation of methods and practices to control and eradicate unwanted plant species in a variety of settings, including agricultural fields, gardens, lawns, and natural ecosystems. This process typically includes the use of chemical herbicides, manual removal techniques, mulching, cultivation, and integrated weed management approaches to prevent the spread and decrease the presence of weeds. Effective weed management is essential for maintaining the health and productivity of crops, promoting biodiversity, and preserving the overall integrity of ecosystems.","""Essential Weed Management Strategies for Optimal Crop Growth""" -INM and IPM Practices,Fertilizer and Pesticide management,"Fertilizer and pesticide management involves the careful application and monitoring of fertilizers and pesticides to promote healthy plant growth and protect crops from pests and diseases. This integrated approach aims to optimize nutrient uptake by plants, minimize environmental impact, and ensure effective pest control. Through proper management practices, such as soil testing, crop scouting, and targeted applications, farmers can improve crop productivity while safeguarding the environment and human health. Effective fertilizer and pesticide management requires a deep understanding of soil health, crop requirements, and pest dynamics, as well as ongoing monitoring and adjustment based on changing conditions in the field. By implementing sustainable practices and utilizing the latest technologies, farmers can enhance their crop yields, reduce resource inputs, and promote long-term agricultural sustainability.","""Maximizing Crop Health: A Guide to Fertilizer and Pesticide Management for Farmers""" -INM and IPM Practices,Crop management,"Crop management is a strategic process of planning, implementing, and overseeing various activities related to the cultivation of crops. This includes tasks such as selecting the right crop varieties, preparing the soil, planting seeds, applying fertilizers and pesticides, monitoring plant growth, managing irrigation, and harvesting the final yield. Effective crop management practices aim to optimize crop productivity, minimize environmental impact, and ensure sustainable agricultural practices. By employing advanced technologies and scientific knowledge, farmers can make informed decisions to enhance crop quality, quantity, and overall profitability.","""Optimizing Crop Health: Essential Strategies for Successful Farming""" -Adv Cultivation Techniques,Greenhouse/ Polyhouse,"A greenhouse, also known as a polyhouse, is a controlled environment facility designed for the cultivation of plants. Typically constructed with transparent materials such as glass or plastic, greenhouses provide protection and ideal growing conditions for plants by regulating factors like temperature, humidity, and light exposure. These structures are commonly used by gardeners, farmers, and researchers to extend the growing season, protect delicate plants from harsh weather conditions, and facilitate plant growth year-round. Greenhouses come in various sizes and designs, offering a versatile space for growing a wide range of crops, flowers, and ornamental plants.","""Maximizing Growth: A Guide to Greenhouse Farming""" -Adv Cultivation Techniques,Integrated farming,"Integrated farming is a sustainable agricultural approach that combines different farming practices and systems to maximize efficiency and productivity while minimizing negative environmental impacts. This integrated approach involves the strategic combination of crop cultivation, livestock rearing, aquaculture, and agroforestry to create a holistic farming system. By integrating diverse components, such as plants, animals, and natural resources, integrated farming aims to create synergies that enhance overall farm productivity, soil fertility, and biodiversity conservation. This method promotes efficient resource utilization, reduced chemical inputs, and enhanced resilience to climate change, making it a promising model for sustainable agriculture.","""Optimizing Yield: A Comprehensive Guide to Integrated Farming Practices""" -Adv Cultivation Techniques,Garden establishment,"Welcome to the Garden, a serene and enchanting establishment where nature's beauty flourishes and tranquility abounds. Step into a lush oasis filled with vibrant flowers, fragrant herbs, and towering trees, creating a picturesque escape from the hustle and bustle of everyday life. Stroll along winding pathways lined with intricate landscaping, secluded seating areas, and peaceful water features that invite you to relax and rejuvenate. Experience a harmonious blend of colors, scents, and textures that inspire a sense of peace and connection with the natural world. Whether you seek a place to unwind, reflect, or simply appreciate the wonders of the outdoors, the Garden offers a sanctuary for all who visit.","""Garden Haven: Cultivating Sustainable Beauty""" -Adv Cultivation Techniques,Kitchen garden,"A kitchen garden is a small, productive garden space located near the kitchen for easy access to fresh herbs, fruits, and vegetables. Typically kept well-tended and organized, a kitchen garden is designed to provide a convenient and sustainable source of fresh produce for cooking and preparing meals. Filled with an array of plants such as herbs like basil, mint, and parsley, as well as vegetables like tomatoes, peppers, and lettuce, a kitchen garden adds beauty, flavor, and nutritional value to any home. With its practicality and aesthetic appeal, a kitchen garden is a delightful addition to any household, offering a green sanctuary right outside the kitchen door.","""Nurturing Your Own Bounty: A Guide to Starting Your Kitchen Garden""" -Adv Cultivation Techniques,Terrace garden/ roof gargen,"Transform your rooftop into a serene oasis with a terrace garden. Elevate your outdoor living space with lush greenery, colorful blooms, and cozy seating areas. Create a peaceful sanctuary where you can escape the hustle and bustle of the city and unwind in the fresh air. Whether you prefer a modern urban garden or a tranquil retreat, a terrace garden offers endless possibilities for relaxation and enjoyment. Experience the beauty of nature right at your doorstep with a beautifully designed terrace garden.","""Harvest Haven: A Guide to Thriving Terrace Gardens""" -Adv Cultivation Techniques,Hydroponics,"Hydroponics is a innovative method of growing plants without soil, using nutrient-rich water solutions instead. It allows for efficient and controlled cultivation of a wide variety of crops, making it a sustainable and space-saving agricultural technique. By providing plants with the essential nutrients they need directly to their roots, hydroponics promotes faster growth and higher yields. This method is increasingly popular among urban farmers, home gardeners, and commercial growers seeking to produce fresh and healthy produce year-round. With the ability to optimize growing conditions and minimize resource usage, hydroponics offers a promising solution to meet the growing demand for food in a more environmentally friendly way."," ""Hydroponic Farming 101: A Beginner's Guide to Growing Without Soil""" -Adv Cultivation Techniques,Lawn management,"Lawn management involves the comprehensive care and attention given to maintaining a healthy and visually appealing lawn. This includes tasks such as mowing, watering, fertilizing, weed control, pest management, aeration, overseeding, and general upkeep. Proper lawn management practices aim to promote lush, green grass growth while minimizing issues such as bald patches, weeds, and diseases. By implementing a consistent lawn management routine, property owners can create a beautiful outdoor space that enhances the overall aesthetics and value of their property.","""Essential Tips for Effective Lawn Care""" -Adv Cultivation Techniques,Vertical farming,"Vertical farming is a cutting-edge agricultural method that utilizes vertical space to grow crops in stacked layers or on vertically inclined surfaces. By making use of innovative technologies such as hydroponics, aeroponics, and LED lighting, vertical farms are able to cultivate a wide variety of plants in controlled indoor environments. This sustainable farming technique offers numerous advantages including higher crop yields, reduced water usage, no reliance on pesticides, and the ability to grow fresh produce closer to urban areas. Vertical farming represents the future of agriculture by maximizing production efficiency while minimizing environmental impact.","""Maximizing Yields: A Guide to Vertical Farming for Increased Efficiency""" -Adv Cultivation Techniques,Crop diversification,"Crop diversification is a farming practice that involves cultivating a variety of different crops on the same piece of land, either simultaneously or in rotation. This approach helps to reduce the reliance on a single crop, increasing resilience to environmental challenges and market fluctuations. Diversifying crops can improve soil health, pest and disease management, and biodiversity on the farm, leading to more sustainable and productive agricultural systems. Additionally, it can offer farmers greater flexibility in responding to changing consumer preferences and market demands. Ultimately, crop diversification plays a key role in promoting a more resilient, balanced, and environmentally friendly food production system.","""Diversifying Your Crops for Success: Maximizing Yields and Minimizing Risks""" -Adv Cultivation Techniques,Nutrition Garden,"The Nutrition Garden is a vibrant and colorful space dedicated to cultivating a variety of fruits, vegetables, and herbs that promote health and well-being. With an array of nutrient-rich plants flourishing under the sun, this garden serves as a sustainable source of fresh and wholesome produce. From leafy greens to juicy berries, the Nutrition Garden offers a diverse selection of ingredients for creating delicious and nutritious meals. Visitors can immerse themselves in the lush surroundings, learning about the benefits of each plant and how they contribute to a balanced diet. Whether you are a seasoned gardener or a food enthusiast looking to connect with nature, the Nutrition Garden provides a bountiful oasis of nourishment and inspiration.","""Grow Your Own Nutrition: A Guide to Starting Your Nutrition Garden""" -Adv Cultivation Techniques,Multi-Tier System,"The Multi-Tier System is a versatile and dynamic approach to organizing and managing information or resources across different levels or tiers. This system allows for the efficient categorization, distribution, and access of data or services based on specific criteria or ranking. It offers a structured framework that enables scalability, flexibility, and customization to meet varying needs and requirements. With its layered architecture, the Multi-Tier System promotes streamlined communication, improved decision-making, and enhanced productivity within an organization or system.","""From Seed to Harvest: A Guide to Maximizing Your Farm's Potential""" -Adv Cultivation Techniques,Intercropping,"Intercropping is a farming practice where two or more crops are planted in close proximity to each other within the same field. This sustainable agricultural technique maximizes the use of available land space, sunlight, and nutrients, allowing for increased yield and productivity. By growing different crops together, intercropping can help in pest control, weed suppression, and soil conservation. This method also promotes biodiversity and can contribute to more resilient farming systems in the face of climate change.","""Maximizing Yields: The Benefits of Intercropping for Farmers""" -Adv Cultivation Techniques,Co-cropping,"Co-cropping is a sustainable agricultural practice where two or more crops are grown together in the same space to achieve mutual benefits. This strategy utilizes the complementary characteristics of different plant species to optimize productivity and resource use efficiency. By combining crops with different nutrient requirements, growth rates, and root structures, co-cropping can improve soil health, reduce pests and diseases, increase crop yields, and enhance overall farm resilience. This intercropping technique promotes biodiversity, maximizes land use, and fosters a more balanced ecosystem, making it a popular choice for farmers seeking to enhance sustainability and productivity in their fields.","""Maximizing Yield Through Co-Cropping: A Guide for Farmers""" -Adv Cultivation Techniques,Tissue culture,"Tissue culture, also known as cell culture, is a laboratory technique that involves the growth and maintenance of cells, tissues, or organs in a controlled environment outside of their natural habitat. This method allows researchers to study the behavior of cells and their response to various stimuli, such as drugs, toxins, or genetic modifications. Tissue culture is widely used in biological and medical research, pharmaceutical development, regenerative medicine, and biotechnology applications. It enables scientists to investigate fundamental biological processes, develop new treatments, and produce high-quality plant or animal cells for commercial purposes. The technique requires sterile conditions, precise nutrient media, and optimal temperature and humidity levels to support cell growth and proliferation.","""Boost Your Crop Yield: The Power of Tissue Culture Farming""" -Post Harvest and Value Addition,Food processing and value addition,"Food processing and value addition involve the transformation of raw food materials into more convenient, nutritious, and shelf-stable products through various techniques such as cooking, chopping, preserving, and packaging. This sector adds value to food products by enhancing their flavor, texture, appearance, and overall quality while also extending their shelf life. From canning and freezing to drying and fermenting, food processing methods help to retain nutrients, improve food safety, and create innovative food products to meet consumer demands. By incorporating value addition techniques, food processors can create value-added products like snacks, ready-to-eat meals, condiments, and beverages, offering consumers a wider variety of convenient and tasty options in the market.","""Maximizing Profit: A Guide to Food Processing and Value Addition for Farmers""" -Post Harvest and Value Addition,Fruit Juice,"Fruit Juice is a refreshing and flavorful beverage made from the natural essence of various fruits. Packed with vitamins, antioxidants, and minerals, it provides a healthy and energizing option for hydration. Whether enjoyed as a standalone drink or used as a versatile ingredient in cocktails or cooking, Fruit Juice is a delightful and vibrant addition to any day. With a wide variety of flavors to choose from, there is a Fruit Juice for every taste preference, from tangy citrus to sweet tropical blends. Sip on the pure goodness of Fruit Juice and let its wholesome goodness brighten your day.","""From Farm to Glass: The Art of Fresh Fruit Juicing""" -Post Harvest and Value Addition,Grain Storage,"Grain Storage refers to a facility or structure specifically designed for the purpose of storing harvested grains such as wheat, corn, barley, and rice. These storage units are typically constructed with durable materials like steel, concrete, or wood to ensure the protection of the grains from external elements like moisture, pests, and rodents. Grain storage facilities often feature proper ventilation systems and temperature control mechanisms to maintain the quality and prevent spoilage of the stored grains. These storage units play a crucial role in preserving the freshness and quality of grains for extended periods, ensuring a stable food supply and economic sustainability for agricultural communities.","""Essential Guide to Grain Storage: Preserving Your Harvest for Success""" -Animal Husbandry,Bee Keeping,"Beekeeping, also known as apiculture, is the practice of caring for and maintaining bee colonies for the purpose of harvesting honey, beeswax, and other bee-related products. Beekeepers, also known as apiarists, work closely with bees to ensure their well-being and to manage the production of honey. This ancient practice requires specialized knowledge, skills, and equipment to successfully keep bees and maintain healthy colonies. Beekeeping is not only important for the production of honey and other bee products but also plays a crucial role in pollination and the overall health of ecosystems. It is a rewarding and fascinating hobby or profession that allows individuals to connect with nature and contribute to the preservation of bee populations.","""Beekeeping 101: A Beginner's Guide to Starting Your Own Hive""" -Animal Husbandry,Poultry,"Poultry refers to domestic birds that are raised for their meat, eggs, or feathers. These birds, such as chickens, ducks, turkeys, and geese, are commonly found on farms and are an essential part of the agricultural industry. Poultry are known for their versatile culinary uses and provide a good source of protein for human consumption. They are also valued for their low environmental impact compared to other livestock and play a significant role in various cultures and cuisines worldwide.","""The Beginner's Guide to Poultry Farming: Everything You Need to Know""" -Animal Husbandry,Goat rearing,"Goat rearing is the practice of raising and breeding goats for various purposes such as meat, milk, and fiber production. It involves providing proper care, nutrition, housing, and veterinary management to ensure the health and well-being of the goats. Goat rearing can be a sustainable and profitable venture for farmers, offering a source of income and valuable products. It requires knowledge of goat behavior, reproduction, and nutritional requirements to effectively manage a successful goat farming operation. Whether for commercial or personal use, goat rearing can be a rewarding experience that provides a connection to nature and a sense of fulfillment in caring for these versatile and resilient animals.","""Goat Farming 101: Starting & Sustaining Your Flock with Success""" -Animal Husbandry,Dairy,"Dairy products are a diverse range of food items derived from milk, produced by mammals such as cows, goats, and sheep. These products are rich in essential nutrients like calcium, protein, and vitamins, making them a crucial part of a balanced diet. Some common dairy products include milk, cheese, yogurt, butter, and ice cream. Dairy can be enjoyed on its own or used in various recipes to create delicious dishes ranging from savory to sweet. With a wide variety of options available, dairy products cater to a range of dietary preferences and can be enjoyed by people of all ages.","""How to Maximize Milk Production: Essential Tips for Dairy Farmers""" -Animal Husbandry,Fishery,"The Fishery is a bustling establishment located near the water's edge, where the day's fresh catch is brought in and prepared for eager customers. The air is filled with the salty scent of the sea and the sounds of seagulls overhead. Inside, the walls are adorned with nautical decor, and the display cases are filled with a colorful array of seafood delicacies. The expert fishmongers behind the counter skillfully prepare fillets and shellfish to order, while the friendly staff assist customers in selecting the perfect fish for their meal. Whether you're looking for a succulent fillet of salmon or a platter of freshly shucked oysters, the Fishery is sure to satisfy your seafood cravings with its high-quality and sustainable offerings."," ""Optimizing Fishery Operations: A Guide for Sustainable Aquaculture Management""" -Animal Husbandry,Pig rearing,"Pig rearing involves the practice of raising domestic pigs for various purposes, such as meat production, farming, or as pets. This agricultural activity typically includes the breeding, feeding, housing, and general care of pigs to ensure their health and well-being. Pig rearing often requires a suitable and spacious living environment, a nutritious diet, regular veterinary check-ups, and proper waste management practices. Farmers and breeders may also implement breeding programs to improve the quality of pigs and ensure desirable traits in offspring. Overall, pig rearing can be a rewarding and profitable endeavor for those who are dedicated to responsibly raising and managing these intelligent and social animals.","""Introduction to Profitable Pig Rearing: A Beginner's Guide for Farmers""" -Animal Husbandry,Silkworm rearing,"Silkworm rearing is a delicate and intricate process involving the cultivation of silkworms to produce silk. It typically begins with the careful selection of high-quality silkworm eggs, which are then nurtured in a controlled environment. The silkworms are fed a diet of mulberry leaves as they grow and develop through various stages of their life cycle. - -Rearing silkworms requires constant monitoring of temperature, humidity, and cleanliness to ensure optimal conditions for their growth. Careful attention is also given to the silkworms' health and well-being, as any stress or illness can impact the quality of the silk they produce. - -As the silkworms mature, they spin their cocoons made of silk fibers to prepare for the moth stage of their life cycle. The cocoons are then harvested and processed to extract the silk strands, which are spun into thread and ultimately woven into luxurious silk fabric. - -Silkworm rearing is a time-honored tradition that requires patience, expertise, and dedication to produce the finest quality silk fibers. It is a craft that has been practiced for centuries and continues to be valued for its beauty and versatility in the world of textiles.","""Silkworm Rearing 101: A Beginner's Guide to Successful Silk Production""" -Animal Husbandry,Duck rearing,"Duck rearing is the practice of raising ducks for various purposes, including egg production, meat consumption, pest control, and even as pets. Ducks are hardy and easy to care for, making them an ideal choice for beginner farmers or those looking to diversify their livestock. Duck rearing typically involves providing ducks with proper shelter, feeding them a balanced diet, ensuring access to clean water for swimming and drinking, and monitoring their health and wellbeing. Ducks are social creatures that thrive in groups, so it is important to provide them with companionship and a suitable environment to exhibit their natural behaviors. Duck rearing can be a rewarding and enjoyable experience, offering valuable products and services while fostering a connection with these charming and versatile animals.","""Getting Started with Duck Rearing: A Beginner's Guide""" -Seed Production,Seed Production,"Seed production is the fundamental process of cultivating and harvesting high-quality seeds for various plants and crops. It involves meticulous planning, planting, nurturing, and monitoring of the seed crops to ensure the production of genetically pure and viable seeds. Seed production requires expertise in crop management techniques, knowledge of genetics, and careful maintenance of seed purity to deliver seeds that are essential for agricultural productivity and sustainability. This crucial stage in the agricultural supply chain plays a key role in ensuring consistent yields and a stable food supply for communities around the world.","""Maximizing Seed Quality: A Guide for Successful Seed Production""" -Machines and Equipments,Equipments and Machines,"Equipments and Machines are essential tools designed to perform specific tasks efficiently and effectively. From simple hand tools like hammers and screwdrivers to complex machinery like bulldozers and manufacturing equipment, these tools are used in various industries such as construction, manufacturing, agriculture, and more. They can range in size from small handheld devices to large industrial machines, each serving a unique purpose to aid in completing tasks with precision and accuracy. With advancements in technology, these equipments and machines are continuously evolving to be more powerful, faster, and energy-efficient, making them indispensable assets in today's modern world.","""Essential Farm Tools and Machinery: A Practical Guide for Farmers""" -Machines and Equipments,Irrigation equipments,"Irrigation equipments are essential tools for efficiently delivering water to crops, gardens, and landscapes to ensure proper growth and productivity. These devices are designed to distribute water evenly across designated areas through sprinklers, drip systems, or hoses. They help conserve water by reducing wastage and runoff, while also facilitating the automation of watering schedules for various types of plants. Irrigation equipments come in a variety of sizes and types to suit different irrigation needs, from small home gardens to large agricultural fields. Whether for residential, commercial, or agricultural use, these devices play a crucial role in maintaining healthy and thriving plants by providing them with the necessary moisture levels for optimal growth.","""Essential Tools for Efficient Irrigation: A Guide for Farmers""" -Machines and Equipments,Sowing equipments,"Sowing equipment is essential for agricultural activities, aiding in the efficient and precise planting of seeds. These specialized tools come in various forms, such as seed drills, planters, and broadcast seeders, designed to suit different types of crops and farming practices. Sowing equipment helps farmers to achieve uniform seed placement, accurate seeding rates, and optimal soil coverage, resulting in higher crop yields and improved productivity. With advancements in technology, modern sowing equipment may include features like GPS guidance systems, seed monitoring sensors, and automated controls for enhanced precision and efficiency in seeding operations. Overall, sowing equipment plays a crucial role in the success of planting operations and contributes to sustainable agriculture practices.","""The Essential Guide to Sowing Tools for Successful Farming""" -Machines and Equipments,Harvesting equipments,"Harvesting equipment is essential for efficiently gathering and collecting crops and other agricultural products at the peak of their ripeness. These tools and machinery are specifically designed to streamline the harvesting process, providing farmers with a means to increase productivity and yield. From combine harvesters and tractors to specialized equipment like fruit pickers and grain separators, harvesting equipment comes in a variety of forms to suit the needs of different types of crops and farming operations. With innovations in technology and engineering, modern harvesting equipment offers greater precision, efficiency, and ease of operation, making it an indispensable asset for modern agriculture.","""Essential Harvesting Tools for Bountiful Crops""" -Agri programs,Events and development programs,"Events and development programs provide opportunities for individuals to enhance their skills, knowledge, and personal growth through interactive sessions, workshops, seminars, and networking events. These programs aim to inspire and motivate participants to reach their full potential, develop new talents, and pursue their passions. Whether focusing on professional development, personal growth, or community engagement, these events are designed to create a supportive and positive environment for learning and development. Participants can connect with like-minded individuals, gain insights from industry experts, and foster meaningful relationships that can propel their personal and professional success. Whether attending as a participant or a speaker, these events and programs offer a platform for individuals to learn, grow, and thrive.","""Growing Together: A Guide to Successful Farming Practices""" -Agri programs,New technologies,"New technologies encompass a wide range of innovative solutions, tools, and systems that are shaping the future in various industries and sectors. From advanced artificial intelligence and machine learning algorithms to cutting-edge quantum computing and blockchain technologies, the world of new technologies is constantly evolving and pushing the boundaries of what is possible. These groundbreaking innovations have the potential to revolutionize businesses, improve efficiency, enhance communication, and drive meaningful change in society. Embracing new technologies is essential for staying competitive and adapting to the rapidly changing digital landscape of the 21st century."," ""Tech Solutions for Farming Success""" -Agri programs,Schemes & subsidies,"Schemes & subsidies are government-led programs designed to provide financial assistance or support to individuals, businesses, or communities for specific purposes. These initiatives aim to promote economic development, social welfare, or environmental sustainability by offering incentives, grants, or tax breaks. Schemes & subsidies can cover a wide range of areas, including agriculture, education, healthcare, housing, and small business development. By implementing these programs, governments seek to address various challenges, stimulate growth, and improve the overall well-being of their residents."," ""Maximizing Agricultural Prosperity: Essential Schemes and Subsidies for Farmers""" -Agri programs,Soil testing,"Soil testing is a process of analyzing the physical and chemical properties of soil samples to determine its suitability for plant growth or construction purposes. This testing involves examining factors such as pH levels, nutrient content, compaction, texture, drainage, and contamination levels. By conducting soil testing, experts can provide valuable information to help optimize agricultural practices, determine fertilizer needs, identify potential environmental risks, and ensure the successful implementation of construction projects. Soil testing plays a crucial role in promoting sustainable land use and maximizing the productivity of soil for various applications.","""Unlocking the Secrets of Your Soil: A Guide to Understanding Soil Testing for Farmers""" -Resource management,Natural resources management,"Natural resources management involves the sustainable utilization, conservation, and protection of the Earth's natural resources, including land, water, minerals, forests, and wildlife. This interdisciplinary field focuses on balancing economic, environmental, and social considerations to ensure the responsible stewardship of these resources for current and future generations. Professionals in natural resources management strive to promote biodiversity, mitigate environmental degradation, and support human well-being through strategic planning, policy development, research, and community engagement. Ultimately, the goal of natural resources management is to foster a harmonious relationship between humans and the environment, fostering resilience and promoting long-term sustainability."," ""Maximizing Your Farm's Potential: A Guide to Effective Natural Resources Management""" -Resource management,Soil Management,"Soil management involves various practices and techniques implemented to improve and maintain the health and quality of soil for optimal plant growth and sustainability. It includes processes such as soil testing, fertilization, irrigation management, crop rotation, cover cropping, conservation tillage, and erosion control. By carefully managing the soil, farmers can enhance crop yields, reduce environmental impact, and promote long-term soil health and fertility. Soil management is essential for sustainable agriculture and plays a crucial role in ensuring food security and environmental sustainability.","""The Essentials of Sustainable Soil Management for Farmers""" -Resource management,Water Management,"Water management is the practice of planning, developing, distributing, and managing water resources sustainably to meet various needs such as drinking water supply, agricultural irrigation, industrial use, and ecosystem preservation. It involves the monitoring and control of water quantity, quality, and distribution to ensure efficient use, conservation, and protection of this vital natural resource. Effective water management strategies aim to optimize water availability, mitigate water-related risks such as floods and droughts, and promote long-term sustainability for both human and environmental well-being.","""Essential Water Management Practices for Sustainable Farming""" -Resource management,Energy Saving,"Energy Saving is a practical and eco-friendly solution designed to reduce energy consumption and promote sustainability. By implementing energy-saving practices and utilizing energy-efficient technologies, this initiative aims to conserve resources, lower utility costs, and decrease carbon footprint. Energy Saving prioritizes the efficient use of energy in various applications, such as electricity, heating, and transportation, to create a more sustainable future for generations to come.","""5 Easy Ways to Save Energy on the Farm""" -Resource management,Land management,"Land management is the practice of overseeing the development, use, and preservation of land resources in a sustainable and responsible manner. It involves creating and implementing plans and strategies to maintain the ecological balance, promote conservation efforts, and support the needs of communities and industries that utilize the land. Land management aims to prevent overexploitation, control land degradation, and optimize land productivity while considering environmental, social, and economic factors. By integrating land use planning, resource management, and regulatory measures, land management plays a crucial role in shaping the future of our landscapes and ensuring the well-being of both present and future generations.","""Becoming a Better Steward: Essential Practices for Sustainable Land Management""" -Resource management,Crop Residue Management,"Crop residue management refers to the practice of handling and utilizing the leftover plant material, such as stalks, leaves, and roots, after harvesting a crop. This management strategy plays a crucial role in maintaining soil health and fertility, controlling erosion, improving water retention, and enhancing overall crop productivity. By effectively managing crop residues through techniques like mulching, tilling, or incorporating them back into the soil, farmers can sustainably maximize agricultural yields while minimizing environmental impact. Proper crop residue management is essential for promoting long-term soil sustainability and ensuring the continued success of farming operations.","""Enhancing Farm Sustainability through Crop Residue Management""" -Resource management,Safety of Agri Chemicals,"The safety of agricultural chemicals is a crucial aspect of modern farming practices. Farmers and agricultural workers rely on a variety of chemical products such as pesticides, fertilizers, and herbicides to protect their crops and ensure optimal yields. However, the use of these chemicals comes with inherent risks to human health, wildlife, and the environment. To mitigate these risks, it is essential for farmers to adhere to strict safety guidelines, including proper handling, storage, and disposal of these chemicals. Additionally, the development of safer and more environmentally friendly alternatives is crucial to minimize the negative impact of agricultural chemicals on our ecosystems. Overall, ensuring the safety of agricultural chemicals is paramount for sustainable farming practices and the protection of our food supply.","""Essential Guide to Safe Handling of Agri Chemicals for Farmers""" -Weather impact,Frost management,"Frost management involves strategies and techniques designed to mitigate the damaging effects of frost on plants, crops, and other vulnerable materials. These strategies may include the use of frost protection methods such as covering plants with protective materials, introducing wind machines to circulate air and prevent frost from settling, applying water to create a protective ice layer, or using heaters to raise temperatures in frost-prone areas. Effective frost management is crucial for protecting crops from freezing temperatures and preventing significant economic losses for farmers and growers. By implementing appropriate frost management practices, individuals can safeguard their plants and crops against the detrimental impacts of frost events.","""Essential Guide to Frost Management for Farmers""" -Weather impact,Temperature,"Temperature is a physical quantity that expresses the hotness or coldness of an object or a substance. It is a fundamental metric in physics and thermodynamics to measure the degree of thermal energy present in a system. Temperature is typically measured in degrees Celsius, Fahrenheit, or Kelvin, and plays a crucial role in various scientific fields, including meteorology, engineering, chemistry, and biology. It influences the behavior of matter, chemical reactions, physical processes, and biological functions, making it a critical parameter in understanding and predicting the behavior of the natural world. Temperature is highly dynamic and can fluctuate based on various factors such as heat transfer, insulation, environmental conditions, and energy exchanges.",Understanding Temperature for Farmers: A Guide to Weather Patterns and Crop Health -Weather impact,Weather impact,"Weather impact refers to the effects that weather conditions can have on various elements of the environment, infrastructure, and human activities. This can include events such as storms, floods, droughts, extreme temperatures, and other weather phenomena that can impact daily life. The consequences of weather impact can range from disruptions to transportation and power supply to damage to property and threats to public safety. Understanding and preparing for potential weather impacts are essential for mitigating risks and ensuring the resilience of communities and infrastructure.","""Preparing Your Farm for Weather Challenges: A Guide for Farmers""" -Weather impact,Agri advisory,"Agri advisory is a comprehensive and personalized agricultural information service designed to assist farmers in making informed decisions about their crops and farming practices. This digital platform provides timely advice on various aspects of agriculture, including crop management, pest control, soil health, weather forecasting, and market trends. Through the use of advanced technologies such as artificial intelligence and data analytics, agri advisory offers tailored recommendations to optimize crop yield and enhance productivity. By combining scientific expertise with real-time data, farmers can improve efficiency, reduce risks, and achieve sustainable farming practices for long-term success.","""Grow Smarter: Essential Agri Advisory for Successful Farming""" -States,Madhya Pradesh, -States,Bihar, -States,Odisha, -States,Rajastan, -States,Uttar Pradesh, diff --git a/accounts/views.py b/accounts/views.py index 69089d91..9f842a05 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -353,7 +353,22 @@ def reset(self, request, *args, **kwargs): status=status.HTTP_400_BAD_REQUEST, ) + @action(detail=False, methods=["post"]) + def bot_login(self, request, *args, **kwargs): + """POST method: to save a newly registered user""" + email=request.data.get("email") + user_obj = User.objects.filter(email=email) + user = user_obj.first() + if not user: + return Response( + {"email": "User not registered"}, + status=status.HTTP_401_UNAUTHORIZED, + ) + serializer = UserCreateSerializer(user) + return Response(serializer.data) + + @permission_classes([]) class ResendOTPViewset(GenericViewSet): """ResendOTPViewset for users to register""" diff --git a/ai/vector_db_builder/load_audio_and_video.py b/ai/vector_db_builder/load_audio_and_video.py index b2ecf93e..22f3e4d7 100644 --- a/ai/vector_db_builder/load_audio_and_video.py +++ b/ai/vector_db_builder/load_audio_and_video.py @@ -82,12 +82,8 @@ def generate_transcriptions_summary(self, url): 'format': 'bestaudio/best', 'outtmpl': local_temp_path, 'quiet': False, - 'headers': { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', - }, - 'cookiefile': "../../youtube_cookies.txt", # Path to your exported cookies + 'cookiefile': "ai/vector_db_builder/youtube_cookies.txt", # Path to your exported cookies } - try: # Download the audio with YoutubeDL(ydl_opts) as ydl: diff --git a/ai/vector_db_builder/load_documents.py b/ai/vector_db_builder/load_documents.py index 70620471..4b0595ab 100644 --- a/ai/vector_db_builder/load_documents.py +++ b/ai/vector_db_builder/load_documents.py @@ -36,10 +36,22 @@ def temporary_file(suffix=""): class LoadDocuments: + def _get_full_url(self, file): + """Construct full URL for media files using DATAHUB_SITE environment variable.""" + if file.startswith('/media'): + base_url = os.environ.get("DATAHUB_SITE", "http://localhost:8000") + return base_url + file + return file + def load_by_file_extension(self, file): if file.endswith(".pdf"): LOGGING.info(f"pdf file loader started for file: {file}") - return PyMuPDFLoader(file.replace('http://localhost:8000/', "")).load(), 'pdf' + # Handle media files with DATAHUB_SITE environment variable + if file.startswith('/media'): + full_url = self._get_full_url(file) + return PyMuPDFLoader(full_url).load(), 'pdf' + else: + return PyMuPDFLoader(file).load(), 'pdf' elif file.endswith(".csv"): with temporary_file(suffix=".csv") as temp_pdf_path: response = requests.get(file) diff --git a/ai/vector_db_builder/load_website.py b/ai/vector_db_builder/load_website.py index e40f22b0..4242d603 100644 --- a/ai/vector_db_builder/load_website.py +++ b/ai/vector_db_builder/load_website.py @@ -20,13 +20,26 @@ def process_website_content(self, url): return "", "" def aggregate_links_content(self, links, doc_text): - def fetch_content(link): - main_content, web_links = self.process_website_content(link) - return main_content, link - - with ThreadPoolExecutor(max_workers=10) as executor: - futures = [executor.submit(fetch_content, link) for link in set(links)] - for future in as_completed(futures): - main_content, link = future.result() - doc_text += f" Below content related to link: {link} \n"+ main_content - return doc_text \ No newline at end of file + # def fetch_content(link): + # main_content, web_links = self.process_website_content(link) + # return main_content, link + for link in set(links): + main_content, link = self.process_website_content(link) + doc_text += f" Below content related to link: {link} \n"+ main_content + + return doc_text + + + # import asyncio + + # async def fetch_content(self, link): + # main_content, web_links = await self.process_website_content(link) + # return main_content, link + + # async def aggregate_links_content_async(self, links, doc_text): + # tasks = [self.fetch_content(link) for link in set(links)] + # results = await asyncio.gather(*tasks) + + # for main_content, link in results: + # doc_text += f" Below content related to link: {link} \n" + main_content + # return doc_text \ No newline at end of file diff --git a/ai/vector_db_builder/vector_build.py b/ai/vector_db_builder/vector_build.py index 1aa1e014..749cde45 100644 --- a/ai/vector_db_builder/vector_build.py +++ b/ai/vector_db_builder/vector_build.py @@ -110,9 +110,16 @@ def load_documents(url, file, doc_type, resource_file, transcription=""): try: if doc_type == 'api': - absolute_path = os.path.join(settings.MEDIA_ROOT, file.replace("/media/", '')) - loader = JSONLoader(file_path=absolute_path, jq_schema='.', text_content=False) - return loader.load(), "completed" + with temporary_file(suffix=".json") as temp_pdf_path: + response = requests.get(file) + if response.status_code != 200: + return response.txt, "failed" + with open(temp_pdf_path, 'wb') as f: + f.write(response.content) + LOGGING.info("absolute_path of the api file {file}") + loader = JSONLoader(file_path=temp_pdf_path, jq_schema='.', text_content=False) + return loader.load(), "completed" + elif doc_type in ['youtube', 'pdf', 'website', 'file', 'dropbox', 's3', 'google_drive', 'dropbox']: with temporary_file(suffix=".pdf") as temp_pdf_path: if doc_type == 'youtube': @@ -131,6 +138,7 @@ def load_documents(url, file, doc_type, resource_file, transcription=""): doc_text = "" web_site_loader = WebsiteLoader() main_content, web_links = web_site_loader.process_website_content(url) + # doc_text = web_site_loader.aggregate_links_content(web_links, doc_text) doc_text = web_site_loader.aggregate_links_content(web_links, doc_text) all_content = main_content + "\n" + doc_text build_pdf(all_content.replace("\n", " "), temp_pdf_path) @@ -151,7 +159,7 @@ def load_documents(url, file, doc_type, resource_file, transcription=""): LOGGING.error(f"Unsupported input type: {doc_type}") return f"Unsupported input type: {doc_type}", "failed" except Exception as e: - LOGGING.error(f"Faild lo load the documents: {str(e)}") + LOGGING.error(f"Faild lo load the documents: {str(e)}", exc_info=True) return str(e), "failed" def split_documents(documents, chunk_size, chunk_overlap): diff --git a/ai/vector_db_builder/youtube_cookies.txt b/ai/vector_db_builder/youtube_cookies.txt new file mode 100644 index 00000000..ec2bbe62 --- /dev/null +++ b/ai/vector_db_builder/youtube_cookies.txt @@ -0,0 +1,26 @@ +# Netscape HTTP Cookie File +# This file is generated by yt-dlp. Do not edit. + +.youtube.com TRUE / TRUE 1762843691 LOGIN_INFO AFmmF2swRAIgbK9lgXpJD3G9KOCwWfSE40Q2IuLTvcK0FFFwDcUZhgICIGmbRPPnvnAuVsgDjRofmJp4BT3ilU8jgKpi3FS8rV33:QUQ3MjNmeWJHX1lvdThrYWgxaThpQVY4WUNjNl9zdGhydzEzRWppbWdIb253Mko2R1ZjUG1MaXBiTWlGdUVBbWhnOE9HTWdDR3JHSHNfLWdsbUlJY2g5aERlTE1Ca3d3LTRXUGt0VHhscElxdXFiZnJVdW51eW8wNWkyck4tdkx6QjZjLWFUVVY4ZjFrVEtYRVdMeXFhUUJHbzY0NDAwUkNR +.youtube.com TRUE / FALSE 0 PREF f6=40000000&f7=4100&tz=UTC&f4=4000000&f5=30000&hl=en +.youtube.com TRUE / FALSE 1776835393 SID g.a000uwj8nKnF2HIVNJiT6cqltlN6pMEx8Gbp11lOXLK1jg7CfK-DLDpWG08iHOzh3lUSH5XmwwACgYKAaASARASFQHGX2MiIntNHAaYwbENwMgD6G6jhhoVAUF8yKpZDVm7I7-lUa5mMRQMeIv20076 +.youtube.com TRUE / TRUE 1776835393 __Secure-1PSID g.a000uwj8nKnF2HIVNJiT6cqltlN6pMEx8Gbp11lOXLK1jg7CfK-DUUl4XYF9e646FgeW9r9dmAACgYKAVkSARASFQHGX2MipGQr-JgjPZ3TagNGwThFjRoVAUF8yKo5dtjIVAvXCAm5k07fgZSO0076 +.youtube.com TRUE / TRUE 1776835393 __Secure-3PSID g.a000uwj8nKnF2HIVNJiT6cqltlN6pMEx8Gbp11lOXLK1jg7CfK-DhsYrX1l-SwtgXCFxCuz7vwACgYKARMSARASFQHGX2Mi-wT7x_p3-rXdE8wcHQilpRoVAUF8yKqxu7DD-URg5qXQoIoRQzNx0076 +.youtube.com TRUE / FALSE 1776835393 HSID A78hbaZg_NmFGRYBQ +.youtube.com TRUE / TRUE 1776835393 SSID AFV_ARvy3ptjFGQo- +.youtube.com TRUE / FALSE 1776835393 APISID EVGC0fZ6HmXY_hyd/AOFSt7oHi6IX9oe2K +.youtube.com TRUE / TRUE 1776835393 SAPISID D9LAREU27e0jzJ0B/AiXjnBherq8yUuI8_ +.youtube.com TRUE / TRUE 1776835393 __Secure-1PAPISID D9LAREU27e0jzJ0B/AiXjnBherq8yUuI8_ +.youtube.com TRUE / TRUE 1776835393 __Secure-3PAPISID D9LAREU27e0jzJ0B/AiXjnBherq8yUuI8_ +.youtube.com TRUE / TRUE 1773833606 __Secure-1PSIDTS sidts-CjIB7pHptZVJltiOpcyL-ggS-aVrYwNwT9gBKgfMCSzBr0DKL-ubqjKlLiUqZFzchSnO1BAA +.youtube.com TRUE / TRUE 1773833606 __Secure-3PSIDTS sidts-CjIB7pHptZVJltiOpcyL-ggS-aVrYwNwT9gBKgfMCSzBr0DKL-ubqjKlLiUqZFzchSnO1BAA +.youtube.com TRUE / FALSE 1773833939 SIDCC AKEyXzX62tnFTxIxoB7EPWtFypEZ3jh_KHYBdR91eeUegIngOg3A27fmjlvrS5eELyWiSAhZz4g +.youtube.com TRUE / TRUE 1773833939 __Secure-1PSIDCC AKEyXzVhGAjPQRBtGctfEY9oIaqEQy2srXOk3OYLBGeuQ5oltKc0TUtEwQSYRcgCfqW7oaYRFZA +.youtube.com TRUE / TRUE 1773833939 __Secure-3PSIDCC AKEyXzXiSf7CyVgyfvqbJP20PSO_F3sW9PKg8WJ4W8qC0JGX1odFLYSVXu-OMOaBjTnDLw7c7RU +.youtube.com TRUE / TRUE 1757849938 VISITOR_PRIVACY_METADATA CgJJThIEGgAgZQ%3D%3D +.youtube.com TRUE / TRUE 1757849938 VISITOR_INFO1_LIVE 0dRpFqduvCM +.youtube.com TRUE / TRUE 0 YSC 92vz5nwwhB0 +.youtube.com TRUE / TRUE 1757834926 __Secure-ROLLOUT_TOKEN CPKggL-Ln6mhgwEQ3LXlhKCzigMY062W142TjAM%3D +.youtube.com TRUE / TRUE 1757849938 YT_DEVICE_MEASUREMENT_ID W1LSi4k= +.youtube.com TRUE / TRUE 1805369938 __Secure-YT_TVFAS t=475422&s=2 +.youtube.com TRUE / TRUE 1757849938 DEVICE_INFO ChxOelE0TXpFeE1qWTJORGt4TVRBNU9EQXhOZz09ENK25b4GGNK25b4G diff --git a/celerybeat-schedule.dir b/celerybeat-schedule.dir new file mode 100644 index 00000000..33cbef78 Binary files /dev/null and b/celerybeat-schedule.dir differ diff --git a/celerybeat-schedule.pag b/celerybeat-schedule.pag new file mode 100644 index 00000000..9a6fac80 Binary files /dev/null and b/celerybeat-schedule.pag differ diff --git a/core/celery.py b/core/celery.py index 76a7079c..e843efea 100644 --- a/core/celery.py +++ b/core/celery.py @@ -5,6 +5,7 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') app = Celery('datahub-api') +# from datahub import celery_tasks # Load task modules from all registered Django apps. app.config_from_object('django.conf:settings', namespace='CELERY') @@ -12,3 +13,5 @@ app.conf.broker_connection_retry_on_startup = True app.conf.worker_cancel_long_running_tasks_on_connection_loss = True app.autodiscover_tasks() + + diff --git a/core/settings.py b/core/settings.py index fa2923e8..7f6e4b21 100644 --- a/core/settings.py +++ b/core/settings.py @@ -18,6 +18,7 @@ collections.Callable = collections.abc.Callable from corsheaders.defaults import default_headers +from celery.schedules import crontab # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -62,6 +63,7 @@ "drf_spectacular_sidecar", "django_nose", "django_filters", + "django_celery_beat", # custom apps "accounts", "datahub", @@ -174,21 +176,22 @@ STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_URL = "static/" -AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID",'') -AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY",'') -AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME",'') -AWS_S3_REGION_NAME = os.environ.get("AWS_S3_REGION_NAME",'') # e.g., 'us-east-1' -AWS_S3_SIGNATURE_VERSION = 's3v4' +if os.environ.get("STORAGE", "s3") == "s3": -# Django Storages settings -DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' + AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID",'') + AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY",'') + AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME",'') + AWS_S3_REGION_NAME = os.environ.get("AWS_S3_REGION_NAME",'') # e.g., 'us-east-1' + AWS_S3_SIGNATURE_VERSION = 's3v4' -AWS_S3_FILE_OVERWRITE = False -AWS_DEFAULT_ACL = None -AWS_QUERYSTRING_AUTH = False -# URL of your S3 bucket -AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com' -if os.environ.get("STORAGE", "s3") == "s3": + # Django Storages settings + DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' + AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com' + + AWS_S3_FILE_OVERWRITE = False + AWS_DEFAULT_ACL = None + AWS_QUERYSTRING_AUTH = False + # URL of your S3 bucket MEDIA_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/' else: MEDIA_ROOT = os.path.join(BASE_DIR, "media") @@ -440,6 +443,8 @@ CELERY_BROKER_URL = os.environ.get("CELERY_BROKER_URL",'') FILE_UPLOAD_MAX_MEMORY_SIZE = 25 * 1024 * 1024 # 25 Mb limit CELERY_BROKER_URL = f'redis://{os.environ.get("REDIS_SERVICE", "loaclhost")}:6379/0' +CELERY_RESULT_BACKEND = f'redis://{os.environ.get("REDIS_SERVICE", "loaclhost")}:6379/0' + # SMTP server configuration @@ -447,3 +452,17 @@ SMTP_PORT = 587 # or 465 for SSL SMTP_USER = os.environ.get("SMTP_USER",'') SMTP_PASSWORD = os.environ.get("SMTP_PASSWORD",'') + + + +CELERY_ACCEPT_CONTENT = ['json'] +CELERY_TASK_SERIALIZER = 'json' +CELERY_RESULT_SERIALIZER = 'json' +CELERY_TIMEZONE = 'UTC' +CELERY_BEAT_SCHEDULE = { + 'fetch_dataset_for_all_files': { + 'task': 'core.utils.fetch_data_for_all_datasets', + 'schedule': crontab(minute=0, hour=0), # Daily at midnight minite=0 hour=0 + # 'schedule': crontab(minute='*/1') + }, +} \ No newline at end of file diff --git a/core/utils.py b/core/utils.py index 1ed60428..fd7c1f2d 100644 --- a/core/utils.py +++ b/core/utils.py @@ -7,10 +7,12 @@ import smtplib import time import urllib +import csv from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from inspect import formatannotationrelativeto from urllib import parse +from utils import file_operations as file_ops import pandas as pd import requests @@ -25,6 +27,13 @@ from core.constants import Constants +import json +import requests +from celery import shared_task +from datahub.models import DatasetV2File, DatasetV2 +from datetime import datetime, timedelta +from django.core.files.base import ContentFile +from urllib.parse import urlencode, urlparse, parse_qs, urlunparse LOGGER = logging.getLogger(__name__) # SG = sendgrid.SendGridAPIClient(settings.SENDGRID_API_KEY) @@ -278,3 +287,119 @@ def generate_hash_key_for_dashboard(pk, data, role_id=3, logged=False): print(hash_key) return hash_key +@shared_task +def fetch_data_for_all_datasets(): + # Get all DatasetV2File records that need to be updated + try: + dataset_files = DatasetV2File.objects.filter(source="live_api").all() + # Iterate through each dataset file and check the frequency and last pull date + for dataset_file in dataset_files: + # Get the frequency (weekly/monthly) from the connection details + frequency = dataset_file.connection_details.get('frequency', None) # Default to 'weekly' if not set + last_pull = dataset_file.connection_details.get('last_pull', None) + LOGGER.info(f"Data fetch checkking for {dataset_file.id}") + if frequency: + # If last_pull is None, consider it as never pulled + if not last_pull: + last_pull = datetime(1970, 1, 1) # Default to an old date, so it will always fetch the first time + else: + last_pull = datetime.strptime(last_pull, '%Y-%m-%d %H:%M:%S') + + # Get the current time + current_time = datetime.now() + current_time_str = current_time.strftime('%Y-%m-%d %H:%M:%S') + + # Determine if data should be pulled based on frequency and last pull date + if frequency == 'weekly' and (current_time - last_pull >= timedelta(weeks=1)): + LOGGER.info(f"Data fetching started for {dataset_file.id}") + if fetch_data_from_api(dataset_file, last_pull): + connection_details = dataset_file.connection_details + connection_details["last_pull"] = current_time_str + dataset_file.connection_details = connection_details + dataset_file.save() + elif frequency == 'monthly' and (current_time - last_pull >= timedelta(weeks=4)): + LOGGER.info(f"Data fetching started for {dataset_file.id}") + if fetch_data_from_api(dataset_file, last_pull): + connection_details = dataset_file.connection_details + connection_details["last_pull"] = current_time_str + dataset_file.connection_details = connection_details + dataset_file.save() + except Exception as e: + LOGGER.error( + f"Failed to fetch data from api ERROR: {e} and input fields: {e}") + +def fetch_data_from_api(dataset_file, last_pull): + # Get the API details from the connection_details field + try: + api_url = dataset_file.connection_details.get('url') + headers = dataset_file.connection_details.get('headers') + auth_type = dataset_file.connection_details.get('auth_type') + file_name = dataset_file.connection_details.get('file_name', "default") + # Prepare the request headers + request_headers = { + "Authorization": headers.get("Authorization") + } + parsed_url = urlparse(api_url) + query_params = parse_qs(parsed_url.query) + + # If 'created_at' is not in the query parameters, add it with today's date + if 'created_at' in query_params: + query_params['created_at'] = last_pull + + # Rebuild the URL with the new query parameters + new_query = urlencode(query_params, doseq=True) + updated_api_url = parsed_url._replace(query=new_query).geturl() + LOGGER.info(f"Updated api url {updated_api_url}") + today_date = datetime.today().strftime(' %Y-%m-%d %H:%M:%S') + + # Fetch the data from the API + response = requests.get(updated_api_url, headers=headers) + if response.status_code in [200, 201]: + try: + data = response.json() + except ValueError: + data = response.text + + file_path = file_ops.create_directory( + settings.DATASET_FILES_URL, [dataset_file.dataset.name, dataset_file.source]) + + # Write data to CSV or JSON based on its type + if isinstance(data, list): + # If data is a list, write to CSV + file_name = file_name + ".csv" if dataset_file.connection_details.get("file_replace", False) else file_name + today_date + ".csv" + + with open(file_path + "/" + file_name, "w", newline='', encoding='utf-8') as outfile: + writer = csv.DictWriter(outfile, fieldnames=data[0].keys()) + writer.writeheader() + writer.writerows(data) + else: + file_name = file_name + ".json" if dataset_file.connection_details.get("file_replace", False) else file_name + today_date + ".json" + # If data is not a list, write to JSON + with open(file_path + "/" + file_name, "w", encoding='utf-8') as outfile: + json.dump(data, outfile) + + if not dataset_file.connection_details.get("file_replace", False): + instance = DatasetV2File.objects.create( + dataset=dataset_file.dataset, + source=dataset_file.source, + file=os.path.join(dataset_file.dataset.name, dataset_file.source, file_name), + file_size=os.path.getsize( + os.path.join(settings.DATASET_FILES_URL, dataset_file.dataset.name, dataset_file.source, file_name)), + standardised_file=os.path.join(dataset_file.dataset.name, dataset_file.source, file_name), + standardised_configuration=dataset_file.standardised_configuration, + accessibility=dataset_file.accessibility, + connection_details={} + ) + LOGGER.info(f"""Data fetched from the api and saved in file: {file_name} for + the dataset: {dataset_file.dataset.name}, + dataset_file_id {dataset_file.id}""") + return True + else: + LOGGER.error(f"Failed to fetch data from api with status {response.status_code}") + return False + except Exception as e: + LOGGER.error( + f"Failed to fetch data from api ERROR: {e} and input fields: {dataset_file}") + LOGGER.error("Failed to fetch data from api") + return False + diff --git a/datahub/migrations/0084_alter_resourcefile_type.py b/datahub/migrations/0084_alter_resourcefile_type.py new file mode 100644 index 00000000..0aa9eef0 --- /dev/null +++ b/datahub/migrations/0084_alter_resourcefile_type.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.5 on 2025-03-09 10:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('datahub', '0083_organization_country_organization_district_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='resourcefile', + name='type', + field=models.CharField(choices=[('youtube', 'youtube'), ('pdf', 'pdf'), ('file', 'file'), ('website', 'website'), ('api', 'api'), ('s3', 's3'), ('google_drive', 'google_drive'), ('dropbox', 'dropbox'), ('azure_blob', 'azure_blob')], default='file', max_length=20, null=True), + ), + ] diff --git a/datahub/migrations/0085_alter_resourceusagepolicy_approval_status_and_more.py b/datahub/migrations/0085_alter_resourceusagepolicy_approval_status_and_more.py new file mode 100644 index 00000000..94021f90 --- /dev/null +++ b/datahub/migrations/0085_alter_resourceusagepolicy_approval_status_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.1.5 on 2025-03-17 06:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('datahub', '0084_alter_resourcefile_type'), + ] + + operations = [ + migrations.AlterField( + model_name='resourceusagepolicy', + name='approval_status', + field=models.CharField(choices=[('approved', 'approved'), ('rejected', 'rejected'), ('requested', 'requested'), ('recalled', 'recalled')], default='requested', max_length=255, null=True), + ), + migrations.AlterField( + model_name='usagepolicy', + name='approval_status', + field=models.CharField(choices=[('approved', 'approved'), ('rejected', 'rejected'), ('requested', 'requested'), ('recalled', 'recalled')], default='requested', max_length=255, null=True), + ), + ] diff --git a/datahub/models.py b/datahub/models.py index 1e6f2975..6085b24c 100644 --- a/datahub/models.py +++ b/datahub/models.py @@ -109,8 +109,8 @@ class UserOrganizationMap(TimeStampMixin): USAGE_POLICY_REQUEST_STATUS = ( ("approved", "approved"), ("rejected", "rejected"), - ("requested", "requested") - + ("requested", "requested"), + ("recalled", "recalled"), ) USAGE_POLICY_API_TYPE = ( ("dataset_file", "dataset_file"), diff --git a/datahub/serializers.py b/datahub/serializers.py index 29a47238..d8f00a47 100644 --- a/datahub/serializers.py +++ b/datahub/serializers.py @@ -1234,7 +1234,7 @@ def create_and_process_resource_file(self, resource, resource_file, state, categ # Trigger the tasks serializer_data = serializer.data # Get the serialized data create_vector_db.delay(serializer_data) - # load_categories(serializer_data) + # create_vector_db(serializer_data) def create(self, validated_data): diff --git a/datahub/views.py b/datahub/views.py index f434a562..b3ade370 100644 --- a/datahub/views.py +++ b/datahub/views.py @@ -2469,18 +2469,18 @@ def update(self, request, *args, **kwargs): try: instance = self.get_object() data = request.data.copy() - sub_categories_map = data.pop("sub_categories_map") + # sub_categories_map = data.pop("sub_categories_map") data["is_temp"] = False serializer = self.get_serializer(instance, data=data, partial=True) serializer.is_valid(raise_exception=True) - DatasetSubCategoryMap.objects.filter(dataset_id=instance).delete() + # DatasetSubCategoryMap.objects.filter(dataset_id=instance).delete() serializer.save() # sub_categories_map = json.loads(sub_categories_map[0]) if c else [] - dataset_sub_cat_instances= [ - DatasetSubCategoryMap(dataset=instance, sub_category=SubCategory.objects.get(id=sub_cat) - ) for sub_cat in sub_categories_map] + # dataset_sub_cat_instances= [ + # DatasetSubCategoryMap(dataset=instance, sub_category=SubCategory.objects.get(id=sub_cat) + # ) for sub_cat in sub_categories_map] - DatasetSubCategoryMap.objects.bulk_create(dataset_sub_cat_instances) + # DatasetSubCategoryMap.objects.bulk_create(dataset_sub_cat_instances) return Response(serializer.data, status=status.HTTP_200_OK) except ValidationError as e: @@ -2556,6 +2556,7 @@ def requested_datasets(self, request, *args, **kwargs): ) .filter(user_organization_map=user_map_id, type="dataset_file") .values( + "id", "approval_status", "updated_at", "accessibility_time", @@ -3586,7 +3587,7 @@ def create(self, request, *args, **kwargs): serializer_data["states"] = states serializer_data["districts"] = districts create_vector_db.delay(serializer_data) - # create_vector_db.delay(serializer_data) + # create_vector_db(serializer_data) return Response(serializer.data, status=status.HTTP_201_CREATED) except ValidationError as e: return Response(e.detail, status=status.HTTP_400_BAD_REQUEST) @@ -3657,8 +3658,8 @@ def resource_live_api_export(self, request): serializer = ResourceFileSerializer(data=serializer_data) serializer.is_valid(raise_exception=True) serializer.save() - # create_vector_db.delay(serializer.data) create_vector_db.delay(serializer.data) + # create_vector_db(serializer.data) return JsonResponse(serializer.data, status=status.HTTP_200_OK) return Response(file_path) LOGGER.error("Failed to fetch data from api") @@ -4071,16 +4072,45 @@ def fetch_files_in_folder(folder_id): # Fetch files from Dropbox def fetch_files_from_dropbox(self, details): + # dbx = dropbox.Dropbox(details['access_token']) + # result = dbx.files_list_folder('') + # files = result.entries + + # if not files: + # return [] + + # return [{'file_name': file.name, 'file_url': f"https://www.dropbox.com/home/{file.path_display}"} for file in files] + # Initialize Dropbox client dbx = dropbox.Dropbox(details['access_token']) + + # List files in the root folder result = dbx.files_list_folder('') files = result.entries + # If no files are found, return an empty list if not files: return [] - return [{'file_name': file.name, 'file_url': f"https://www.dropbox.com/home/{file.path_display}"} for file in files] + # List to store file details with public URLs + file_details = [] + + # Loop through each file and generate a shared link + for file in files: + if isinstance(file, dropbox.files.FileMetadata): + try: + # Create a shared link for the file + shared_link_metadata = dbx.sharing_create_shared_link(file.path_display) + file_url = shared_link_metadata.url.replace("dl=0", "dl=1") # Adjust URL for direct download - # Fetch files from Azure Blob Storage + file_details.append({ + 'file_name': file.name, + 'file_url': file_url + }) + except dropbox.exceptions.ApiError as e: + print(f"Error generating shared link for {file.name}: {e}") + + return file_details + # Fetch files from Azure Blob Storage def fetch_files_from_azure_blob(self, details): blob_service_client = BlobServiceClient(account_url=details['account_url'], credential=details['account_key']) container_client = blob_service_client.get_container_client(details['container_name']) @@ -4103,6 +4133,80 @@ def fetch_files_from_azure_blob(self, details): # new_path = old_path.replace(old_base_url, new_base_url) # resource.file.name = new_path # resource.save() + +# @shared_task +def pull_data_for_user(user_id): + # Get the user's data pull configuration + config = UserDataPullConfig.objects.get(user_id=user_id) + + # Determine when the next pull is due + current_time = datetime.now() + + # Check if the pull frequency is due (weekly or monthly) + if config.pull_frequency == 'weekly' and (current_time - config.last_pull >= timedelta(weeks=1)): + # Fetch data from the external API (e.g., some URL) + response = requests.get("YOUR_DATA_API_URL") + if response.status_code == 200: + data = response.json() + + for item in data: + # Create a new DatasetV2File entry for the fetched data + # Create a unique identifier for the file (you can customize how to name the file) + file_name = f"{uuid.uuid4().hex}_{item['file_name']}" # Adjust according to API response + + # If the file is returned as a URL or content, handle accordingly + file_content = requests.get(item['file_url']).content # Assuming `file_url` is returned in the API response + + # Create the DatasetV2File record + dataset_file = DatasetV2File.objects.create( + dataset=item['dataset'], # Map to the DatasetV2 instance + source="api", # Indicating that the file source is from the API + file=ContentFile(file_content, name=file_name), # Save the file to Django storage + file_size=len(file_content), # Set the file size from content + standardised_file=item.get('standardised_file', None), # If standardised file exists + standardised_configuration=item.get('standardised_configuration', {}), + accessibility=item.get('accessibility', 'public'), + connection_details=item.get('connection_details', {}), + ) + + # Map the DatasetV2File to UserDataPullConfig + config.resource_file = dataset_file + config.save() + + # Update the last pull time + config.last_pull = current_time + config.save() + + elif config.pull_frequency == 'monthly' and (current_time - config.last_pull >= timedelta(weeks=4)): + # Fetch monthly data (similar to weekly but can be different API or logic) + response = requests.get("YOUR_MONTHLY_DATA_API_URL") + if response.status_code == 200: + data = response.json() + + for item in data: + # Create a new DatasetV2File entry for the fetched data + file_name = f"{uuid.uuid4().hex}_{item['file_name']}" + file_content = requests.get(item['file_url']).content # Download the file content + + dataset_file = DatasetV2File.objects.create( + dataset=item['dataset'], # Link to the DatasetV2 model + source="api", + file=ContentFile(file_content, name=file_name), + file_size=len(file_content), + standardised_file=item.get('standardised_file', None), + standardised_configuration=item.get('standardised_configuration', {}), + accessibility=item.get('accessibility', 'public'), + connection_details=item.get('connection_details', {}), + ) + + # Link to the UserDataPullConfig + config.resource_file = dataset_file + config.save() + + # Update the last pull time + config.last_pull = current_time + config.save() + def telegram_dashboard(request): return render(request, 'streamlit.html', {'url': os.getenv("TELEGRAM_URL")}) diff --git a/entry.sh b/entry.sh new file mode 100755 index 00000000..bc474516 --- /dev/null +++ b/entry.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Run migrations +python manage.py makemigrations +python manage.py migrate + +# Load data +python manage.py loaddata db_scripts/userrole_fixture.yaml +# python manage.py loaddata admin.yaml +# Run Django development server +python manage.py runserver 0.0.0.0:8000 >> /datahub/farmstack_logs.txt 2>&1 & + +# Run Celery worker +celery -A core worker --loglevel=info >> /datahub/celery_logs.txt 2>&1 & + + +# Run Celery beat +celery -A core beat --loglevel=info >> /datahub/celery_beat_logs.txt 2>&1 & +# Run Celery flower +celery -A core flower --loglevel=info \ No newline at end of file diff --git a/inventory b/inventory deleted file mode 100644 index faa0b740..00000000 --- a/inventory +++ /dev/null @@ -1,24 +0,0 @@ -[chatbot] -13.208.206.182 -[dev] -13.208.95.133 -[test] -3.104.250.92 -[demo] -15.152.122.9 -[frame] -44.238.12.251 -[eth] -13.208.125.229 -[cimmyt] -44.238.12.251 -[eth_prod] -54.180.23.125 -[eth_dev] -43.201.134.90 -[eth_stage] -3.34.224.80 -[d2fo] -65.1.104.245 -[farmstack-web] -47.128.1.51 diff --git a/microsite/migrations/0003_delete_inspection.py b/microsite/migrations/0003_delete_inspection.py new file mode 100644 index 00000000..fa857f49 --- /dev/null +++ b/microsite/migrations/0003_delete_inspection.py @@ -0,0 +1,16 @@ +# Generated by Django 4.1.5 on 2025-03-17 06:53 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('microsite', '0002_inspection'), + ] + + operations = [ + migrations.DeleteModel( + name='Inspection', + ), + ] diff --git a/microsite/views.py b/microsite/views.py index 71e975f8..d1d00702 100644 --- a/microsite/views.py +++ b/microsite/views.py @@ -27,6 +27,7 @@ from accounts.models import User, UserRole from accounts.serializers import UserCreateSerializer +from ai.retriever.manual_retrival import QuadrantRetrival from connectors.models import Connectors from core.constants import Constants from core.utils import ( @@ -1268,6 +1269,47 @@ def get_categories_by_org(self, request): serializer = CategorySerializer(categories, many=True) return Response(serializer.data, status=status.HTTP_200_OK) + + @action(detail=False, methods=["post"]) + def get_content(self, request): + embeddings = [] + email = request.data.get("email") + query = request.data.get("query") + user_obj = User.objects.filter(email=email) + user = user_obj.first() + data = ( + ResourceFile.objects.select_related( + "resource", + "resource__user_map", + "resource__user_map__user" + ) + ) + if not user: + return Response([]) + elif user.on_boarded_by: + data = ( + data.filter( + Q(resource__user_map__user__on_boarded_by=user.on_boarded_by) + | Q(resource__user_map__user_id=user.on_boarded_by) + ) + ) + elif user.role_id == 6: + data = ( + data.filter( + Q(resource__user_map__user__on_boarded_by=user.id) + | Q(resource__user_map__user_id=user.id) + ) + ) + else: + data = ( + data.filter(resource__user_map__user__on_boarded_by=None).exclude(resource__user_map__user__role_id=6) + ) + resource_file_ids = data.values_list("id", flat=True).all() + + similar_chunks = QuadrantRetrival().retrieve_chunks(resource_file_ids, query, "", "","","","","", 10, 0.17) + return Response(similar_chunks) + + # Created a new class to return data from kde, agnext and krishitantra data stored in json format in utils folder class AdexAPIDatasetViewSet(GenericViewSet): diff --git a/nohup.out b/nohup.out deleted file mode 100644 index 0bfca0e2..00000000 --- a/nohup.out +++ /dev/null @@ -1,477 +0,0 @@ -Watching for file changes with StatReloader -Bad Request: /accounts/register/ -Bad Request: /accounts/register/ -"POST /accounts/register/ HTTP/1.1" 400 50 -"POST /accounts/register/ HTTP/1.1" 400 50 -"OPTIONS /accounts/login/ HTTP/1.1" 200 0 -HTTP Error 401: Unauthorized -"POST /accounts/login/ HTTP/1.1" 201 113 -HTTP Error 401: Unauthorized -"POST /accounts/login/ HTTP/1.1" 201 113 -/home/ubuntu/datahub-api/core/settings.py changed, reloading. -Performing system checks... - -System check identified no issues (0 silenced). -June 23, 2022 - 05:53:35 -Django version 4.0.5, using settings 'core.settings' -Starting development server at http://0.0.0.0:8000/ -Quit the server with CONTROL-C. -{'email': 'varun@digitalgreen.org', 'user_otp': '670762', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 5, 53, 35, 746055)} -{'email': 'varun@digitalgreen.org', 'user_otp': '135900', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 5, 53, 35, 746055)} -Watching for file changes with StatReloader -/home/ubuntu/datahub-api/core/settings.py changed, reloading. -Performing system checks... - -System check identified no issues (0 silenced). -June 23, 2022 - 06:26:37 -Django version 4.0.5, using settings 'core.settings' -Starting development server at http://0.0.0.0:8000/ -Quit the server with CONTROL-C. -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 22, in - main() - File "/home/ubuntu/datahub-api/manage.py", line 18, in main - execute_from_command_line(sys.argv) - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line - utility.execute() - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 386, in execute - settings.INSTALLED_APPS - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/conf/__init__.py", line 87, in __getattr__ - self._setup(name) - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/conf/__init__.py", line 74, in _setup - self._wrapped = Settings(settings_module) - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/conf/__init__.py", line 183, in __init__ - mod = importlib.import_module(self.SETTINGS_MODULE) - File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module - return _bootstrap._gcd_import(name[level:], package, level) - File "", line 1050, in _gcd_import - File "", line 1027, in _find_and_load - File "", line 1006, in _find_and_load_unlocked - File "", line 688, in _load_unlocked - File "", line 879, in exec_module - File "", line 1017, in get_code - File "", line 947, in source_to_code - File "", line 241, in _call_with_frames_removed - File "/home/ubuntu/datahub-api/core/settings.py", line 182 - EMAIL_HOST_USER = "farmstack.dg@gmail.com - ^ -SyntaxError: unterminated string literal (detected at line 182) -Watching for file changes with StatReloader -Exception in thread django-main-thread: -Traceback (most recent call last): - File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner - self.run() - File "/usr/lib/python3.10/threading.py", line 946, in run - self._target(*self._args, **self._kwargs) - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/utils/autoreload.py", line 64, in wrapper - fn(*args, **kwargs) - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/core/management/commands/runserver.py", line 158, in inner_run - run( - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/core/servers/basehttp.py", line 236, in run - httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6) - File "/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/django/core/servers/basehttp.py", line 76, in __init__ - super().__init__(*args, **kwargs) - File "/usr/lib/python3.10/socketserver.py", line 452, in __init__ - self.server_bind() - File "/usr/lib/python3.10/wsgiref/simple_server.py", line 50, in server_bind - HTTPServer.server_bind(self) - File "/usr/lib/python3.10/http/server.py", line 136, in server_bind - socketserver.TCPServer.server_bind(self) - File "/usr/lib/python3.10/socketserver.py", line 466, in server_bind - self.socket.bind(self.server_address) -OverflowError: bind(): port must be 0-65535. -Performing system checks... - -System check identified no issues (0 silenced). -June 23, 2022 - 06:30:17 -Django version 4.0.5, using settings 'core.settings' -Starting development server at http://0.0.0.0:80000/ -Quit the server with CONTROL-C. -Watching for file changes with StatReloader -"POST /accounts/register/ HTTP/1.1" 201 358 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"OPTIONS /accounts/otp/ HTTP/1.1" 200 0 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"OPTIONS /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 200 0 -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 404 23 -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 404 23 -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 404 23 -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 404 23 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -Unauthorized: /accounts/otp/ -Unauthorized: /accounts/otp/ -"POST /accounts/otp/ HTTP/1.1" 401 57 -"POST /accounts/otp/ HTTP/1.1" 401 57 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -Bad Request: /accounts/login/ -Bad Request: /accounts/login/ -"POST /accounts/login/ HTTP/1.1" 400 31 -"POST /accounts/login/ HTTP/1.1" 400 31 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"OPTIONS /accounts/login/ HTTP/1.1" 200 0 -"POST /accounts/login/ HTTP/1.1" 201 117 -"OPTIONS /accounts/otp/ HTTP/1.1" 200 0 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -Bad Request: /accounts/login/ -Bad Request: /accounts/login/ -"POST /accounts/login/ HTTP/1.1" 400 31 -"POST /accounts/login/ HTTP/1.1" 400 31 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"OPTIONS /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 200 0 -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 404 23 -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/ HTTP/1.1" 404 23 -- Broken pipe from ('162.142.125.220', 36190) - -Not Found: / -Not Found: / -"GET / HTTP/1.1" 404 2930 -"GET / HTTP/1.1" 404 2930 -- Broken pipe from ('162.142.125.220', 58574) - -Not Found: / -Not Found: / -"GET / HTTP/1.1" 404 2930 -"GET / HTTP/1.1" 404 2930 -code 505, message Invalid HTTP version (2.0) -"PRI * HTTP/2.0" 505 - -"PRI * HTTP/2.0" 505 - -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"OPTIONS /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47//profileid/ HTTP/1.1" 200 0 -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47//profileid/ -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47//profileid/ -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47//profileid/ HTTP/1.1" 404 6080 -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47//profileid/ HTTP/1.1" 404 6080 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"OPTIONS /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 200 0 -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/6ad526eb-316f-4b99-b52d-d87a623ff101/ -Not Found: /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/6ad526eb-316f-4b99-b52d-d87a623ff101/ -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 404 6158 -"PUT /accounts/register/eddc9ee1-f3f9-4577-8c53-7553b5cced47/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 404 6158 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"OPTIONS /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 200 0 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 157 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 162 -Not Found: / -Not Found: / -"GET / HTTP/1.1" 404 2930 -"GET / HTTP/1.1" 404 2930 -Not Found: /favicon.ico -Not Found: /favicon.ico -"GET /favicon.ico HTTP/1.1" 404 2981 -"GET /favicon.ico HTTP/1.1" 404 2981 -Performing system checks... - -System check identified no issues (0 silenced). -June 23, 2022 - 06:30:45 -Django version 4.0.5, using settings 'core.settings' -Starting development server at http://0.0.0.0:8000/ -Quit the server with CONTROL-C. -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '309581', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '076911', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '447983', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '447279', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '094352', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '716171', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '931552', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '311375', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '582197', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '011741', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '052089', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '878862', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '863216', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '614363', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '884876', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '383258', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '560575', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '176569', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '947851', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '584752', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '076228', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '413572', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '295018', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '815261', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '722207', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '311010', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '465889', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '513180', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '994112', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '852420', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 6, 30, 45, 367482)} -/usr/bin/env: ‘python’: No such file or directory -/usr/bin/env: ‘python’: No such file or directory -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 11, in main - from django.core.management import execute_from_command_line -ModuleNotFoundError: No module named 'django' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 22, in - main() - File "/home/ubuntu/datahub-api/manage.py", line 13, in main - raise ImportError( -ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 11, in main - from django.core.management import execute_from_command_line -ModuleNotFoundError: No module named 'django' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 22, in - main() - File "/home/ubuntu/datahub-api/manage.py", line 13, in main - raise ImportError( -ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 11, in main - from django.core.management import execute_from_command_line -ModuleNotFoundError: No module named 'django' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 22, in - main() - File "/home/ubuntu/datahub-api/manage.py", line 13, in main - raise ImportError( -ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 11, in main - from django.core.management import execute_from_command_line -ModuleNotFoundError: No module named 'django' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 22, in - main() - File "/home/ubuntu/datahub-api/manage.py", line 13, in main - raise ImportError( -ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 11, in main - from django.core.management import execute_from_command_line -ModuleNotFoundError: No module named 'django' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/ubuntu/datahub-api/manage.py", line 22, in - main() - File "/home/ubuntu/datahub-api/manage.py", line 13, in main - raise ImportError( -ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? -Watching for file changes with StatReloader -Bad Request: /accounts/register/ -Bad Request: /accounts/register/ -"POST /accounts/register/ HTTP/1.1" 400 50 -"POST /accounts/register/ HTTP/1.1" 400 50 -code 400, message Bad request version ('\x04/©´ïWg_û¼\x8a(\x07Ó') -You're accessing the development server over HTTPS, but it only supports HTTP. - -You're accessing the development server over HTTPS, but it only supports HTTP. - -code 400, message Bad request version ('\x00\x1b\x00\x00\x18datahubtest.farmstack.co\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00') -You're accessing the development server over HTTPS, but it only supports HTTP. - -You're accessing the development server over HTTPS, but it only supports HTTP. - -code 400, message Bad request version ('\x00\x1b\x00\x00\x18datahubtest.farmstack.co\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00') -You're accessing the development server over HTTPS, but it only supports HTTP. - -You're accessing the development server over HTTPS, but it only supports HTTP. - -code 400, message Bad request version ('ÚÚ\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93') -You're accessing the development server over HTTPS, but it only supports HTTP. - -You're accessing the development server over HTTPS, but it only supports HTTP. - -code 400, message Bad request version ('\x9a\x9a\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93') -You're accessing the development server over HTTPS, but it only supports HTTP. - -You're accessing the development server over HTTPS, but it only supports HTTP. - -code 400, message Bad request version ('\x00\x1b\x00\x00\x18datahubtest.farmstack.co\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00') -You're accessing the development server over HTTPS, but it only supports HTTP. - -You're accessing the development server over HTTPS, but it only supports HTTP. - -Not Found: / -Not Found: / -"GET / HTTP/1.1" 404 2942 -"GET / HTTP/1.1" 404 2942 -Not Found: /favicon.ico -Not Found: /favicon.ico -"GET /favicon.ico HTTP/1.1" 404 2993 -"GET /favicon.ico HTTP/1.1" 404 2993 -"GET /datahub/participant HTTP/1.1" 301 0 -/home/ubuntu/datahub-api/.venv/lib/python3.10/site-packages/rest_framework/pagination.py:200: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: QuerySet. - paginator = self.django_paginator_class(queryset, page_size) -"GET /datahub/participant/ HTTP/1.1" 200 12821 -"GET /static/rest_framework/css/bootstrap-tweaks.css HTTP/1.1" 200 3385 -"GET /static/rest_framework/css/prettify.css HTTP/1.1" 200 817 -"GET /static/rest_framework/css/default.css HTTP/1.1" 200 1152 -"GET /static/rest_framework/js/ajax-form.js HTTP/1.1" 200 3597 -"GET /static/rest_framework/css/bootstrap.min.css HTTP/1.1" 200 121457 -"GET /static/rest_framework/js/jquery-3.5.1.min.js HTTP/1.1" 200 89476 -"GET /static/rest_framework/js/csrf.js HTTP/1.1" 200 1719 -"GET /static/rest_framework/js/bootstrap.min.js HTTP/1.1" 200 39680 -"GET /static/rest_framework/js/prettify-min.js HTTP/1.1" 200 13632 -"GET /static/rest_framework/js/default.js HTTP/1.1" 200 1268 -"GET /static/rest_framework/img/grid.png HTTP/1.1" 200 1458 -Bad Request: /datahub/organization/ -Bad Request: /datahub/organization/ -"POST /datahub/organization/ HTTP/1.1" 400 84 -"POST /datahub/organization/ HTTP/1.1" 400 84 -Method Not Allowed: /datahub/organization/ -Method Not Allowed: /datahub/organization/ -"GET /datahub/organization/ HTTP/1.1" 405 9599 -"GET /datahub/organization/ HTTP/1.1" 405 9599 -"GET /static/rest_framework/css/prettify.css HTTP/1.1" 200 817 -"GET /static/rest_framework/css/bootstrap-tweaks.css HTTP/1.1" 200 3385 -"GET /static/rest_framework/css/default.css HTTP/1.1" 200 1152 -"GET /static/rest_framework/css/bootstrap.min.css HTTP/1.1" 200 121457 -"GET /static/rest_framework/js/jquery-3.5.1.min.js HTTP/1.1" 200 89476 -"GET /static/rest_framework/js/ajax-form.js HTTP/1.1" 200 3597 -"GET /static/rest_framework/js/bootstrap.min.js HTTP/1.1" 200 39680 -"GET /static/rest_framework/js/prettify-min.js HTTP/1.1" 200 13632 -"GET /static/rest_framework/js/csrf.js HTTP/1.1" 200 1719 -"POST /datahub/organization/ HTTP/1.1" 201 572 -Bad Request: /datahub/organization/ -Bad Request: /datahub/organization/ -"POST /datahub/organization/ HTTP/1.1" 400 84 -"POST /datahub/organization/ HTTP/1.1" 400 84 -Bad Request: /datahub/organization/ -Bad Request: /datahub/organization/ -"POST /datahub/organization/ HTTP/1.1" 400 66 -"POST /datahub/organization/ HTTP/1.1" 400 66 -Method Not Allowed: /datahub/organization/ -Method Not Allowed: /datahub/organization/ -"GET /datahub/organization/ HTTP/1.1" 405 9599 -"GET /datahub/organization/ HTTP/1.1" 405 9599 -"GET /static/rest_framework/js/jquery-3.5.1.min.js HTTP/1.1" 200 89476 -"GET /static/rest_framework/css/bootstrap.min.css HTTP/1.1" 200 121457 -"GET /static/rest_framework/js/csrf.js HTTP/1.1" 200 1719 -"GET /static/rest_framework/js/ajax-form.js HTTP/1.1" 200 3597 -"GET /static/rest_framework/js/bootstrap.min.js HTTP/1.1" 200 39680 -"GET /static/rest_framework/js/prettify-min.js HTTP/1.1" 200 13632 -"GET /static/rest_framework/js/default.js HTTP/1.1" 200 1268 -"GET /static/rest_framework/img/grid.png HTTP/1.1" 200 1458 -"POST /datahub/organization/ HTTP/1.1" 201 585 -Watching for file changes with StatReloader -Bad Request: /accounts/register/ -Bad Request: /accounts/register/ -"POST /accounts/register/ HTTP/1.1" 400 50 -"POST /accounts/register/ HTTP/1.1" 400 50 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 158 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 158 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 158 -"POST /accounts/login/ HTTP/1.1" 201 117 -Unauthorized: /accounts/otp/ -Unauthorized: /accounts/otp/ -"POST /accounts/otp/ HTTP/1.1" 401 57 -"POST /accounts/otp/ HTTP/1.1" 401 57 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 158 -/home/ubuntu/datahub-api/core/settings.py changed, reloading. -Performing system checks... - -System check identified no issues (0 silenced). -June 23, 2022 - 12:20:15 -Django version 4.0.5, using settings 'core.settings' -Starting development server at http://0.0.0.0:8000/ -Quit the server with CONTROL-C. -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '796405', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 12, 20, 15, 9720)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '881128', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 12, 20, 15, 9720)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '279788', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 12, 20, 15, 9720)} -{'email': 'jashwanth@digitalgreen.org', 'user_otp': '166905', 'otp_count': 1, 'updation_time': datetime.datetime(2022, 6, 23, 12, 20, 15, 9720)} -Watching for file changes with StatReloader -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 156 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 158 -Watching for file changes with StatReloader -"POST /accounts/login/ HTTP/1.1" 201 117 -Bad Request: /accounts/register/ -Bad Request: /accounts/register/ -"POST /accounts/register/ HTTP/1.1" 400 50 -"POST /accounts/register/ HTTP/1.1" 400 50 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 139 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 138 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 143 -"POST /accounts/login/ HTTP/1.1" 201 117 -"POST /accounts/otp/ HTTP/1.1" 200 618 -"PUT /accounts/register/6ad526eb-316f-4b99-b52d-d87a623ff101/ HTTP/1.1" 201 155 -"POST /datahub/organization/ HTTP/1.1" 201 599 diff --git a/participant/views.py b/participant/views.py index 47d910be..04200c27 100644 --- a/participant/views.py +++ b/participant/views.py @@ -7,6 +7,7 @@ import re import subprocess import time +import csv from bdb import set_trace from contextlib import closing from functools import reduce @@ -2016,7 +2017,7 @@ def database_live_api_export(self, request): dataset_name = request.data.get("dataset_name") source = request.data.get("source") file_name = request.data.get("file_name") - + headers = {} if auth_type == 'NO_AUTH': response = requests.get(url) elif auth_type == 'API_KEY': @@ -2035,25 +2036,49 @@ def database_live_api_export(self, request): except ValueError: data = response.text + # Create the directory to store the file file_path = file_ops.create_directory( settings.DATASET_FILES_URL, [dataset_name, source]) - with open(file_path + "/" + file_name + ".json", "w") as outfile: - if type(data) == list: + + # Determine file extension based on data type (list or not) + if isinstance(data, list): + file_extension = ".csv" + else: + file_extension = ".json" + + # Set file name + file_name_with_extension = file_name + file_extension + + # Save data as CSV if it is a list, otherwise save it as JSON + if isinstance(data, list): + # Save as CSV + with open(file_path + "/" + file_name_with_extension, "w", newline='', encoding='utf-8') as outfile: + writer = csv.DictWriter(outfile, fieldnames=data[0].keys()) + writer.writeheader() + writer.writerows(data) + else: + # Save as JSON + with open(file_path + "/" + file_name_with_extension, "w", encoding='utf-8') as outfile: json.dump(data, outfile) - else: - outfile.write(json.dumps(data)) - # result = os.listdir(file_path) + # Create DatasetV2File instance + current_time = datetime.datetime.utcnow() + current_time_str = current_time.strftime('%Y-%m-%d %H:%M:%S') instance = DatasetV2File.objects.create( dataset=dataset, source=source, - file=os.path.join(dataset_name, source, - file_name + ".json"), + file=os.path.join(dataset_name, source, file_name_with_extension), file_size=os.path.getsize( - os.path.join(settings.DATASET_FILES_URL, dataset_name, source, file_name + ".json")), - standardised_file=os.path.join( - dataset_name, source, file_name + ".json"), + os.path.join(settings.DATASET_FILES_URL, dataset_name, source, file_name_with_extension)), + standardised_file=os.path.join(dataset_name, source, file_name_with_extension), + connection_details={"auth_type": auth_type, "url": url, "headers": headers, + "frequency": request.data.get("frequency", ""), + "file_replace": request.data.get("file_replace", False), + "last_pull": current_time_str, + "file_name": file_name} ) + + # Serialize and return the response serializer = DatasetFileV2NewSerializer(instance) return JsonResponse(serializer.data, status=status.HTTP_200_OK) diff --git a/report.html b/report.html deleted file mode 100644 index be00521f..00000000 --- a/report.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - report.html - - - -

report.html

-

Report generated on 27-Jul-2023 at 06:22:26 by pytest-html v3.2.0

-

Summary

-

0 tests ran in 1.22 seconds.

- 0 passed, 0 skipped, 0 failed, 7 errors, 0 expected failures, 0 unexpected passes -

Results

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ResultTestDurationLinks
Errordatahub/tests/test_models.py::collect
-
ImportError while importing test module '/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/test_models.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
E ModuleNotFoundError: No module named 'tests.test_models'
Errordatahub/tests/test_urls.py::collect
-
import file mismatch:
imported module 'tests.test_urls' has this __file__ attribute:
/Users/ugesh/PycharmProjects/datahub-api/accounts/tests/test_urls.py
which is not the same as the test file we want to collect:
/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/test_urls.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
Errordatahub/tests/test_urls_new.py::collect
-
ImportError while importing test module '/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/test_urls_new.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
E ModuleNotFoundError: No module named 'tests.test_urls_new'
Errordatahub/tests/test_views.py::collect
-
import file mismatch:
imported module 'tests.test_views' has this __file__ attribute:
/Users/ugesh/PycharmProjects/datahub-api/accounts/tests/test_views.py
which is not the same as the test file we want to collect:
/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/test_views.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
Errordatahub/tests/test_views_new.py::collect
-
ImportError while importing test module '/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/test_views_new.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
E ModuleNotFoundError: No module named 'tests.test_views_new'
Errorparticipant/tests/test_urls.py::collect
-
import file mismatch:
imported module 'test_urls' has this __file__ attribute:
/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/tests_v2/test_urls.py
which is not the same as the test file we want to collect:
/Users/ugesh/PycharmProjects/datahub-api/participant/tests/test_urls.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
Errorparticipant/tests/test_views.py::collect
-
import file mismatch:
imported module 'test_views' has this __file__ attribute:
/Users/ugesh/PycharmProjects/datahub-api/datahub/tests/tests_v2/test_views.py
which is not the same as the test file we want to collect:
/Users/ugesh/PycharmProjects/datahub-api/participant/tests/test_views.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
\ No newline at end of file diff --git a/req.txt b/req.txt deleted file mode 100644 index 433623a0..00000000 --- a/req.txt +++ /dev/null @@ -1,317 +0,0 @@ -asgiref==3.6.0 -astroid==2.13.2 -asyncio==3.4.3 -attrs==21.4.0 -CacheControl==0.12.11 -cachy==0.3.0 -certifi==2022.5.18.1 -cffi==1.15.1 -charset-normalizer==2.0.12 -cleo==0.8.1 -click==8.1.3 -clikit==0.6.2 -coreapi==2.3.3 -coreschema==0.0.4 -coverage==7.0.3 -crashtest==0.3.1 -cryptography==37.0.2 -cssutils==2.6.0 -dateutils==0.6.12 -dill==0.3.6 -distlib==0.3.4 -Django==4.1.5 -django-configurations==2.3.2 -django-cors-headers==3.13.0 -django-environ==0.9.0 -django-extensions==3.1.5 -django-filter==22.1 -django-nose==1.4.7 -django-rest-framework-braces==0.3.4 -django_debug_toolbar==3.8.1 -djangorestframework==3.13.1 -djangorestframework-simplejwt==5.2.2 -drf-generators==0.5.0 -drf-spectacular==0.22.1 -drf-spectacular-sidecar==2022.7.1 -drf-yasg==1.20.0 -et-xmlfile==1.1.0 -exceptiongroup==1.1.0 -factory-boy==3.2.1 -Faker==16.6.0 -filelock==3.9.0 -filetype==1.1.0 -html5lib==1.1 -idna==3.3 -importlib-metadata==6.0.0 -importlib-resources==5.10.2 -inflection==0.5.1 -iniconfig==1.1.1 -isort==5.10.1 -itypes==1.2.0 -jaraco.classes==3.2.3 -jeepney==0.8.0 -Jinja2==3.1.2 -jsonschema==4.17.3 -keyring==23.13.1 -lazy-object-proxy==1.7.1 -lockfile==0.12.2 -MarkupSafe==2.1.1 -mccabe==0.7.0 -model-bakery==1.9.0 -more-itertools==9.0.0 -msgpack==1.0.4 -mypy-extensions==0.4.3 -mysql-connector-python==8.0.28 -nose==1.3.7 -numpy==1.24.1 -pandas==1.5.2 -pastel==0.2.1 -pathspec==0.9.0 -pexpect==4.8.0 -Pillow==9.4.0 -pkginfo==1.8.2 -pkgutil_resolve_name==1.3.10 -platformdirs==2.6.2 -plazy==0.1.5 -pluggy==1.0.0 -protobuf==3.20.1 -psycopg2-binary==2.9.3 -ptyprocess==0.7.0 -py==1.11.0 -pyaml==21.10.1 -pycparser==2.21 -pydantic==1.9.2 -PyJWT==2.4.0 -pylev==1.4.0 -pylint==2.15.10 -pyotp==2.6.0 -pyparsing==3.0.9 -pyrsistent==0.19.3 -pytest==7.2.0 -pytest-django==4.5.2 -pytest-factoryboy==2.5.1 -python-dateutil==2.8.2 -python-http-client==3.3.7 -python-magic==0.4.27 -python-on-whales==0.55.0 -pytz==2022.1 -PyYAML==6.0 -requests==2.27.1 -requests-toolbelt==0.9.1 -ruamel.yaml==0.17.21 -ruamel.yaml.clib==0.2.6 -SecretStorage==3.3.2 -sendgrid==6.9.7 -shellingham==1.4.0 -six==1.16.0 -sqlparse==0.4.2 -starkbank-ecdsa==2.0.3 -tomli==2.0.1 -tomlkit==0.11.0 -tqdm==4.64.0 -typer==0.6.1 -typing_extensions==4.4.0 -uritemplate==4.1.1 -urllib3==1.26.9 -virtualenv==20.14.1 -webencodings==0.5.1 -wrapt==1.14.1 -xlrd==2.0.1 -xlwt==1.3.0 -xmltodict==0.13.0 -zipp==3.11.0 -ruamel.yaml -phonenumbers==8.13.15 -openpyxl==3.0.10 -testcontainers==3.7.1 -sqlalchemy>=1.3,<2.0 -secrets==1.0.2 - -aiohttp==3.9.1 -aiosignal==1.3.1 -anyio==3.7.1 -asgiref==3.6.0 -astroid==2.13.2 -async-timeout==4.0.3 -asyncio==3.4.3 -attrs==21.4.0 -CacheControl==0.12.11 -cachy==0.3.0 -certifi==2022.5.18.1 -cffi==1.15.1 -charset-normalizer==2.0.12 -cleo==0.8.1 -click==8.1.3 -clikit==0.6.2 -configobj==5.0.8 -coreapi==2.3.3 -coreschema==0.0.4 -coverage==7.0.3 -crashtest==0.3.1 -cryptography==37.0.2 -cssutils==2.6.0 -dataclasses-json==0.6.3 -dateutils==0.6.12 -decorator==4.4.2 -deprecation==2.1.0 -dill==0.3.6 -distlib==0.3.4 -Django==4.1.5 -django-configurations==2.3.2 -django-cors-headers==3.13.0 -django-environ==0.9.0 -django-extensions==3.1.5 -django-filter==22.1 -django-nose==1.4.7 -django-rest-framework-braces==0.3.4 -django_debug_toolbar==3.8.1 -djangorestframework==3.13.1 -djangorestframework-simplejwt==5.2.2 -docker==6.1.3 -drf-generators==0.5.0 -drf-spectacular==0.22.1 -drf-spectacular-sidecar==2022.7.1 -drf-yasg==1.20.0 -et-xmlfile==1.1.0 -exceptiongroup==1.1.0 -factory-boy==3.2.1 -Faker==16.6.0 -ffmpeg==1.4 -filelock==3.9.0 -filetype==1.1.0 -frozenlist==1.4.0 -future==0.18.3 -html5lib==1.1 -idna==3.3 -imageio==2.33.0 -imageio-ffmpeg==0.4.9 -importlib-metadata==6.0.0 -importlib-resources==5.10.2 -inflection==0.5.1 -iniconfig==1.1.1 -isort==5.10.1 -itypes==1.2.0 -jaraco.classes==3.2.3 -jeepney==0.8.0 -Jinja2==3.1.2 -jsonpatch==1.33 -jsonpointer==2.4 -jsonschema==4.17.3 -keyring==23.13.1 -langchain-core - -langchain==0.0.346 -langsmith==0.0.83 -lazy-object-proxy==1.7.1 -lockfile==0.12.2 -MarkupSafe==2.1.1 -marshmallow==3.20.1 -mccabe==0.7.0 -model-bakery==1.9.0 -more-itertools==9.0.0 -moviepy==1.0.3 -msgpack==1.0.4 -multidict==6.0.4 -mypy-extensions==0.4.3 -mysql-connector-python==8.0.28 -nose==1.3.7 -numpy==1.24.1 -openai==0.28.1 -openpyxl==3.0.10 -packaging==23.2 -pandas==1.5.2 -pastel==0.2.1 -pathspec==0.9.0 -pexpect==4.8.0 -pgvector==0.2.4 -phonenumbers==8.13.15 -Pillow==9.4.0 -pkginfo==1.8.2 -pkgutil_resolve_name==1.3.10 -platformdirs==2.6.2 -plazy==0.1.5 -pluggy==1.0.0 -# poetry==1.1.13 -# poetry-core==1.0.8 -proglog==0.1.10 -protobuf==3.20.1 -psycopg -ptyprocess==0.7.0 -py==1.11.0 -pyaml==21.10.1 -pyasn1==0.5.1 -pyasn1-modules==0.3.0 -pycparser==2.21 -pydantic==1.9.2 -PyJWT==2.4.0 -pylev==1.4.0 -pylint==2.15.10 -PyMuPDF==1.23.12 -PyMuPDFb==1.23.9 -pyotp==2.6.0 -pyparsing==3.0.9 -pyrsistent==0.19.3 -pytest==7.2.0 -pytest-django==4.5.2 -pytest-factoryboy==2.5.1 -python-dateutil==2.8.2 -python-dotenv==1.0.0 -python-gnupg==0.5.1 -python-http-client==3.3.7 -python-ldap==3.4.4 -python-magic==0.4.27 -python-on-whales==0.55.0 -pytube==15.0.0 -pytz==2022.1 -PyYAML==6.0 -regex==2023.12.25 -requests==2.27.1 -requests-toolbelt==0.9.1 -ruamel.yaml==0.17.21 -ruamel.yaml.clib==0.2.6 -secrets==1.0.2 -SecretStorage==3.3.2 -sendgrid==6.9.7 -shellingham==1.4.0 -six==1.16.0 -sniffio==1.3.0 -SQLAlchemy -sqlparse==0.4.2 -starkbank-ecdsa==2.0.3 -systematic==4.8.7 -tenacity==8.2.3 -testcontainers==3.7.1 -tiktoken==0.5.2 -tomli==2.0.1 -tomlkit==0.11.0 -tqdm==4.64.0 -typer==0.6.1 -typing-inspect==0.9.0 -typing_extensions==4.4.0 -uritemplate==4.1.1 -urllib3==1.26.9 -virtualenv==20.14.1 -webencodings==0.5.1 -websocket-client==1.7.0 -wrapt==1.14.1 -xlrd==2.0.1 -xlwt==1.3.0 -xmltodict==0.13.0 -yarl==1.9.3 -zipp==3.11.0 -psycopg==3.1.14 -psycopg-binary -reportlab -google-api-python-client -unstructured -python-docx -beautifulsoup4 -celery -redis -flower -APScheduler==3.10.4 -django-apscheduler==0.6.2 -google-api-python-client -google-auth-httplib2 -google-auth-oauthlib - diff --git a/requirements.txt b/requirements.txt index 7e2bfd59..b535bf37 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,7 @@ coverage==7.0.3 coloredlogs==15.0.1 contourpy==1.2.1 crashtest==0.3.1 -cryptography==42.0.8 +cryptography cycler==0.12.1 cssutils==2.6.0 dataclasses-json==0.6.7 @@ -171,12 +171,11 @@ pluggy==1.0.0 proglog==0.1.10 prometheus_client==0.20.0 prompt-toolkit==3.0.43 -protobuf==4.25.3 +protobuf psycopg==3.1.14 psutil==6.0.0 psycopg-binary==3.1.18 psycopg2-binary -protobuf==3.20.1 # psycopg ptyprocess==0.7.0 py==1.11.0 @@ -284,3 +283,5 @@ yt-dlp azure-storage-blob azure-core dropbox +django_celery_beat +jq \ No newline at end of file diff --git a/test-db-postgres.yml b/test-db-postgres.yml deleted file mode 100644 index fb28cc4e..00000000 --- a/test-db-postgres.yml +++ /dev/null @@ -1,15 +0,0 @@ -db_test: - container_name: test_optimus_db - image: postgres:14.3-alpine - environment: - DATABASE_NAME: test_optimusdb - DATABASE_USER: test_optimus - DATABASE_PASSWORD: Qinsjhgvv45LJSD - DATABASE_HOST: test_optimus_db - DATABASE_PORT: 5432 - POSTGRES_USER: test_optimus - POSTGRES_PASSWORD: Qinsjhgvv45LJSD - POSTGRES_DB: test_optimusdb - volumes: - - postgres_data_test:/var/lib/postgresql/data/ - - ./db/db_test_init.sql:/docker-entrypoint-initdb.d/1-init.sql diff --git a/test.py b/test.py deleted file mode 100644 index e69de29b..00000000 diff --git a/test_config.py b/test_config.py deleted file mode 100644 index d42e8593..00000000 --- a/test_config.py +++ /dev/null @@ -1,15 +0,0 @@ - -# # @classmethod -# # def tearDownClass(cls): -# # # Stop the PostgreSQL container -# # cls.postgres_container.stop() - -# # def test_django_app(self): -# # # Run the tests -# # test_runner = DiscoverRunner() -# # failures = test_runner.run_tests(['datahub']) -# # self.assertFalse(failures) - -# if __name__ == '__main__': -# unittest.main() - diff --git a/test_logs.txt b/test_logs.txt deleted file mode 100644 index 764aae54..00000000 --- a/test_logs.txt +++ /dev/null @@ -1,1003 +0,0 @@ -============================= test session starts ============================== -platform darwin -- Python 3.10.0, pytest-7.1.2, pluggy-1.0.0 -django: settings: core.settings (from env) -rootdir: /Users/ugesh/PycharmProjects/datahub-api, configfile: pytest.ini -plugins: Faker-19.2.0, factoryboy-2.5.1, html-3.2.0, cov-4.1.0, metadata-3.0.0, django-4.5.2 -collected 163 items - -microsite/tests/test_home_view.py ......... -microsite/tests/test_policy_view.py ...... -participant/tests/test_create_new_req_views.py ...file_size 5244276 -..file_size 133144 -.. -participant/tests/test_support_ticket_views.py ...{'category': 'connectors'} -.{'status': 'open'} -.{'status': 'closed'} -...{'category1': 'invalid category'} -.{'id': '1234', 'name': 'abc'} -.This QueryDict instance is immutable -. -participant/tests/test_views_support.py .file_size 5244276 -..file_size 444858 -....... -accounts/tests/test_views.py ................... -datahub/tests/test_datahub_models.py {'_state': , - 'approval_status': True, - 'created_at': datetime.datetime(2023, 8, 7, 11, 8, 13, 130451, tzinfo=datetime.timezone.utc), - 'email': 'iSmyJkTgRb@example.com', - 'first_name': None, - 'id': UUID('d1ba5274-68d5-4ae5-a367-c531bb57f703'), - 'last_name': None, - 'on_boarded': False, - 'on_boarded_by_id': None, - 'phone_number': None, - 'profile_picture': , - 'role_id': -1060744074, - 'status': True, - 'subscription': None, - 'updated_at': datetime.datetime(2023, 8, 7, 11, 8, 13, 130478, tzinfo=datetime.timezone.utc)} -. -datahub/tests/test_dataset_views.py ........ -datahub/tests/test_models.py {'_state': , - 'approval_status': True, - 'created_at': datetime.datetime(2023, 8, 7, 11, 8, 14, 191537, tzinfo=datetime.timezone.utc), - 'email': 'InnMZrDKva@example.com', - 'first_name': None, - 'id': UUID('22765304-4230-4e7a-b369-04e38644325a'), - 'last_name': None, - 'on_boarded': False, - 'on_boarded_by_id': None, - 'phone_number': None, - 'profile_picture': , - 'role_id': -472493511, - 'status': True, - 'subscription': None, - 'updated_at': datetime.datetime(2023, 8, 7, 11, 8, 14, 191550, tzinfo=datetime.timezone.utc)} -. -datahub/tests/test_views_new.py ........... -datahub/tests/test_views_old.py ........................FFFFFFFF -microsite/tests/test_homepage_url.py .. -microsite/tests/test_policy_url.py .. -participant/tests/test_support_urls.py .participant.views.SupportTicketResolutionsViewset -..participant.views.SupportTicketV2ModelViewSet -... -participant/tests/test_urls.py ..ResolverMatch(func=participant.views.ParticipantDatasetsViewSet, args=(), kwargs={}, url_name='participant_datasets-list', app_names=[], namespaces=[], route='participant/datasets/$') -... -accounts/tests/test_urls.py .... -accounts/tests/test_views.py . -datahub/tests/test_datahub_urls.py .ResolverMatch(func=datahub.views.OrganizationViewSet, args=(), kwargs={}, url_name='organization-list', app_names=[], namespaces=[], route='datahub/organization/$') -..ResolverMatch(func=datahub.views.ParticipantViewSet, args=(), kwargs={}, url_name='participant-list', app_names=[], namespaces=[], route='datahub/participant/$') -.datahub.views.ParticipantViewSet -.ResolverMatch(func=datahub.views.DatahubDatasetsViewSet, args=(), kwargs={}, url_name='datahub_datasets-list', app_names=[], namespaces=[], route='datahub/datasets/$') -.ResolverMatch(func=participant.views.SupportTicketV2ModelViewSet, args=(), kwargs={}, url_name='support_tickets-list', app_names=[], namespaces=[], route='participant/support_ticket/$') -. -datahub/tests/test_urls.py ..ResolverMatch(func=datahub.views.DatahubNewDashboard, args=(), kwargs={}, url_name='new_dashboard-dashboard', app_names=[], namespaces=[], route='datahub/newdashboard/dashboard/$') -.datahub.views.DatahubNewDashboard -..ResolverMatch(func=datahub.views.DatasetV2View, args=(), kwargs={}, url_name='datasets/v2-list', app_names=[], namespaces=[], route='datahub/new_dataset_v2/$') -.datahub.views.DatasetV2View -.....ResolverMatch(func=datahub.views.OrganizationViewSet, args=(), kwargs={}, url_name='organization-list', app_names=[], namespaces=[], route='datahub/organization/$') -..ResolverMatch(func=datahub.views.ParticipantViewSet, args=(), kwargs={}, url_name='participant-list', app_names=[], namespaces=[], route='datahub/participant/$') -.datahub.views.ParticipantViewSet -.ResolverMatch(func=datahub.views.DatahubDatasetsViewSet, args=(), kwargs={}, url_name='datahub_datasets-list', app_names=[], namespaces=[], route='datahub/datasets/$') -...ResolverMatch(func=participant.views.ParticipantSupportViewSet, args=(), kwargs={}, url_name='support-list', app_names=[], namespaces=[], route='participant/support/$') -. -datahub/tests/test_urls_new.py ResolverMatch(func=datahub.views.StandardisationTemplateView, args=(), kwargs={}, url_name='standardise-list', app_names=[], namespaces=[], route='datahub/standardise/$') -.. - -=================================== FAILURES =================================== -__ ParticipantCostewardsListingTestViews.test_get_co_steward_details_endpoint __ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - - super().setUpClass() - self.client = Client() - self.participant_url = reverse("participant-list") - -> user_role_admin = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:878: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_ ParticipantCostewardsListingTestViews.test_get_co_steward_details_not_found_endpoint _ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - - super().setUpClass() - self.client = Client() - self.participant_url = reverse("participant-list") - -> user_role_admin = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:878: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_ ParticipantCostewardsListingTestViews.test_get_participant_details_endpoint __ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - - super().setUpClass() - self.client = Client() - self.participant_url = reverse("participant-list") - -> user_role_admin = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:878: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_ ParticipantCostewardsListingTestViews.test_get_participant_details_not_found_endpoint _ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - - super().setUpClass() - self.client = Client() - self.participant_url = reverse("participant-list") - -> user_role_admin = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:878: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_____ ParticipantCostewardsListingTestViews.test_list_co_steward_endpoint ______ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - - super().setUpClass() - self.client = Client() - self.participant_url = reverse("participant-list") - -> user_role_admin = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:878: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_____ ParticipantCostewardsListingTestViews.test_list_participant_endpoint _____ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - - super().setUpClass() - self.client = Client() - self.participant_url = reverse("participant-list") - -> user_role_admin = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:878: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_______________ CategoriesTestCaseView.test_get_categories_data ________________ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - super().setUpClass() - # cls.client = Client() - self.categories_url = reverse("dataset/v2-list") -> user_role = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:1000: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -_______________ CategoriesTestCaseView.test_post_categories_data _______________ - -self = , name = None - - def _cursor(self, name=None): - self.close_if_health_check_failed() - self.ensure_connection() - with self.wrap_database_errors: -> return self._prepare_cursor(self.create_cursor(name)) - -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -args = (, None) -kwargs = {} - - @wraps(func) - def inner(*args, **kwargs): - # Detect a running event loop in this thread. - try: - get_running_loop() - except RuntimeError: - pass - else: - if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"): - raise SynchronousOnlyOperation(message) - # Pass onward. -> return func(*args, **kwargs) - -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E psycopg2.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError - -The above exception was the direct cause of the following exception: - -self = - - def setUp(self) -> None: - super().setUpClass() - # cls.client = Client() - self.categories_url = reverse("dataset/v2-list") -> user_role = UserRole.objects.create( - id="1", - role_name="datahub_admin" - ) - -datahub/tests/test_views_old.py:1000: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:671: in create - obj.save(force_insert=True, using=self.db) -venv/lib/python3.10/site-packages/django/db/models/base.py:812: in save - self.save_base( -venv/lib/python3.10/site-packages/django/db/models/base.py:863: in save_base - updated = self._save_table( -venv/lib/python3.10/site-packages/django/db/models/base.py:1006: in _save_table - results = self._do_insert( -venv/lib/python3.10/site-packages/django/db/models/base.py:1047: in _do_insert - return manager._insert( -venv/lib/python3.10/site-packages/django/db/models/manager.py:85: in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/models/query.py:1791: in _insert - return query.get_compiler(using=using).execute_sql(returning_fields) -venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py:1658: in execute_sql - with self.connection.cursor() as cursor: -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:323: in cursor - return self._cursor() -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:300: in _cursor - with self.wrap_database_errors: -venv/lib/python3.10/site-packages/django/db/utils.py:91: in __exit__ - raise dj_exc_value.with_traceback(traceback) from exc_value -venv/lib/python3.10/site-packages/django/db/backends/base/base.py:301: in _cursor - return self._prepare_cursor(self.create_cursor(name)) -venv/lib/python3.10/site-packages/django/utils/asyncio.py:26: in inner - return func(*args, **kwargs) -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = , name = None - - @async_unsafe - def create_cursor(self, name=None): - if name: - # In autocommit mode, the cursor will be used outside of a - # transaction, hence use a holdable cursor. - cursor = self.connection.cursor( - name, scrollable=False, withhold=self.connection.autocommit - ) - else: -> cursor = self.connection.cursor() -E django.db.utils.InterfaceError: connection already closed - -venv/lib/python3.10/site-packages/django/db/backends/postgresql/base.py:269: InterfaceError -=============================== warnings summary =============================== -venv/lib/python3.10/site-packages/nose/importer.py:12 - /Users/ugesh/PycharmProjects/datahub-api/venv/lib/python3.10/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses - from imp import find_module, load_module, acquire_lock, release_lock - -venv/lib/python3.10/site-packages/rest_framework_simplejwt/utils.py:6 - /Users/ugesh/PycharmProjects/datahub-api/venv/lib/python3.10/site-packages/rest_framework_simplejwt/utils.py:6: RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated. Please update your code to use datetime.timezone.utc instead. - from django.utils.timezone import is_naive, make_aware, utc - -venv/lib/python3.10/site-packages/rest_framework/fields.py:30 - /Users/ugesh/PycharmProjects/datahub-api/venv/lib/python3.10/site-packages/rest_framework/fields.py:30: RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated. Please update your code to use datetime.timezone.utc instead. - from django.utils.timezone import utc - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -=========================== short test summary info ============================ -FAILED datahub/tests/test_views_old.py::ParticipantCostewardsListingTestViews::test_get_co_steward_details_endpoint -FAILED datahub/tests/test_views_old.py::ParticipantCostewardsListingTestViews::test_get_co_steward_details_not_found_endpoint -FAILED datahub/tests/test_views_old.py::ParticipantCostewardsListingTestViews::test_get_participant_details_endpoint -FAILED datahub/tests/test_views_old.py::ParticipantCostewardsListingTestViews::test_get_participant_details_not_found_endpoint -FAILED datahub/tests/test_views_old.py::ParticipantCostewardsListingTestViews::test_list_co_steward_endpoint -FAILED datahub/tests/test_views_old.py::ParticipantCostewardsListingTestViews::test_list_participant_endpoint -FAILED datahub/tests/test_views_old.py::CategoriesTestCaseView::test_get_categories_data -FAILED datahub/tests/test_views_old.py::CategoriesTestCaseView::test_post_categories_data -================== 8 failed, 155 passed, 3 warnings in 10.45s ================== diff --git a/utils/authentication_services.py b/utils/authentication_services.py index f00479ae..06ba7727 100644 --- a/utils/authentication_services.py +++ b/utils/authentication_services.py @@ -17,6 +17,7 @@ ResourceFile ) from utils.jwt_services import JWTServices +from django.db.models import Q LOGGER = logging.getLogger(__name__) @@ -41,9 +42,9 @@ def wrapper(self, request, *args, **kwargs): elif model == UsagePolicy: query_id = kwargs.get("pk") - dsv = UsagePolicy.objects.filter( - id=query_id, dataset_file__dataset__user_map_id=payload.get("map_id") - ) + dsv = UsagePolicy.objects.filter(Q(id=query_id) & ( + Q(dataset_file__dataset__user_map_id=payload.get("map_id") + ) | Q(user_organization_map=payload.get("map_id")))) if not dsv: LOGGER.info(f"user_map: {payload.get('map_id')} not have access") return Response( diff --git a/youtube_cookies.txt b/youtube_cookies.txt index 88979891..ec2bbe62 100644 --- a/youtube_cookies.txt +++ b/youtube_cookies.txt @@ -1,25 +1,26 @@ # Netscape HTTP Cookie File -# http://curl.haxx.se/rfc/cookie_spec.html -# This is a generated file! Do not edit. +# This file is generated by yt-dlp. Do not edit. .youtube.com TRUE / TRUE 1762843691 LOGIN_INFO AFmmF2swRAIgbK9lgXpJD3G9KOCwWfSE40Q2IuLTvcK0FFFwDcUZhgICIGmbRPPnvnAuVsgDjRofmJp4BT3ilU8jgKpi3FS8rV33:QUQ3MjNmeWJHX1lvdThrYWgxaThpQVY4WUNjNl9zdGhydzEzRWppbWdIb253Mko2R1ZjUG1MaXBiTWlGdUVBbWhnOE9HTWdDR3JHSHNfLWdsbUlJY2g5aERlTE1Ca3d3LTRXUGt0VHhscElxdXFiZnJVdW51eW8wNWkyck4tdkx6QjZjLWFUVVY4ZjFrVEtYRVdMeXFhUUJHbzY0NDAwUkNR -.youtube.com TRUE / FALSE 1741506142 _gcl_au 1.1.1633523942.1733730142 -.youtube.com TRUE / TRUE 1772260756 PREF f6=40000000&f7=4100&tz=Asia.Calcutta&f4=4000000&f5=30000 -.youtube.com TRUE / FALSE 1771660214 SID g.a000sgj8nDpCK-obV9WxWbT0T5eUMUVnKrm3JLDBHKb4g9j96jGjPSTf82yECKHGNMA3mul3qwACgYKAXMSARASFQHGX2MiE6ZdW1jgvl6uMtLnJKcttxoVAUF8yKrSzF2WbVunCSPKRCcBd3di0076 -.youtube.com TRUE / TRUE 1771660214 __Secure-1PSID g.a000sgj8nDpCK-obV9WxWbT0T5eUMUVnKrm3JLDBHKb4g9j96jGjg4CCiPrvIvByoXKeQiL4RQACgYKAdESARASFQHGX2MiYctFawCa8NTd9ywA1i_qtxoVAUF8yKoqVNwkAL4IIldrBMqeK4oX0076 -.youtube.com TRUE / TRUE 1771660214 __Secure-3PSID g.a000sgj8nDpCK-obV9WxWbT0T5eUMUVnKrm3JLDBHKb4g9j96jGjQGQWxyr09-LenGvVfOKe7QACgYKAeYSARASFQHGX2Mi-KmwlDl7GN8I7f9hFwk8mBoVAUF8yKrABDHdQanpVIOui4m5jl-a0076 -.youtube.com TRUE / FALSE 1771660214 HSID Adk6cm95cPO5yPaSG -.youtube.com TRUE / TRUE 1771660214 SSID As905t2ASoOACXN1w -.youtube.com TRUE / FALSE 1771660214 APISID pSCtY5XbSrY45qOe/AhFC8GnZYy6N4BoOE -.youtube.com TRUE / TRUE 1771660214 SAPISID ECYsaajiC2KI_Dbl/AagkmsZ8cvOX1Wk8t -.youtube.com TRUE / TRUE 1771660214 __Secure-1PAPISID ECYsaajiC2KI_Dbl/AagkmsZ8cvOX1Wk8t -.youtube.com TRUE / TRUE 1771660214 __Secure-3PAPISID ECYsaajiC2KI_Dbl/AagkmsZ8cvOX1Wk8t -.youtube.com TRUE / TRUE 1769236473 __Secure-1PSIDTS sidts-CjIBmiPuTX0c1AIgibSxtPi_h1ZH5VsktzpIZS5A6uzAzTXhgybzxR7oED1LZntlxrs3rRAA -.youtube.com TRUE / TRUE 1769236473 __Secure-3PSIDTS sidts-CjIBmiPuTX0c1AIgibSxtPi_h1ZH5VsktzpIZS5A6uzAzTXhgybzxR7oED1LZntlxrs3rRAA -.youtube.com TRUE / FALSE 1769236936 SIDCC AKEyXzWx6uz8G1rkUfadLuX9X2M6g7fjGqWgVlH6uPNwisUSKAfoklQZWgV9D1cvQuF-xWiS_Go -.youtube.com TRUE / TRUE 1769236936 __Secure-1PSIDCC AKEyXzXWwU4FGrqsExChcym8Fr8ETMK4uSFTW9DDeGd2I2QYpTAm2CA80OA2_ZU-AeNJdppjK2Q -.youtube.com TRUE / TRUE 1769236936 __Secure-3PSIDCC AKEyXzUrXSt_7uHULyo4PxiGbMTtjoJEgxXvKMri_5NnajrdK1nwc84-V_zjliAUAsPAZOMXEIg -.youtube.com TRUE / TRUE 1753252754 VISITOR_PRIVACY_METADATA CgJJThIEGgAgZQ%3D%3D -.youtube.com TRUE / TRUE 1753252754 VISITOR_INFO1_LIVE 0dRpFqduvCM +.youtube.com TRUE / FALSE 0 PREF f6=40000000&f7=4100&tz=UTC&f4=4000000&f5=30000&hl=en +.youtube.com TRUE / FALSE 1776835393 SID g.a000uwj8nKnF2HIVNJiT6cqltlN6pMEx8Gbp11lOXLK1jg7CfK-DLDpWG08iHOzh3lUSH5XmwwACgYKAaASARASFQHGX2MiIntNHAaYwbENwMgD6G6jhhoVAUF8yKpZDVm7I7-lUa5mMRQMeIv20076 +.youtube.com TRUE / TRUE 1776835393 __Secure-1PSID g.a000uwj8nKnF2HIVNJiT6cqltlN6pMEx8Gbp11lOXLK1jg7CfK-DUUl4XYF9e646FgeW9r9dmAACgYKAVkSARASFQHGX2MipGQr-JgjPZ3TagNGwThFjRoVAUF8yKo5dtjIVAvXCAm5k07fgZSO0076 +.youtube.com TRUE / TRUE 1776835393 __Secure-3PSID g.a000uwj8nKnF2HIVNJiT6cqltlN6pMEx8Gbp11lOXLK1jg7CfK-DhsYrX1l-SwtgXCFxCuz7vwACgYKARMSARASFQHGX2Mi-wT7x_p3-rXdE8wcHQilpRoVAUF8yKqxu7DD-URg5qXQoIoRQzNx0076 +.youtube.com TRUE / FALSE 1776835393 HSID A78hbaZg_NmFGRYBQ +.youtube.com TRUE / TRUE 1776835393 SSID AFV_ARvy3ptjFGQo- +.youtube.com TRUE / FALSE 1776835393 APISID EVGC0fZ6HmXY_hyd/AOFSt7oHi6IX9oe2K +.youtube.com TRUE / TRUE 1776835393 SAPISID D9LAREU27e0jzJ0B/AiXjnBherq8yUuI8_ +.youtube.com TRUE / TRUE 1776835393 __Secure-1PAPISID D9LAREU27e0jzJ0B/AiXjnBherq8yUuI8_ +.youtube.com TRUE / TRUE 1776835393 __Secure-3PAPISID D9LAREU27e0jzJ0B/AiXjnBherq8yUuI8_ +.youtube.com TRUE / TRUE 1773833606 __Secure-1PSIDTS sidts-CjIB7pHptZVJltiOpcyL-ggS-aVrYwNwT9gBKgfMCSzBr0DKL-ubqjKlLiUqZFzchSnO1BAA +.youtube.com TRUE / TRUE 1773833606 __Secure-3PSIDTS sidts-CjIB7pHptZVJltiOpcyL-ggS-aVrYwNwT9gBKgfMCSzBr0DKL-ubqjKlLiUqZFzchSnO1BAA +.youtube.com TRUE / FALSE 1773833939 SIDCC AKEyXzX62tnFTxIxoB7EPWtFypEZ3jh_KHYBdR91eeUegIngOg3A27fmjlvrS5eELyWiSAhZz4g +.youtube.com TRUE / TRUE 1773833939 __Secure-1PSIDCC AKEyXzVhGAjPQRBtGctfEY9oIaqEQy2srXOk3OYLBGeuQ5oltKc0TUtEwQSYRcgCfqW7oaYRFZA +.youtube.com TRUE / TRUE 1773833939 __Secure-3PSIDCC AKEyXzXiSf7CyVgyfvqbJP20PSO_F3sW9PKg8WJ4W8qC0JGX1odFLYSVXu-OMOaBjTnDLw7c7RU +.youtube.com TRUE / TRUE 1757849938 VISITOR_PRIVACY_METADATA CgJJThIEGgAgZQ%3D%3D +.youtube.com TRUE / TRUE 1757849938 VISITOR_INFO1_LIVE 0dRpFqduvCM .youtube.com TRUE / TRUE 0 YSC 92vz5nwwhB0 -.youtube.com TRUE / TRUE 1753251267 __Secure-ROLLOUT_TOKEN CPKggL-Ln6mhgwEQ3LXlhKCzigMYuqeFnNqNiwM%3D +.youtube.com TRUE / TRUE 1757834926 __Secure-ROLLOUT_TOKEN CPKggL-Ln6mhgwEQ3LXlhKCzigMY062W142TjAM%3D +.youtube.com TRUE / TRUE 1757849938 YT_DEVICE_MEASUREMENT_ID W1LSi4k= +.youtube.com TRUE / TRUE 1805369938 __Secure-YT_TVFAS t=475422&s=2 +.youtube.com TRUE / TRUE 1757849938 DEVICE_INFO ChxOelE0TXpFeE1qWTJORGt4TVRBNU9EQXhOZz09ENK25b4GGNK25b4G