-
Notifications
You must be signed in to change notification settings - Fork 55
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
[dec 12 merge] fix: add cross links to the packaging guide #431
Conversation
pinging @pyOpenSci/packaging-council on this pr for review (if you have time). |
|
||
We do not recommend including tests as part of your package wheel by default. However, not including tests in your package distribution will make it harder for people other than yourself to test whether your package is functioning correctly on their system. If you have a small test suite (Python files + data), and think your users may want to run tests locally on their systems, you can include tests by moving the `tests/` directory into the **src/package** directory (see example below). | ||
Writing [tests](/tests/index.html) for your package is important; however, we do not recommend including tests as part of your [package wheel](python-wheel) by default. However, not including tests in your package distribution will make it harder for people other than yourself to test whether your package runs properly on their system. If you have a small test suite (Python files + data), and think your users may want to run tests locally on their systems, you can include tests by moving the `tests/` directory into the **src/package** directory (see example below). |
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.
Hmm, the CI can't find /tests/index.html
:
https://github.com/pyOpenSci/python-package-guide/actions/runs/12185280544/job/33991144890?pr=431#step:9:131
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.
thank you for catching all of these issues!! CI is now happy thanks to you!!
discourage you from including data in your test suite directory. Rather, | ||
host your test data in a repository such as Figshare or Zenodo. Use a | ||
tool such as [Pooch](https://www.fatiando.org/pooch/latest/) to access | ||
the data when you (or a user) runs tests. | ||
|
||
Check out the testing section of our guide for more information about tests. | ||
For more information about Python package tests, see the [tests section of our guide](/tests/index.html). |
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.
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.
Also fixed 🚀
distribution files. This places a maintenance toll on repositories like PyPI and | ||
Anaconda.org that have to deal with thousands of package uploads. | ||
Anaconda.org has to deal with thousands of package uploads. |
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.
It read better before with "that have" than "has".
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.
Fixed!!
Co-authored-by: Hugo van Kemenade <[email protected]>
Let's see if CI is happier now. docs-test ran successfully locally after the suggested changes!! 🚀 🤞🏻 |
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
thank you @hugovk, for the great review!! I've integrated all of your changes and will merge later this evening (assuming CI is still happy!!) 🚀 |
package-structure-code/python-package-distribution-files-sdist-wheel.md
Outdated
Show resolved
Hide resolved
- **docs/:** discussed in our docs chapter, this directory contains your user-facing documentation website. In a **src/** layout docs/ are normally included at the same directory level of the **src/** folder. | ||
- **tests/** this directory contains the tests for your project code. In a **src/** layout tests are normally included at the same directory level of the **src/** folder. | ||
- **docs/:** discussed in our docs chapter, this directory contains your user-facing documentation website. In a **src/** layout docs/ are normally included at the same directory level as the **src/** folder. | ||
- **tests/** This directory contains the tests for your project code. In a **src/** layout, tests are normally included at the same directory level as the **src/** folder. |
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.
You capitalized this bullet, but no others. Not sure what your preference is.
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.
this happens because i never know when to capitalize and when to not capitalize! let's capitalize?
Co-authored-by: Jeremiah Paige <[email protected]>
This is the start of a set of small pr's that cross link to other content in our guidebook. This is also a good opportunity for us to identify things that we might want to add, change, or enhance.
Finally, I noticed that our language was a bit too "gentle" and suggestive vs being definitive. I think we can be definite and confident now that we've been taught this stuff numerous times!