-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enh: Add infrastructure to support a new packaging page
A new section on our website!! learn is next
- Loading branch information
Showing
22 changed files
with
355 additions
and
8 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
<article class="card" itemscope="" itemtype="https://schema.org/CreativeWork"> | ||
<div class="content"> | ||
<div class="title-block"> | ||
<h4 class="title" itemprop="headline">{{ atutorial.title }}</h4> | ||
</div> | ||
{% if atutorial.excerpt %} | ||
<p class="excerpt"> | ||
{{ atutorial.excerpt }} | ||
</p> | ||
{% endif %} | ||
|
||
{% if atutorial.subpages %} | ||
<ul> | ||
{% for page in atutorial.subpages %} | ||
<li> | ||
<a href="{{ page.url }}">{{ page.name }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
{% endif %} | ||
</div> | ||
{% if atutorial.link %} | ||
<a href="{{ atutorial.link }}" class="btn {{ atutorial.btn_class }}"><i class="fa-solid fa-magnifying-glass"></i> {{ atutorial.btn_label }}</a> | ||
{% endif %} | ||
</article> |
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,16 @@ | ||
--- | ||
title: "Document your Python package" | ||
excerpt: "Learn about best practices for developing documentation for your Python package." | ||
learning_objectives: | ||
subpages: | ||
- name: Documentation Overview | ||
url: https://www.pyopensci.org/python-package-guide/documentation/index.html# | ||
- name: Create your docs | ||
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/get-started.html | ||
- name: Create package tutorials | ||
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/create-package-tutorials.html | ||
- name: Document your code (API docs) | ||
url: https://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/document-your-code-api-docstrings.html | ||
|
||
url: | ||
--- |
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,15 @@ | ||
--- | ||
title: "Create Python package structure" | ||
excerpt: "Learn about the best way to create your Python package." | ||
subpages: | ||
- name: The structure of a Python package | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html | ||
- name: Add metadata - pyproject.toml file | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/pyproject-toml-python-package-metadata.html | ||
- name: Declare package dependencies | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/declare-dependencies.html | ||
- name: Get to know the ecosystem of Python packaging tools | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-build-tools.html | ||
- name: Complete package builds | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/complex-python-package-builds.html | ||
--- |
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,16 @@ | ||
--- | ||
title: "Publish your Python package" | ||
excerpt: " | ||
Learn more about the publishing options for your Python package including publishing on PyPI and the conda-forge channel of conda." | ||
learning_objectives: | ||
subpages: | ||
- name: Build your package for PyPI publication | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-distribution-files-sdist-wheel.html | ||
- name: Publish to PyPI and Conda | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/publish-python-package-pypi-conda.html# | ||
- name: Versioning your package | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-versions.html | ||
- name: Code style and format | ||
url: https://www.pyopensci.org/python-package-guide/package-structure-code/code-style-linting-format.html | ||
url: | ||
--- |
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,18 @@ | ||
--- | ||
title: "Python package tests" | ||
excerpt: " | ||
Learn more about the importance of writing tests for your Python package and how you can setup infrastructure to run your tests both locally and on GitHub." | ||
learning_objectives: | ||
subpages: | ||
- name: Introduction to writing tests | ||
url: https://www.pyopensci.org/python-package-guide/tests/index.html | ||
- name: Write tests for your Python package | ||
url: https://www.pyopensci.org/python-package-guide/tests/write-tests.html | ||
- name: Three types of types for your Python package | ||
url: https://www.pyopensci.org/python-package-guide/tests/test-types.html | ||
- name: Run tests locally | ||
url: https://www.pyopensci.org/python-package-guide/tests/run-tests.html | ||
- name: Run tests online using Continuous Integration | ||
url: https://www.pyopensci.org/python-package-guide/tests/tests-ci.html | ||
url: | ||
--- |
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 |
---|---|---|
@@ -0,0 +1,113 @@ | ||
--- | ||
layout: splash | ||
classes: flowing | ||
permalink: /python-packaging-science.html | ||
title: "Python packaging resources for scientists" | ||
excerpt: "We make the scientific Python package ecosystem easier to navigate through peer review and packaging resources." | ||
header: | ||
overlay_image: images/header.jpg | ||
overlay_filter: 0.8 | ||
intro: | ||
- excerpt: "There are many tools and approaches that can be used to create a Python package. We build resources that help you both understand the tool ecosystem and also learn how to create a Python package using modern best practices." | ||
peer-review: | ||
- image_path: images/pyopensci-people-at-computer.jpg | ||
alt: "A pencil sketch of a round table with people from different backgrounds sitting around it, working on laptops and also writing together." | ||
excerpt: "We run an open peer review process for scientific Python software. Peer review helps maintainers improve the quality, usability and long-term maintainability of scientific software." | ||
title: Raising the bar for scientific Python software" | ||
url: https://www.pyopensci.org/about-peer-review/index.html | ||
btn_label: Learn more and get involved with peer review today. | ||
btn_class: btn--primary | ||
packaging-easier: | ||
- image_path: images/pyopensci-working-together.png | ||
alt: "A black and grey sketch of a group of people sitting at a desk in front of a monitor smiling." | ||
title: "Get Involved: Help us improve our scientific Python packaging resources" | ||
excerpt: " | ||
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: | ||
* Opening an issue about problems that you find in our guidebook | ||
* Submitting a pull request that fixes a typo or mistake in the guide. | ||
* Get credit for your contribution | ||
All contributions are recognized both on our website and in the guidebook's citation. | ||
" | ||
url: https://github.com/pyOpenSci/python-package-guide/pulls | ||
btn_label: <i class="fa-solid fa-arrow-up-right-from-square"></i> See what we're working on now | ||
btn_class: btn--success | ||
community-created: | ||
- image_path: images/pyopensci-people-working-together.png | ||
image_size: 500px | ||
alt: "A group of people working on a tetris like set of building blocks, trying to stack the blocks together. " | ||
title: "Community-created Python Packaging Guide" | ||
excerpt: " | ||
Our packaging guide is a living document that will help you navigate the Python packaging ecosystem and learn about modern Python packaging best practices. | ||
* Created & curated by the community | ||
* Reviewed by beginner to expert level Pythonistas | ||
* Accurate, modern & beginner-friendly | ||
All contributions are recognized both on our website and in the guidebook's citation. | ||
" | ||
toc: false | ||
--- | ||
|
||
{% include feature_row id="intro" type="center" %} | ||
|
||
<div class="pyos-section purple"> | ||
<div class="content" markdown="1"> | ||
|
||
{% include feature_row id="community-created" type="right" %} | ||
|
||
<div class="subsection" markdown="1"> | ||
### Scientific Python packaging guidebook sections | ||
|
||
<div class="tutorial__container"> | ||
{% for atutorial in site.packaging %} | ||
{% include tutorial-grid.html %} | ||
{% endfor %} | ||
</div> | ||
|
||
</div> | ||
<div class="clearfix"></div> | ||
|
||
</div> | ||
</div> | ||
|
||
{% include div_purple_bottom.html %} | ||
|
||
<div class="pyos-section"> | ||
<div class="content" markdown="1"> | ||
|
||
## Beginner friendly Python packaging tutorials | ||
|
||
Beginner-friendly Python packaging tutorials that will take you through | ||
the full process of creating a Python package, following modern best | ||
practices. | ||
|
||
<div class="tutorial__container"> | ||
{% for atutorial in site.tutorials %} | ||
{% include tutorial-grid.html %} | ||
{% endfor %} | ||
</div> | ||
|
||
<div class="clearfix"></div> | ||
|
||
</div> | ||
</div> | ||
|
||
{% include div_purple_top.html %} | ||
|
||
<div class="pyos-section purple" markdown="1"> | ||
<div class="content" markdown="1"> | ||
{% include feature_row id="packaging-easier" type="left" %} | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
{% include div_purple_bottom.html %} |
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,8 @@ | ||
--- | ||
title: Scientific Python tutorials | ||
layout: collection | ||
permalink: /tutorials/ | ||
collection: portfolio | ||
entries_layout: grid | ||
classes: wide | ||
--- |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
.tutorial { | ||
font-size: 1em; | ||
|
||
& p.page__meta { | ||
padding-top: 1.3em; | ||
} | ||
} | ||
|
||
.card .page__meta { | ||
font-size:5em!important; | ||
} | ||
|
||
.tutorial__container { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); // Adjust the minmax values as needed | ||
grid-gap: 20px; | ||
|
||
// Ensure all cards have the height of the tallest card | ||
align-items: stretch; | ||
|
||
.card { | ||
font-size: .8em; | ||
display: flex; | ||
flex-direction: column; | ||
background-color: #fff; | ||
border: 1px solid #ddd; | ||
border-radius: 8px; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
|
||
.excerpt { | ||
font-size: 1em; | ||
padding: 1em; | ||
} | ||
h4.title { | ||
color: rgb(84, 38, 104)!important; | ||
font-size: 1.3em; | ||
margin: 0; | ||
} | ||
.title-block { | ||
background-color: #F7F2E2; | ||
display: flex; | ||
height: auto; | ||
padding: 1.2em; | ||
border-bottom: #555 2px solid; | ||
} | ||
|
||
img { | ||
width: 100%; | ||
height: auto; | ||
} | ||
|
||
.content { | ||
flex: 1; | ||
} | ||
ul li { | ||
font-size: .9em; | ||
margin: 0 0 .5em 0; | ||
} | ||
ul { | ||
padding-right: .05em; | ||
padding-bottom: .2em; | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
.btn--success{ | ||
color: #000!important; | ||
} | ||
|
||
|
||
.subsection { | ||
padding: 0 2em; | ||
|
||
h3 { | ||
padding-left: 0.5em; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
margin-right: auto; | ||
display: block; | ||
max-height: 3rem!important; | ||
box-shadow: none!important; | ||
} | ||
|
||
|
||
|
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,4 +1,8 @@ | ||
|
||
.clearfix::after { | ||
content: ""; | ||
display: table; | ||
clear: both; | ||
} | ||
|
||
/* Create & style a 3x3 grid wrapper */ | ||
.grid { | ||
|
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
Oops, something went wrong.