-
Notifications
You must be signed in to change notification settings - Fork 60
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
FEAT: Community package listing pages for astropy + SunPy #207
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,65 @@ | ||
|
||
<div class="element-item cards bubble {% for aCategory in apackage.categories %} | ||
{{ aCategory }} | ||
{% endfor %}" data-category="data"> | ||
<article | ||
class="archive__item" | ||
itemscope="" | ||
itemtype="https://schema.org/CreativeWork" | ||
> | ||
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork"> | ||
<h3 class="card__title no_toc" itemprop="headline"> | ||
{{ apackage.package_name }} | ||
</h3> | ||
<p class="page__meta contributors"> | ||
<span><i class="fas fa-feather" aria-hidden="true"></i> | ||
{% if apackage.all_current_maintainers %} | ||
{% for maintainer in apackage.all_current_maintainers %} | ||
<a | ||
href="https://github.com/{{ maintainer.github_username }}" | ||
rel="maintainer" | ||
target="_blank" | ||
> | ||
<a href="https://github.com/{{ maintainer.github_username }}" rel="maintainer" target="_blank"> | ||
{% if maintainer.name %} | ||
{{ maintainer.name }}{% if forloop.last == false %},{% endif %}</a> | ||
{{ maintainer.name }}{% if forloop.last == false %},{% endif %} | ||
{% else %} | ||
{{ maintainer.github_username }}{% if forloop.last == false %},{% endif %}</a> | ||
{{ maintainer.github_username }}{% if forloop.last == false %},{% endif %} | ||
{% endif %} | ||
</a> | ||
{% endfor %} | ||
{% elsif apackage.submitting_author.name != 'Name' %} | ||
<a | ||
href="https://github.com/{{ apackage.submitting_author.github_username }}" | ||
rel="maintainer" | ||
target="_blank" | ||
> | ||
<a href="https://github.com/{{ apackage.submitting_author.github_username }}" rel="maintainer" target="_blank"> | ||
{{ apackage.submitting_author.name }} | ||
</a> | ||
{% else %} | ||
<a | ||
href="https://github.com/{{ apackage.submitting_author.github_username }}" | ||
rel="maintainer" | ||
target="_blank" | ||
> | ||
<a href="https://github.com/{{ apackage.submitting_author.github_username }}" rel="maintainer" target="_blank"> | ||
{{ apackage.submitting_author.github_username }} | ||
</a> | ||
{% endif %} | ||
</span> | ||
</span> | ||
</p> | ||
<span class="narrow"> | ||
<p class="archive__item-excerpt narrow" itemprop="description"> | ||
{{ apackage.package_description | markdownify }} | ||
</p> | ||
</span> | ||
<ul> | ||
<li> | ||
<a href="{{ apackage.repository_link }}" rel="permalink"> | ||
<i class="fab fa-github"></i> View Code | ||
</a> | ||
</li> | ||
<li><a href="{{ apackage.repository_link }}" rel="permalink"><i class="fab fa-github"></i> View Code</a></li> | ||
{% if apackage.gh_meta.documentation %} | ||
<li> | ||
<a | ||
href="{{ apackage.gh_meta.documentation }}" | ||
rel="permalink" | ||
> | ||
<i class="fas fa-book-open"></i> View Docs | ||
</a> | ||
</li> | ||
<li><a href="{{ apackage.gh_meta.documentation }}" rel="permalink"><i class="fas fa-book-open"></i> View Docs</a></li> | ||
{% endif %} | ||
{% if apackage.citation-link %} | ||
<li> | ||
<a href="{{ apackage.archive }}" rel="permalink"> | ||
<i class="fas fa-bookmark fa-fw"></i> Cite | ||
</a> | ||
</li> | ||
<li><a href="{{ apackage.archive }}" rel="permalink"><i class="fas fa-bookmark fa-fw"></i> Cite</a></li> | ||
{% endif %} | ||
<li><a href="{{ apackage.issue_link }}"><i class="fa-solid fa-user-pen"></i> View Review</a></li> | ||
{% if apackage.joss %} | ||
<li><a href="{{ apackage.archive }}" rel="permalink"><i class="fas fa-bookmark fa-fw"></i> JOSS Approved</a></li> | ||
{% endif %} | ||
{% if apackage.astropy %} | ||
<li><a href="partners/astropy.html"><i class="fa-solid fa-check-double"></i> <img src="http://img.shields.io/badge/Affiliated-Astropy-orange.svg?style=flat" alt="Astropy" /></a></li> | ||
{% endif %} | ||
{% if apackage.sunpy %} | ||
<li><a href="partners/astropy.html"><i class="fa-solid fa-check-double"></i> <img src="http://img.shields.io/badge/Affiliated-Sunpy-yellow.svg?style=flat" alt="Astropy" /></a></li> | ||
{% endif %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question here. |
||
<li> | ||
<a href= "{{ apackage.issue_link }}"> <i class="fa-solid fa-user-pen"></i> View Review </a> | ||
</li> | ||
|
||
</ul> | ||
|
||
<hr> | ||
{% if include.community %} | ||
<h4>Package stats</h4> | ||
<ul> | ||
<li><strong>All Time Contributors:</strong> {{ apackage.gh_meta.contrib_count }}</li> | ||
<li><strong>Last Commit date:</strong> {{ apackage.gh_meta.last_commit }}</li> | ||
<li><strong>Date Created:</strong> {{ apackage.gh_meta.created_at }}</li> | ||
</ul> | ||
{% endif %} | ||
</article> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,93 @@ | ||
//Jquery to manage drop downs and accessibility | ||
$(document).ready(function () { | ||
$(".hamburger__btn-toggle").click(function (e) { | ||
$(this).toggleClass("close"); | ||
// toggle expanded to try on click | ||
$(this).attr('aria-expanded', function (i, attr) { | ||
return attr == 'true' ? 'false' : 'true'}); | ||
// jQuery to manage drop downs and accessibility | ||
$(document).ready(function() { | ||
$(".hamburger__btn-toggle").click(function(e) { | ||
$(this).toggleClass("close"); | ||
// Toggle expanded to try on click | ||
$(this).attr('aria-expanded', function(i, attr) { | ||
return attr == 'true' ? 'false' : 'true' | ||
}); | ||
|
||
e.preventDefault(); | ||
$(".nav__links").toggleClass("vertical"); | ||
e.preventDefault(); | ||
$(".nav__links").toggleClass("vertical"); | ||
}); | ||
|
||
$(".dropdown").click(function (e) { | ||
// close when user clicks nav | ||
$(this).find(".dropdown-content").toggleClass("open"); | ||
// Handle making sure other drop menus are "closed" when another is open | ||
$(this).siblings(".dropdown").find(".dropdown-content").removeClass("open"); | ||
$(this).siblings(".dropdown").find(".dropbtn").attr("aria-expanded", "false"); | ||
$(this).find(".dropbtn").attr('aria-expanded', function (i, attr) { | ||
return attr == 'true' ? 'false' : 'true' }); | ||
$(".dropdown").click(function(e) { | ||
// Close when user clicks nav | ||
$(this).find(".dropdown-content").toggleClass("open"); | ||
// Handle making sure other drop menus are "closed" when another is open | ||
$(this).siblings(".dropdown").find(".dropdown-content").removeClass("open"); | ||
$(this).siblings(".dropdown").find(".dropbtn").attr("aria-expanded", "false"); | ||
$(this).find(".dropbtn").attr('aria-expanded', function(i, attr) { | ||
return attr == 'true' ? 'false' : 'true' | ||
}); | ||
}); | ||
|
||
// Close dropdown when u click outside of the nav ul | ||
$(document).click(function (e) { | ||
if (!e.target.closest("ul") && $(".dropdown-content").hasClass("open")) { | ||
$(".dropdown-content").removeClass("open"); | ||
} | ||
// Close dropdown when you click outside of the nav ul | ||
$(document).click(function(e) { | ||
if (!e.target.closest("ul") && $(".dropdown-content").hasClass("open")) { | ||
$(".dropdown-content").removeClass("open"); | ||
} | ||
}); | ||
}); | ||
|
||
|
||
// isotope filtering | ||
// This blog has a good example of smart resizing ... https://jewelfarazi.me/create-jquery-isotope-responsive-masonry-layout/ | ||
var qsRegex; | ||
var buttonFilter; | ||
|
||
// init Isotope | ||
var $grid = $('.grid-isotope').imagesLoaded( function() { | ||
$grid.isotope({ | ||
itemSelector: '.element-item', | ||
layoutMode: 'masonry', | ||
masonry: { | ||
columnWidth: 100, | ||
horizontalOrder: true, | ||
}, | ||
filter: function() { | ||
var $this = $(this); | ||
var searchResult = qsRegex ? $this.text().match( qsRegex ) : true; | ||
var buttonResult = buttonFilter ? $this.is( buttonFilter ) : true; | ||
return searchResult && buttonResult; | ||
} | ||
}); | ||
}); | ||
// Isotope filtering | ||
// This blog has a good example of smart resizing ... https://jewelfarazi.me/create-jquery-isotope-responsive-masonry-layout/ | ||
var qsRegex; | ||
var buttonFilter; | ||
|
||
$('#filters').on( 'click', 'button', function() { | ||
buttonFilter = $( this ).attr('data-filter'); | ||
$grid.isotope(); | ||
}); | ||
// Init Isotope | ||
var $grid = $('.grid-isotope').imagesLoaded(function() { | ||
$grid.isotope({ | ||
itemSelector: '.element-item', | ||
layoutMode: 'masonry', | ||
masonry: { | ||
columnWidth: 100, | ||
horizontalOrder: true, | ||
}, | ||
filter: function() { | ||
var $this = $(this); | ||
var searchResult = qsRegex ? $this.text().match(qsRegex) : true; | ||
var buttonResult = buttonFilter ? $this.is(buttonFilter) : true; | ||
return searchResult && buttonResult; | ||
} | ||
}); | ||
}); | ||
|
||
// use value of search field to filter | ||
var $quicksearch = $('#quicksearch').keyup( debounce( function() { | ||
qsRegex = new RegExp( $quicksearch.val(), 'gi' ); | ||
$grid.isotope(); | ||
}) ); | ||
// Filter on button click | ||
$('#filters').on('click', 'button', function() { | ||
buttonFilter = $(this).attr('data-filter'); | ||
$grid.isotope(); | ||
}); | ||
|
||
// Use value of search field to filter | ||
var $quicksearch = $('#quicksearch').keyup(debounce(function() { | ||
qsRegex = new RegExp($quicksearch.val(), 'gi'); | ||
$grid.isotope(); | ||
})); | ||
|
||
// change is-checked class on buttons | ||
$('.button-group').each( function( i, buttonGroup ) { | ||
var $buttonGroup = $( buttonGroup ); | ||
$buttonGroup.on( 'click', 'button', function() { | ||
$buttonGroup.find('.is-checked').removeClass('is-checked'); | ||
$( this ).addClass('is-checked'); | ||
// Change is-checked class on buttons | ||
$('.button-group').each(function(i, buttonGroup) { | ||
var $buttonGroup = $(buttonGroup); | ||
$buttonGroup.on('click', 'button', function() { | ||
$buttonGroup.find('.is-checked').removeClass('is-checked'); | ||
$(this).addClass('is-checked'); | ||
}); | ||
}); | ||
}); | ||
|
||
// debounce so filtering doesn't happen every millisecond | ||
function debounce( fn, threshold ) { | ||
var timeout; | ||
threshold = threshold || 100; | ||
return function debounced() { | ||
clearTimeout( timeout ); | ||
var args = arguments; | ||
var _this = this; | ||
function delayed() { | ||
fn.apply( _this, args ); | ||
} | ||
timeout = setTimeout( delayed, threshold ); | ||
}; | ||
} | ||
// Debounce so filtering doesn't happen every millisecond | ||
function debounce(fn, threshold) { | ||
var timeout; | ||
threshold = threshold || 100; | ||
return function debounced() { | ||
clearTimeout(timeout); | ||
var args = arguments; | ||
var _this = this; | ||
|
||
function delayed() { | ||
fn.apply(_this, args); | ||
} | ||
timeout = setTimeout(delayed, threshold); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
layout: splash | ||
title: "Astropy" | ||
excerpt: "An ecosystem of interoperable astronomy packages." | ||
header: | ||
overlay_color: "rgb(255, 80, 0)" | ||
overlay_filter: 0.6 | ||
overlay_image: images/communities/astropy-banner.png | ||
image_alt: "Digital elevation model" | ||
permalink: communities/astropy.html | ||
intro: | ||
- excerpt: "Astropy is a pyOpenSci community peer review partner. [Learn more about our peer review partnership program](/partners.html)." | ||
classes: wide | ||
community: astropy | ||
--- | ||
|
||
{% | ||
assign pkgs = site.data.packages | ||
| where_exp: "item", "item.partners contains page.community" | sort_natural: 'date_accepted' | reverse | ||
%} | ||
|
||
{% assign total_packages = pkgs | size %} | ||
|
||
{% include feature_row id="intro" type="center" %} | ||
|
||
## pyOpenSci peer review partner: {{ page.community | capitalize }} | ||
|
||
## About Astropy | ||
|
||
[Astropy](https://www.astropy.org/) is a community effort to develop a common | ||
core package for Astronomy in Python. Astropy also fosters an ecosystem of | ||
interoperable astronomy packages. Please remember to acknowledge and cite the use of any {{ page.community }} | ||
packages that you use. | ||
|
||
Astropy currently has {{ total_packages }} packages that have been accepted by pyOpenSci and also become affiliated Astropy packages through our [partnership](partners.html). | ||
|
||
|
||
<p><input type="text" id="quicksearch" placeholder="Search {{ page.community }} packages" /></p> | ||
|
||
|
||
<div id="filters" class="button-group"> | ||
<button class="button is-checked" data-filter="*">show all</button> | ||
<button class="button" data-filter=".data-munging, .data-processing-munging">data munging</button> | ||
<button class="button" data-filter=".data-extraction">data extraction</button> | ||
<button class="button" data-filter=".data-retrieval">data retrieval</button> | ||
<button class="button" data-filter=".data-visualization">data-visualization</button> | ||
<button class="button" data-filter=".education">education</button> | ||
|
||
<button class="button" data-filter=".geospatial">geospatial</button> | ||
<button class="button" data-filter=".reproducibility">reproducibility</button> | ||
</div> | ||
|
||
|
||
|
||
<div class="grid-isotope"> | ||
{% for apackage in pkgs %} | ||
{% include package-grid.html community=page.community %} | ||
{% endfor %} | ||
</div> | ||
|
||
<!-- ## TODO's | ||
|
||
Do we want to somehow connect with the metrics | ||
[scientific python is collecting via devstats](https://devstats.scientific-python.org/_generated/astropy.html)? --> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using partners or communities in this link?