Compare commits

...

10 Commits

Author SHA1 Message Date
SARTHAK SHISHODIA
9e6dacc927 Merge e0d5ac11c6 into 6e37dab7d1 2025-02-02 10:47:53 +01:00
Shmavon Gazanchyan
6e37dab7d1 Update README.md 2025-02-01 22:24:17 +00:00
Sammy Hori
925d75d233 Merge pull request #1561 from muhammadalmaskhan/main
Added PyMC to Python category in Awesome for Beginners
2025-02-01 22:24:07 +00:00
Sammy Hori
0a42695d3a Minor formatting 2025-02-01 22:22:00 +00:00
Almas
7649ca911b Merge pull request #2 from muhammadalmaskhan/muhammadalmaskhan-patch-2: Fix PyMC entry format and adhere to contribution guidelines
Update data.json: Fixed PyMC entry format in data.json as per guidelines,
- Removed extra blank lines in data.json.
- Updated PyMC entry to follow the required JSON structure.
- Replaced incorrect field names:
  - "desc" → "description"
  - "url" → "link"
  - "tags" → "technologies"
  - "beginner-friendly-label" → "label"
- Ensured formatting consistency for proper parsing.

This fixes the requested changes and ensures PyMC is correctly listed as a beginner-friendly repository.
2025-01-29 08:53:54 +05:00
Almas
421ee5d49a Update data.json: Fixed PyMC entry format in data.json as per guidelines
- Removed unnecessary blank lines.
- Updated PyMC entry to match the required JSON structure.
- Changed field names:
  - "desc" → "description"
  - "url" → "link"
  - "tags" → "technologies"
  - "beginner-friendly-label" → "label"
- Ensured proper formatting and alignment.
2025-01-29 08:50:24 +05:00
Almas
94f7327e81 Add PyMC to Awesome for Beginners: Merge pull request #1 from muhammadalmaskhan/muhammadalmaskhan-patch-1
Updated data.json Added PyMC to Python category- Added PyMC, a Python library for Bayesian statistical modeling and probabilistic machine learning.
- The repository is actively maintained and includes 'good first issue' labels for beginners.
- It provides a supportive community and clear contribution guidelines, making it an excellent addition for new contributors.
 in Awesome for Beginners
2025-01-28 09:52:36 +05:00
Almas
03738c5d1d Update data.json Added PyMC to Python category in Awesome for Beginners
- Added PyMC, a Python library for Bayesian statistical modeling and probabilistic machine learning.
- The repository is actively maintained and includes 'good first issue' labels for beginners.
- It provides a supportive community and clear contribution guidelines, making it an excellent addition for new contributors.
2025-01-28 09:49:28 +05:00
sarthakshishodia20
e0d5ac11c6 ChangesMadeSecondTime 2025-01-22 22:03:10 +05:30
sarthakshishodia20
663f4c351e ChangesMadeBySarthakShishodia 2025-01-22 22:00:27 +05:30
3 changed files with 74 additions and 12 deletions

View File

@@ -1,5 +1,10 @@
from jinja2 import Environment, FileSystemLoader
import json
import os
import logging
# Configuring logging
logging.basicConfig(level=logging.INFO)
DATAFILE = "./data.json"
TEMPLATEPATH = "./.github/"
@@ -9,34 +14,61 @@ TARGETFILE = "./README.md"
def new_technology_dict(repo_technology):
return {"link_id": repo_technology.lower(), "entries": []}
# Function to log warnings for missing data
def log_warning(message):
logging.warning(message)
# Check if the data file exists
if not os.path.exists(DATAFILE):
log_warning(f"Data file {DATAFILE} does not exist.")
exit(1)
# Load data from the JSON file
try:
with open(DATAFILE, "r") as datafile:
data = json.loads(datafile.read())
except json.JSONDecodeError:
log_warning("Error: Failed to parse JSON data in the file.")
exit(1)
# Initialize technologies dictionary
technologies = {}
with open(DATAFILE, "r") as datafile:
data = json.loads(datafile.read())
for technology in data["technologies"]:
# Processing technologies
for technology in data.get("technologies", {}):
technologies[technology] = {
"link_id": data["technologies"][technology],
"link_id": data["technologies"].get(technology),
"entries": [],
}
for repository in data["repositories"]:
repo_technologies = repository["technologies"]
# Processing repositories
for repository in data.get("repositories", []):
repo_technologies = repository.get("technologies", [])
if not repo_technologies:
log_warning(f"Repository {repository['name']} has no technologies listed.")
for repo_technology in repo_technologies:
if not technologies.get(repo_technology, False):
if repo_technology not in technologies:
technologies[repo_technology] = new_technology_dict(repo_technology)
log_warning(f"Technology {repo_technology} is newly added.")
technologies[repo_technology]["entries"].append(repository)
# Create Jinja2 environment and load the template
env = Environment(loader=FileSystemLoader(TEMPLATEPATH))
if not os.path.exists(os.path.join(TEMPLATEPATH, TEMPLATEFILE)):
log_warning(f"Template file {TEMPLATEFILE} does not exist in the provided path.")
exit(1)
template = env.get_template(TEMPLATEFILE)
# Create categories from the technologies
categories = []
for key, value in zip(technologies.keys(), technologies.values()):
for key, value in technologies.items():
categories.append(
{"title": key, "link_id": value["link_id"], "entries": value["entries"]}
)
# Sorting categories and entries
categories = sorted(categories, key=lambda x: x["title"].upper())
category_groups = {"Misc": []}
for category in categories:
category["entries"] = sorted(category["entries"], key=lambda x: x["name"].upper())
@@ -48,8 +80,28 @@ for category in categories:
else:
category_groups["Misc"].append(category)
sponsors = data["sponsors"]
# Process sponsors
sponsors = data.get("sponsors", [])
output = template.render(category_groups=category_groups, categories=categories, sponsors=sponsors)
# Generate Table of Contents (TOC)
toc = []
for category in categories:
toc.append(f"- [{category['title']}]({category['link_id']})")
open(TARGETFILE, "w").write(output)
# Prepare context for rendering the template
context = {
"category_groups": category_groups,
"categories": categories,
"sponsors": sponsors,
"toc": toc # Adding TOC to context
}
# Rendering the README file
try:
output = template.render(context)
with open(TARGETFILE, "w") as targetfile:
targetfile.write(output)
logging.info("README file generated successfully.")
except Exception as e:
log_warning(f"Error while rendering template: {e}")
exit(1)

View File

@@ -294,6 +294,7 @@ If you would like to be guided through how to contribute to a repository on GitH
- [Oppia](https://github.com/oppia/oppia) _(label: good first issue)_ <br> Oppia is an open-source project whose aim is to empower learners across the globe by providing access to high-quality, engaging education. We envision a society in which access to high-quality education is a human right rather than a privilege.
- [opsdroid](https://github.com/opsdroid/opsdroid) _(label: good first issue)_ <br> An open source chat-ops bot framework.
- [pandas](https://github.com/pandas-dev/pandas) _(label: good first issue)_ <br> Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
- [PyMC](https://github.com/pymc-devs/pymc) _(label: beginner friendly)_ <br> A Python library for Bayesian statistical modeling and probabilistic machine learning. Beginner-friendly with 'good first issue' labels.
- [Pytest](https://github.com/pytest-dev/pytest) _(label: status:-easy)_ <br> The pytest framework makes it easy to write small tests, yet scales to support complex functional testing.
- [Python Babel](https://github.com/python-babel/babel) _(label: difficulty/low)_ <br> The Python Internationalization Library.
- [pythonping](https://github.com/alessandromaggio/pythonping) _(label: good first issue)_ <br> PythonPing is a simple library to execute ICMP pings natively in Python without resorting to spawning a shell.

View File

@@ -1289,6 +1289,15 @@
],
"description": "The free and open-source wiki software package that powers Wikipedia."
},
{
"name": "PyMC",
"link": "https://github.com/pymc-devs/pymc",
"label": "beginner friendly",
"technologies": [
"Python"
],
"description": "A Python library for Bayesian statistical modeling and probabilistic machine learning. Beginner-friendly with 'good first issue' labels."
},
{
"name": "CiviWiki",
"link": "https://github.com/CiviWiki/OpenCiviWiki",