Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post-APE 22 listing #590

Merged
merged 4 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 117 additions & 13 deletions affiliated/index.html
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tsk tsk... indentation looked fine locally. Maybe there are tabs in there messing things up.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Astropy. A Community Python Library for Astronomy." />
Expand All @@ -23,7 +23,7 @@
<nav>
<div id="mobile-header">
<!-- Menu Icon -->
<a id="responsive-menu-button" href="#sidr-main"><div><svg senable-background="new 0 0 24 24" height="24px" id="Layer_1" version="1.1" viewBox="0 0 24 24" width="24px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g><g><path d="M23.244,17.009H0.75c-0.413,0-0.75,0.36-0.75,0.801v3.421C0,21.654,0.337,22,0.75,22h22.494c0.414,0,0.75-0.346,0.75-0.77 V17.81C23.994,17.369,23.658,17.009,23.244,17.009z M23.244,9.009H0.75C0.337,9.009,0,9.369,0,9.81v3.421 c0,0.424,0.337,0.769,0.75,0.769h22.494c0.414,0,0.75-0.345,0.75-0.769V9.81C23.994,9.369,23.658,9.009,23.244,9.009z M23.244,1.009H0.75C0.337,1.009,0,1.369,0,1.81V5.23c0,0.423,0.337,0.769,0.75,0.769h22.494c0.414,0,0.75-0.346,0.75-0.769V1.81 C23.994,1.369,23.658,1.009,23.244,1.009z"/></g></g></svg></div></a>
<a id="responsive-menu-button" href="#sidr-main"><div><svg senable-background="new 0 0 24 24" height="24px" id="Layer_1" version="1.1" viewBox="0 0 24 24" width="24px" x="0px" xml:space="preserve" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" y="0px"><g><g><path d="M23.244,17.009H0.75c-0.413,0-0.75,0.36-0.75,0.801v3.421C0,21.654,0.337,22,0.75,22h22.494c0.414,0,0.75-0.346,0.75-0.77 V17.81C23.994,17.369,23.658,17.009,23.244,17.009z M23.244,9.009H0.75C0.337,9.009,0,9.369,0,9.81v3.421 c0,0.424,0.337,0.769,0.75,0.769h22.494c0.414,0,0.75-0.345,0.75-0.769V9.81C23.994,9.369,23.658,9.009,23.244,9.009z M23.244,1.009H0.75C0.337,1.009,0,1.369,0,1.81V5.23c0,0.423,0.337,0.769,0.75,0.769h22.494c0.414,0,0.75-0.346,0.75-0.769V1.81 C23.994,1.369,23.658,1.009,23.244,1.009z"/></g></g></svg></div></a>
<!-- -->
</div>
<a href="../index.html"><img src="../images/astropy_word.svg" height="32" onerror="this.src='../images/astropy_word_32.png; this.onerror=null;"/></a>
Expand All @@ -46,10 +46,10 @@
<li><a href="../contribute.html">Contribute</a></li>
<li>
<div class="dropdown">
<a href="http://docs.astropy.org">Documentation</a>
<a href="https://docs.astropy.org">Documentation</a>
<div class="dropdown-content">
<ul>
<li><a href="http://docs.astropy.org" target="_blank">Current Release</a></li>
<li><a href="https://docs.astropy.org" target="_blank">Current Release</a></li>
<li><a href="http://devdocs.astropy.org/" target="_blank">In Development</a></li>
</ul>
</div>
Expand All @@ -60,7 +60,7 @@

</ul> </div>
<div class="search pull-right">
<form action="http://docs.astropy.org/en/stable/search.html" method="get">
<form action="https://docs.astropy.org/en/stable/search.html" method="get">
<input type="text" name="q" placeholder="Search Documentation" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
Expand Down Expand Up @@ -166,16 +166,48 @@ <h1 id="coordinated-package-list">Coordinated Packages<a class="paralink" href="
<section id="affiliated-package-registry">
<h1 id="affiliated-package-list">Affiliated Packages Registry<a class="paralink" href="#affiliated-package-list" title="Permalink to this headline">¶</a></h1>
<p>The following table lists all currently registered affiliated packages.</p>
<p>NOTE: The listing is currently empty because Astropy has just accepted
<p>NOTE: The listing is currently minimal because Astropy has just accepted
<a href="https://github.com/astropy/astropy-APEs/blob/main/APE22.rst">APE 22</a>
in January 2024. We are in the midst of transitioning to the new process in
partnership with pyOpenSci, so we really appreciate your patience.
</p>

<!-- TODO: Leah Wasser is going to give Erik Tollerud some RSS/XML to ingest here
(maybe https://github.com/pyOpenSci/pyopensci.github.io/blob/main/_data/packages.yml).
We have promised pyOpenSci that we would also link back to their canonical listing
here, with their Astropy filter applied. -->
<p>Total number of post-APE 22 affiliated packages: <strong id="total-pyos-pkgs"></strong></p>

<table border="1" class="docutils" id="pyos-package-table">
<colgroup>
<col width="5%" />
<col width="3%" />
<col width="3%" />
<col/>
</colgroup>
<thead valign="bottom">
<tr class="row-odd">
<th class="head"></th>
<th class="head"></th>
<th class="head"></th>
<th class="head"></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td rowspan="1">Loading...</td>
<td rowspan="1">&nbsp;</td>
<td rowspan="1">&nbsp;</td>
<td rowspan="1">&nbsp;</td>
<td rowspan="1">&nbsp;</td>
</tr>
<tr class="row-odd">
<td colspan="1">&nbsp;</td>
<td colspan="3">&nbsp;</td>
</tr>
</tbody>
</table>

<!-- TODO: We have promised pyOpenSci that we would also link back to their canonical listing
here, with their Astropy filter applied. Waiting for resolution of
https://github.com/pyOpenSci/software-peer-review/issues/268
but for now just do a generic link to their listing. -->
<p>All accepted pyOpenSci packages available <a href="https://www.pyopensci.org/python-packages.html">here</a>.</p>

</section>

Expand Down Expand Up @@ -252,7 +284,7 @@ <h1 id="becoming-an-affiliated-package">Becoming an Affiliated Package<a class="
<li>Specifically use, interface with, or provide complementary capabilities
to other Astropy packages.</li>

<li>Use <a href="http://docs.astropy.org/">classes and functions from the
<li>Use <a href="https://docs.astropy.org/">classes and functions from the
astropy core package</a> wherever possible and appropriate, and (as much as
possible) avoid duplication with other packages in the Astropy ecosystem.
This facilitates re-use of code and sharing of resources.</li>
Expand Down Expand Up @@ -344,13 +376,85 @@ <h2 id="new-affil-reviewer">I am a new reviewer<a class="paralink" href="#new-af
<script src="../js/jquery.sidr.min.js"></script>
<script src="../js/functions.js"></script>


<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function() {
$.getJSON("registry.json", populateTables);
});
</script>

<!-- Tom Donaldson: The idea was to use the existing YAML parser that works fine in nodejs,
but bundle it for use in a client. So I created yaml_parse.js

import parse from 'yaml'
window.yaml = parse;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I'll note here is that I'm sure forcing it onto window isn't the standard way to make the this yaml available, but I ran out of time learning the right way, and it should work.


and then bundled it with a bundler I found called esbuild:

npm install --save-exact --save-dev esbuild
./node_modules/.bin/esbuild yaml_parse.js --bundle --minify --outfile=yaml_parse_bundle.js
-->
<script src="../js/yaml_parse_bundle.js"></script>

<script>
fetch('https://raw.githubusercontent.com/pyOpenSci/pyopensci.github.io/main/_data/packages.yml')
.then(response => response.text())
.then(yamlString => {
var parsed = yaml.parse(yamlString);
var i = 0;

// We have to delete the "Loading..." row
var tab = document.getElementById("pyos-package-table");
tab.deleteRow(1);

var info = "";
for (var p=0; p<parsed.length; p++) {
var package = parsed[p];
if (package["partners"] == null || package["partners"].indexOf("astropy") == -1) {
continue;
}

namerow = tab.insertRow(i*4 + 1);

nmcell = namerow.insertCell(0);
urlcell = namerow.insertCell(1);
repocell = namerow.insertCell(2);
pypicell = namerow.insertCell(3);

nmcell.innerHTML = package["package_name"];
nmcell.className = 'first-package-row'
nmcell.setAttribute('width', 100)
urlcell.innerHTML = url_translator(package["gh_meta"]["documentation"]);
repocell.innerHTML = repo_translator(package["repository_link"]);
pypicell.innerHTML = pypi_translator(package["package_name"]); // FIXME: https://github.com/pyOpenSci/pyopensci.github.io/issues/390

descrow = tab.insertRow(i*4 + 2);
descrow.insertCell(0).innerHTML = "";
desccell = descrow.insertCell(1);
desccell.colSpan = "3";
desccell.innerHTML = package["package_description"];

var maintainers = package["all_current_maintainers"];
var maintainers_str = "";
for (var m=0; m<maintainers.length; m++) {
maintainers_str += ghuser_translator(maintainers[m]["name"], maintainers[m]["github_username"]);
if (m < (maintainers.length - 1)) {
maintainers_str += ", ";
}
}

maintrow = tab.insertRow(i*4 + 3);
maintrow.insertCell(0).innerHTML = "";
maintcell = maintrow.insertCell(1);
maintcell.colSpan = "3";
maintcell.innerHTML = "Maintainer(s): " + maintainers_str;

i += 1;
}
document.getElementById("total-pyos-pkgs").innerHTML = i;
;
});
</script>

<hr>
<p>
<img style="vertical-align:middle" src="../images/astropy_brandmark.png" height=20><span style="vertical-align:middle">
Expand Down
11 changes: 10 additions & 1 deletion js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function pypi_translator(pypiname) {
if (pypiname === undefined) {
return 'None';
} else {
var urltext = 'http://pypi.python.org/pypi/' + pypiname;
var urltext = 'https://pypi.python.org/pypi/' + pypiname;
return '<a href="' + urltext + '">' + 'PyPI' + '</a>';
}
}
Expand All @@ -263,6 +263,15 @@ function bool_translator(stable) {
}
}

function ghuser_translator(fullname, ghname) {
if (fullname === undefined || ghname === undefined) {
return 'None';
} else {
var urltext = 'https://github.com/' + ghname;
return '<a href="' + urltext + '">' + fullname + '</a>';
}
}

var _email_regex_str = '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}';
var _email_regex = new RegExp(_email_regex_str, 'i');
var _email_with_name_regex = new RegExp('(.+)<(' + _email_regex_str + ')>', 'i');
Expand Down
Loading