|
| 1 | +# Python package structure information |
| 2 | + |
| 3 | +If you plan to submit a package for review to pyOpenSci and are looking for |
| 4 | +some guidance on package structure, code formats and style, then this section is for you. |
| 5 | + |
| 6 | +## Guidelines for pyOpenSci's packaging recommendations |
| 7 | + |
| 8 | +<!-- Might belong on the LANDING page for this entire guide?--> |
| 9 | + |
| 10 | +There are some differing opinions on what Python package structure should |
| 11 | +look like and what tools to use across the Python ecosystem. |
| 12 | + |
| 13 | +In this guide, we have made decisions around suggested standards and required |
| 14 | +standards, based upon the commonly used approaches in the scientific Python |
| 15 | +community. Our goal is to help standardize packaging across this ecosystem. |
| 16 | + |
| 17 | +In some cases the suggestions here may diverge from those in the non-scientific parts of the Python ecosystem. |
| 18 | + |
| 19 | +```{note} |
| 20 | +The suggestions for package layout in this section are made with the |
| 21 | +intent of being helpful; they are not specific requirements for your |
| 22 | +package to be reviewed and accepted into our ecosystem. |
| 23 | +``` |
| 24 | + |
| 25 | +In all cases, we try to align our suggestions with the most current, accepted |
| 26 | +[PEP's (Python Enhancement Protocols)](https://peps.python.org/pep-0000/) and the [scientific-python community specs](https://scientific-python.org/specs/). |
| 27 | + |
| 28 | +```{note} |
| 29 | +Have a look at the |
| 30 | +bare-minimum [editor checks](https://www.pyopensci.org/peer-review-guide/software-peer-review-guide/editor-in-chief-guide.html#editor-checklist-template) that pyOpenSci |
| 31 | +performs before a review begins. These checks are useful to explore |
| 32 | +for both authors planning to submit a package to us for review and for |
| 33 | +anyone who is just getting started with creating a Python package. |
| 34 | +
|
| 35 | +In general these are basic items that should be in any open software repository. |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | +<!-- |
| 40 | +
|
| 41 | +These checks include several items |
| 42 | +
|
| 43 | +- **Sufficient Documentation** The package has sufficient documentation available online (README, sphinx docs) to allow us to evaluate package function and scope *without installing the package*. This includes: |
| 44 | + Get started tutorials or vignettes that help a user understand how to use the package and what it can do for them (often these have a name like "Getting started") |
| 45 | +- **API documentation** - this includes clearly written doc strings with variables defined using a standard docstring format --> |
| 46 | +<!-- |
| 47 | +```{tip} |
| 48 | +### Python packaging resources that we love |
| 49 | +
|
| 50 | +We think the resources below are excellent but each have particular opinions |
| 51 | +that you may or may not find in our packaging guide. For instance, the PyPA |
| 52 | +guide encourages users to store their package in a `src/package-name` directory. |
| 53 | +While we accept that approach many of our community members prefer to not use |
| 54 | +the `src` directory. |
| 55 | +
|
| 56 | +* [Python packaging for research software engineers](https://merely-useful.tech/py-rse/) |
| 57 | +* [PyPA packaging guide](https://packaging.python.org/en/latest/) |
| 58 | +``` |
| 59 | +--> |
0 commit comments