Skip to content
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

Merged
merged 11 commits into from
Dec 12, 2024

Conversation

lwasser
Copy link
Member

@lwasser lwasser commented Dec 5, 2024

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!

@lwasser lwasser changed the title fix: add cross links to the packaging guide [dec 12 merge] fix: add cross links to the packaging guide Dec 5, 2024
@lwasser
Copy link
Member Author

lwasser commented Dec 5, 2024

pinging @pyOpenSci/packaging-council on this pr for review (if you have time).

package-structure-code/intro.md Outdated Show resolved Hide resolved
package-structure-code/intro.md Outdated Show resolved Hide resolved

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fixed 🚀

Comment on lines 161 to 162
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.
Copy link
Contributor

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".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!!

package-structure-code/python-package-structure.md Outdated Show resolved Hide resolved
package-structure-code/python-package-structure.md Outdated Show resolved Hide resolved
package-structure-code/python-package-structure.md Outdated Show resolved Hide resolved
package-structure-code/python-package-structure.md Outdated Show resolved Hide resolved
package-structure-code/python-package-structure.md Outdated Show resolved Hide resolved
@lwasser
Copy link
Member Author

lwasser commented Dec 5, 2024

Let's see if CI is happier now. docs-test ran successfully locally after the suggested changes!! 🚀 🤞🏻

lwasser and others added 5 commits December 11, 2024 13:52
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]>
@lwasser
Copy link
Member Author

lwasser commented Dec 11, 2024

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/intro.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.
Copy link
Collaborator

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.

Copy link
Member Author

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?

package-structure-code/python-package-structure.md Outdated Show resolved Hide resolved
Co-authored-by: Jeremiah Paige <[email protected]>
@lwasser
Copy link
Member Author

lwasser commented Dec 12, 2024

Ok y'all!! Thank you for all of the feedback. I'm going to merge this once CI is happy!! @hugovk @ucodery 🚀

@lwasser lwasser merged commit 4b45c5d into pyOpenSci:main Dec 12, 2024
4 checks passed
@lwasser lwasser deleted the links branch December 12, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants