Skip to content

Commit 0b8be03

Browse files
committed
Enh: new packaging landing page w links to guide
Fix: edits from review
1 parent f0be7dd commit 0b8be03

17 files changed

+155
-88
lines changed

_data/navigation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ main:
1919
icon: "fas fa-fw fa-envelope-square"
2020
url:
2121
sub-nav:
22-
- title: "Packaging help"
22+
- title: "Packaging resources"
2323
icon:
24-
url: "python-packaging-for-science.html"
24+
url: "python-packaging-science.html"
2525
- title: "Our packages"
2626
icon:
2727
url: "/python-packages/"
28-
- title: "Python package guide"
28+
- title: "Package Guidebook"
2929
url: "https://www.pyopensci.org/python-package-guide/"
3030
icon: "fas fa-external-link-alt"
3131
- title: "Blog"

_includes/tutorial-grid.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
<article class="card" itemscope="" itemtype="https://schema.org/CreativeWork">
3+
<div class="content">
4+
<div class="title-block">
5+
<h4 class="title" itemprop="headline">{{ atutorial.title }}</h4>
6+
</div>
7+
{% if atutorial.excerpt %}
8+
<p class="excerpt">
9+
{{ atutorial.excerpt }}
10+
</p>
11+
{% endif %}
12+
13+
{% if atutorial.subpages %}
14+
<ul>
15+
{% for page in atutorial.subpages %}
16+
<li>
17+
<a href="{{ page.url }}">{{ page.name }}</a>
18+
</li>
19+
{% endfor %}
20+
</ul>
21+
22+
{% endif %}
23+
</div>
24+
{% if atutorial.btn_label %}
25+
<a href="{{ atutorial.url }}" class="btn {{ atutorial.btn_class }}"><i class="fa-solid fa-magnifying-glass"></i> {{ atutorial.btn_label }}</a>
26+
{% endif %}
27+
</article>

_includes/tutorial_grid.html

Lines changed: 0 additions & 44 deletions
This file was deleted.

_packaging/documentation.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
---
2-
title: "Documentation"
2+
title: "Document your Python package"
33
excerpt: "Learn about best practices for developing documentation for your Python package."
44
learning_objectives:
55
subpages:
66
- name: Documentation Overview
77
url: https://www.pyopensci.org/python-package-guide/documentation/index.html#
8+
- name: Create your docs
9+
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/get-started.html
10+
- name: Create package tutorials
11+
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/create-package-tutorials.html
812
- name: Document your code (API docs)
913
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/document-your-code-api-docstrings.html
10-
- name: Package tutorials
11-
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/create-package-tutorials.html
14+
1215
url:
1316
---

_packaging/packaging.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
---
2-
title: "Python package structure"
3-
excerpt: "
4-
This section provides guidance on your Python package’s structure, code formats and style. It also reviews the various packaging tools that you can use to support building and publishing your package."
5-
learning_objectives:
2+
title: "Create your Python package structure"
3+
excerpt: "Learn about the best way to create your Python package."
64
subpages:
7-
- name: Package structure
8-
url: https://www.pyopensci.org/python-package-guide/package-structure-code/intro.html
9-
- name: Build tools package
10-
url: https://www.pyopensci.org/python-package-guide/package-structure-code/intro.html
11-
url:
5+
- name: The structure of a Python package
6+
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html
7+
- name: Add metadata - pyproject.toml file
8+
url: https://www.pyopensci.org/python-package-guide/package-structure-code/pyproject-toml-python-package-metadata.html
9+
- name: Declare package dependencies
10+
url: https://www.pyopensci.org/python-package-guide/package-structure-code/declare-dependencies.html
11+
- name: Get to know the ecosystem of Python packaging tools
12+
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-build-tools.html
13+
- name: Complete package builds
14+
url: https://www.pyopensci.org/python-package-guide/package-structure-code/complex-python-package-builds.html
1215
---

_packaging/publish-python-package.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
title: "Publish your scientific Python package"
2+
title: "Publish your Python package"
33
excerpt: "
44
Learn more about the publishing options for your Python package including publishing on PyPI and the conda-forge channel of conda."
55
learning_objectives:
66
subpages:
7+
- name: Build your package for PyPI publication
8+
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-distribution-files-sdist-wheel.html
79
- name: Publish to PyPI and Conda
810
url: https://www.pyopensci.org/python-package-guide/package-structure-code/publish-python-package-pypi-conda.html#
911
- name: Versioning your package

_packaging/tests.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ subpages:
1010
url: https://www.pyopensci.org/python-package-guide/tests/write-tests.html
1111
- name: Three types of types for your Python package
1212
url: https://www.pyopensci.org/python-package-guide/tests/test-types.html
13+
- name: Run tests locally
14+
url: https://www.pyopensci.org/python-package-guide/tests/run-tests.html
15+
- name: Run tests online using Continuous Integration
16+
url: https://www.pyopensci.org/python-package-guide/tests/tests-ci.html
1317
url:
1418
---

_pages/packaging-resources.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: splash
33
classes: flowing
4-
permalink: /python-packaging-for-science.html
4+
permalink: /python-packaging-science.html
55
title: "Python packaging resources for scientists"
66
excerpt: "We make the scientific Python package ecosystem easier to navigate through peer review and packaging resources."
77
header:
@@ -18,8 +18,8 @@ peer-review:
1818
btn_label: Learn more and get involved with peer review today.
1919
btn_class: btn--primary
2020
packaging-easier:
21-
- image_path: images/people-building-blocks.jpg
22-
alt: "A group of people working on a tetris like set of building blocks, trying to stack the blocks together. "
21+
- image_path: images/pyopensci-working-together.png
22+
alt: "A black and grey sketch of a group of people sitting at a desk in front of a monitor smiling."
2323
title: "Get Involved: Help us improve our scientific Python packaging resources"
2424
excerpt: "
2525
We need your help! Our packaging content is community-created and reviewed through an open review process on GitHub. The more feedback that we get, the more useful our resources are to the community. Get involved by:
@@ -62,11 +62,11 @@ toc: false
6262

6363
{% include feature_row id="community-created" type="right" %}
6464

65-
### Guidebook sections
65+
### Scientific Python packaging guidebook sections
6666

67-
<div class="entries-grid">
67+
<div class="tutorial__container">
6868
{% for atutorial in site.packaging %}
69-
{% include tutorial_grid.html %}
69+
{% include tutorial-grid.html %}
7070
{% endfor %}
7171
</div>
7272

@@ -86,9 +86,9 @@ Beginner-friendly Python packaging tutorials that will take you through
8686
the full process of creating a Python package following modern best
8787
practices.
8888

89-
<div class="entries-grid">
89+
<div class="tutorial__container">
9090
{% for atutorial in site.tutorials %}
91-
{% include tutorial_grid.html %}
91+
{% include tutorial-grid.html %}
9292
{% endfor %}
9393
</div>
9494

@@ -110,13 +110,3 @@ practices.
110110

111111

112112
{% include div_purple_bottom.html %}
113-
114-
<div class="pyos-section" markdown="1">
115-
<div class="content" markdown="1">
116-
117-
{% include feature_row id="peer-review" type="right" %}
118-
119-
</div>
120-
</div>
121-
122-
{% include div_purple_top.html %}

_sass/minimal-mistakes.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@
5050
@import "minimal-mistakes/pyos-twitter";
5151
@import "minimal-mistakes/pyos-grid";
5252
@import "minimal-mistakes/pyos-flowing-page";
53+
@import "minimal-mistakes/pyos-cards";
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.tutorial {
2+
font-size: 1em;
3+
4+
& p.page__meta {
5+
padding-top: 1.3em;
6+
}
7+
}
8+
9+
.card .page__meta {
10+
font-size:5em!important;
11+
}
12+
13+
.tutorial__container {
14+
display: grid;
15+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); // Adjust the minmax values as needed
16+
grid-gap: 20px;
17+
18+
// Ensure all cards have the height of the tallest card
19+
align-items: stretch;
20+
21+
.card {
22+
display: flex;
23+
flex-direction: column;
24+
background-color: #fff;
25+
border: 1px solid #ddd;
26+
border-radius: 8px;
27+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
28+
29+
.excerpt {
30+
font-size: 1em;
31+
padding: 1em;
32+
}
33+
h4.title {
34+
color: rgb(84, 38, 104)!important;
35+
font-size: 1.3em;
36+
margin: 0;
37+
}
38+
.title-block {
39+
background-color: #F7F2E2;
40+
display: flex;
41+
height: auto;
42+
padding: 1.2em;
43+
border-bottom: #555 2px solid;
44+
}
45+
46+
img {
47+
width: 100%;
48+
height: auto;
49+
}
50+
51+
.content {
52+
flex: 1;
53+
}
54+
ul li {
55+
font-size: .9em;
56+
margin: 0 0 .5em 0;
57+
}
58+
}
59+
60+
}
61+
62+
63+
.btn--success{
64+
color: #000!important;
65+
}

0 commit comments

Comments
 (0)