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

add copyleft licenses #58

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Conversation

sneakers-the-rat
Copy link
Contributor

as it says :) Pretty sure i'm invoking these licenses correctly

🎤 Which license do you want to use? Includes a LICENSE file in the repository root.
For more information, see:
- https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html
- https://opensource.org/licenses
   (Use arrow keys)
 » Permissive - MIT
   Permissive - BSD-3-Clause
   Permissive - Apache-2.0
   Copyleft - GPL-3.0
   Copyleft - EUPL-1.2
   Intermediate - MPL-2.0

Copy link
Contributor

@Midnighter Midnighter left a comment

Choose a reason for hiding this comment

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

Two thoughts:

  1. I'd like to keep the options to what we recommend in the guide. Folks can always replace the generated license with something else if they want to.
  2. In the src/**/*.py files, I have added header comments based on the chosen license. Not all licenses require this, but some recommend it anyway.

@sneakers-the-rat
Copy link
Contributor Author

I'd like to keep the options to what we recommend in the guide.

fair enough! as of {recently} we have added discussion of copyleft licenses! https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html#use-open-permissive-licenses-when-possible

so someone coming off the guide will recognize/see "ah yes copyleft, permissive, i remember those."

Folks can always replace the generated license with something else if they want to.

I know this is a point of cultural divide in FOSS world, and i also know that part of that cultural divide is permissive license folks thinking copyleft folks are busybody do-gooders that think licenses are magical, and allow me to play into that caricature for a moment. defaults are powerful, and while it is true it's always possible to change things afterwards, I think it's important to at least present them as options for a few reasons -

one is that we narrow the scope of who pyos is for by only acknowledging the existence of permissive licenses. it sends the message to other free-as-in-liberation programmers that pyos isn't for them. I like the healthy blend of people from different worlds we have here and would like to keep deepening that!

two is that information is political, as is open source software, and part of the duty of an educator in politicized spaces is to make sure your students are at least aware of, if not conversant in those politics. I tried hard in the guide to not be preachy or longwinded, but rather just nod to the cultural divide between camps so they could investigate further if they wanted. this is a similar level of light touch: if you want to know more, you might search the license name, otherwise you can just cruise through with the defaults.

three is that i want to use this tool, so it would be nice if it had the licenses i prefer in it XD

I have added header comments based on the chosen license.

Ah! missed those. will update.

@sneakers-the-rat
Copy link
Contributor Author

ok how bout dat

  • made partials for the license "stub" (not sure what to call that) and header so we can reuse them
  • added a test for one partial that uses a macro, that felt like a little too much template logic to just yeet into the template
  • started making some central fixtures like eg. using the copier.yml config to parameterize fixtures so we don't have to keep a bunch of things sync'd in multiple places

trying not to overengineer, but also stung by the painful memories of getting myself in knots when working on sprawling code generators lol

Copy link
Contributor

@Midnighter Midnighter left a comment

Choose a reason for hiding this comment

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

I get what you mean with your concern of over-engineering. I do think these are healthy changes, though. Thanks for those 🙂

One small question, but it's good to go, I believe.

return yaml.load(yfile)


# don't mutate or else i'll have to get out the spray bottle (make it a fixture)
Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, why not make it a fixture? 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just because it can get pretty baffling pretty fast when you want to use the output of a fixture to parameterize a test function or another fixture in this case. like i wanted to be able to construct the fixture params outside of a fixture body... although now that i'm thinking about it again i might be able to rig this up with indirect parameterization... but too sleepy now.

we could also just "do both," i had used those allcaps consts to leave open the name for a fixture if we wanted one, and there's no reason that we couldn't also make a fixture for tests that wanted to request and use the whole config instead of using it to make another fixture from its fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aka no good reason for it not to be one, i chose peace instead of doing battle with pytest on this night, but may not on another

Copy link
Contributor

Choose a reason for hiding this comment

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

Totally fair, it gets tricky quickly with multiple levels of indirection.

@sneakers-the-rat sneakers-the-rat merged commit 385ccab into pyOpenSci:main Nov 1, 2024
6 checks passed
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.

2 participants