Skip to content

Commit 6628157

Browse files
authored
Maint: saket @ pysradb (#102)
* maint: saket @ pysradb - #101 * update parse on md links * add substack svg icon * minor fixes
1 parent e1b8d06 commit 6628157

File tree

6 files changed

+132
-3
lines changed

6 files changed

+132
-3
lines changed

.cspell/maintainer-words.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,6 @@ Shukla
197197
inashivb
198198
Shivani
199199
Bhardwaj
200+
Choudhary
201+
Saket
202+
sakekc

.cspell/project-words.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,13 @@ OISF
4343
Mahna
4444
fontsource
4545
wght
46+
pysradb
47+
Pysradb
48+
Connexions
49+
empathise
50+
etuils
51+
Koita
52+
NCBI
53+
sradb
54+
Substack
55+
bioinformatics

components/icons/Substack.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="24"
5+
height="24"
6+
viewBox="0 0 24 24"
7+
fill="none"
8+
stroke="currentColor"
9+
stroke-width="2"
10+
stroke-linecap="round"
11+
stroke-linejoin="round"
12+
class="icon icon-tabler icon-tabler-brand-substack"
13+
>
14+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
15+
<line x1="4" y1="4" x2="20" y2="4" />
16+
<line x1="4" y1="8" x2="20" y2="8" />
17+
<path d="M4 12v8l8-4l8 4v-8" />
18+
</svg>
19+
</template>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"username": "sakekc",
3+
"full_name": "Saket Choudhary",
4+
"photo": "https://avatars.githubusercontent.com/u/682153?v=4",
5+
"designation": "Assistant Professor, Koita Centre for Digital Health, IIT Bombay",
6+
"socials": [
7+
{
8+
"label": "Github",
9+
"link": "https://github.com/saketkc"
10+
},
11+
{
12+
"label": "Linkedin",
13+
"link": "http://linkedin.com/in/saket-choudhary/"
14+
},
15+
{
16+
"label": "Substack",
17+
"link": "https://substack.com/@genomeofindia"
18+
},
19+
{
20+
"label": "BlueSky",
21+
"link": "https://bsky.app/profile/saketkc.bsky.social"
22+
},
23+
{
24+
"label": "X",
25+
"link": "http://x.com/saketkc"
26+
}
27+
],
28+
"projects": [
29+
{
30+
"name": "pysradb",
31+
"project_link": "http://github.com/saketkc/pysradb",
32+
"website_link": "http://saket-choudhary.me/pysradb",
33+
"logo": "https://saket-choudhary.me/pysradb/_static/pysradb_v3.png",
34+
"description": "The NCBI Sequence Read Archive (SRA) is the primary archive of next-generation sequencing datasets. SRA makes metadata and raw sequencing data available to the research community to encourage reproducibility and to provide avenues for testing novel hypotheses on publicly available data. However, methods to programmatically access this data are limited. Pysradb provides a collection of command line methods and python API to query and download metadata and data from SRA.",
35+
"short_description": "pysradb is a python package to fetch metadata associated with genome sequencing data deposited in the Sequence Read Archive (SRA) database at NCBI or European Nucleotide Archive (ENA)."
36+
}
37+
],
38+
"form": [
39+
{
40+
"question": "How to support",
41+
"response": "pysradb repository has a set of open issues that we need help with. Anyone unfamiliar with the general world of bioinformatics or genomics can also contribute. The crux of pysradb operations happens through interaction with etuils API, so as long as you are comfortable working with APIs you can contribute to pysradb! Any contributions are welcome - PRs, issues, documentation fixes!"
42+
},
43+
{
44+
"question": "A small brief about your project",
45+
"response": "Biological researchers worldwide generate petabytes of genomic sequencing data, but accessing it is a nightmare. Scientists spend weeks navigating the maze of NCBI's SRA, ENA, and GEO databases just to find and download the datasets they need. The identifiers are cryptic (SRP? GSE? SRR?), the APIs are complex, and downloading terabytes of data often fails midway or is incomplete without the associated metadata! Pysradb democratizes access to the world's largest repository of sequencing information."
46+
},
47+
{
48+
"question": "One FOSS maintainer lesson for your younger self",
49+
"response": "When I started, I just thought I need to be the best at coding to be a good maintainer. A good maintainer is not necessarily a good coder, but an all rounder - listens, provides feedback, documents and keeps the community together rather than forcing their ideology over everyone."
50+
},
51+
{
52+
"question": "Why do you do it? Why do you bother maintaining a FOSS project?",
53+
"response": "I maintain FOSS project to reduce the barrier that researchers like me face"
54+
},
55+
{
56+
"question": "If your repo had a theme song, what would it be?",
57+
"response": "It has to be \"Let me speak\" by Indian Ocean: <a href=\"https://youtu.be/4NbXG9i8uFg.\">https://youtu.be/4NbXG9i8uFg.</a> It is one song that I listened to in loop when I coded the first version of pysradb."
58+
},
59+
{
60+
"question": "Which file in your project would you most like to set on fire?",
61+
"response": "It has to be <a href=\"https://github.com/saketkc/pysradb/blob/develop/pysradb/sradb.py\">sradb.py</a>. The name of the repo was inspired from a now defunct package and this file is the legacy I believe pysradb never needed."
62+
},
63+
{
64+
"question": "What's your open-source villain origin story?",
65+
"response": "I got exposed to open source during my internship at <a href=\"https://www.slideshare.net/slideshow/internship-slideshare-my-experiences/9043130\">SlideShare</a>. SlideShare team was open source aficionados. That is where I learned and used Ruby on Rails and web development which lef me to GSoC 2012 and contributing a slide importer for <a href=\"https://kefletcher.blogspot.com/2012/04/import-your-slides-into-lesson-on.html\">Connexions</a>. This was my entry point for <a href=\"https://galaxy-gsoc2013.blogspot.com/\">GSoC 2013</a> and <a href=\"https://statsmodels-mlm-gsoc2015.blogspot.com/\">GSoC 2014</a> and I just got hooked with all the cool stuff out there in open."
66+
},
67+
{
68+
"question": "If you had to use one emoji to convey what it's like to be a FOSS maintainer, what would it be?",
69+
"response": "🧠 - Be curious, listen, empathise and work hard!"
70+
}
71+
]
72+
}

parse-maintainer.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,42 @@ def is_image(url):
1313
def format_response(value: str) -> str:
1414
value = value.strip()
1515

16-
# Convert links and image URLs into HTML tags
16+
# Convert Markdown image syntax ![alt](url)
17+
value = re.sub(
18+
r'!\[([^\]]*)\]\((https?://[^\)]+)\)',
19+
r'<img src="\2" alt="\1" />',
20+
value
21+
)
22+
23+
# Convert Markdown link syntax [text](url)
24+
value = re.sub(
25+
r'\[([^\]]+)\]\((https?://[^\)]+)\)',
26+
r'<a href="\2">\1</a>',
27+
value
28+
)
29+
30+
# skip existing tags to avoid breaking valid HTML
31+
# this regex will ignore any URL already inside an HTML tag
1732
def convert_url(match):
1833
url = match.group(0)
34+
# Only convert if not part of existing <a> or <img> tag
1935
if is_image(url):
2036
return f'<img src="{url}" alt="image" />'
2137
return f'<a href="{url}">{url}</a>'
2238

23-
value = re.sub(r'https?://\S+', convert_url, value)
39+
# Find raw URLs that are NOT already part of a Markdown or HTML link
40+
value = re.sub(
41+
r'(?<!["\'=\(\]>])\bhttps?://[^\s<>()"\']+', # negative lookbehind to avoid href/src attributes
42+
convert_url,
43+
value
44+
)
2445

25-
# Convert newlines into <br>
46+
# Convert newlines to <br>
2647
value = value.replace('\n', '<br>')
48+
2749
return value
2850

51+
2952
def parse_multiline_field(lines, start_index):
3053
"""Extract multiline field starting at start_index + 1 until next field or section."""
3154
value_lines = []

utils/icons.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Twitter from "~/components/icons/Twitter.vue";
88
import Mastodon from "~/components/icons/Mastodon.vue";
99
import BlueSky from "~/components/icons/BlueSky.vue";
1010
import BitBucket from "~/components/icons/BitBucket.vue";
11+
import Substack from "~/components/icons/Substack.vue";
1112

1213
const icons = {
1314
web: WebIcon,
@@ -21,6 +22,7 @@ const icons = {
2122
bluesky: BlueSky,
2223
bitbucket: BitBucket,
2324
"arrow-up-right": ArrowUpRight,
25+
substack: Substack,
2426
} as const;
2527

2628
type IconMap = typeof icons;

0 commit comments

Comments
 (0)