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

[Stale!] Using templates to build the license #79

Closed
wants to merge 19 commits into from
Closed

[Stale!] Using templates to build the license #79

wants to merge 19 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 26, 2022

Overview

Continuation of issue #77.

Proposed Resolution

Created a few NodeJS (in the ./source/ folder and the main build script, build.js) scripts to create a ./licenses/NoHarm.md file from EJS templates (in the ./templates folder}.

Notes

I was going to use the mustache template engine because of its compatibility, but the scripts were getting very hairy very fast, so I switched to EJS.

@ghost
Copy link
Author

ghost commented Jul 27, 2022

(Updated)

Just got back online. I synced my local copy with my fork, and I am finished with section 3 (grant of copyright).

@ghost ghost mentioned this pull request Jul 27, 2022
@ghost ghost marked this pull request as ready for review July 28, 2022 03:14
@ghost
Copy link
Author

ghost commented Jul 28, 2022

(Updated)
Alright @tommaitland, ready for review. For a quick recap:

  1. Sections 6 and 7 do not justify the need for placeholders (<%= ... %>), but these sections will be easier to maintain in partials, and they would allow for flexible expansion as the license grows.
  2. I bundled sections 8-10 together as they dealt with warranties and liability.

Also, feel free to let me know what you think, and what I need to fix. :)

Edit: Once the IRod22:templates branch is merged with raisely:publish, the dest (for destination) and main can be changed in ./source/config.js for development. Just make sure to have Node v17+ on your machine, download/clone the repo from GitHub, run npm install on the command line, and you are good to go. Just make sure to either run npm run build or node build.js (faster, recommended) when you're ready to rebuild the license.

@ghost ghost mentioned this pull request Jul 28, 2022
@ghost
Copy link
Author

ghost commented Jul 30, 2022

@tommaitland, sorry for interrupting your Sunday (it is Saturday for me), but I just thought of a very important question that needs to be answered before this PR is merged. Is the Do No Harm core team okay with using Node.js to build the license (and potentially the summary)? The reason I'm asking is that I will be busy for a few months (starting in late August), so I may not have time to maintain the builder. I made the builder easy to maintain (only one dependency and 5 files that are related to the builder); however, if it is not possible to use Node.js, I can look to see if there's another language/runtime that is within the team's expertise and has a dependency similar to the current template engine (EJS).

@ghost ghost mentioned this pull request Aug 1, 2022
@ghost
Copy link
Author

ghost commented Aug 5, 2022

Disregard what I said about Sections 4, 5, and 10. These errors are fixable. Section 4 will just have to deal with the duplicated data, and the ./sources/data.js file can be changed later on to accommodate this. Section 5 is fixable (it will need to be overhauled though) because I only need to remove that ; and (it is not recommended to use and anyway in a list like this). Finally, Section 10 is fixable because I only need to replace the and/or with or, and remove a misplaced comma. I'll let the team know when everything is finished. This should not take a while to fix. :)

@ghost
Copy link
Author

ghost commented Aug 5, 2022

I'm done with the hard section (Section 5 gave me a wallop 😵‍💫). I just have to do minor data edits, but those can wait for a bit. 😳

@ghost ghost mentioned this pull request Aug 5, 2022
@ghost ghost mentioned this pull request Aug 5, 2022
This is useful to tell if the license was built successfully.
@ghost
Copy link
Author

ghost commented Aug 7, 2022

Good morning, @tommaitland. I have everything ready to go. Here's an overview of what's going to be merged:

  • .gitignore: This is used to ignore the node_modules folder for the libraries installed.
  • package.json: This contains the information about a NodeJS project.
  • package-lock.json: This contains the exact versions of external libraries installed. This is auto-generated by npm.
  • build.js: This is where the templates are used along with the data in ./sources/data.js and the functionality in ./sources/context.js get used to generate the final output.
  • /licenses
    • NoHarm.md: The final output of executing either npm run build or node build.js
  • /source: Contains the source data, functionality, and configuration for the build.js file.
    • config.js: Tells build.js where the main template is and the destination file is (currently at /licenses/NoHarm.md; however, it can be changed to /licenses/Apache-2.0-NoHarm.md or a different file).
    • context.js: Contains the template functionality for text formatting. It can be customized to add other utilities.
    • data.js: Contains the data to inject into the templates.
  • /templates (self-explanatory, not showing files for brevity)

Currently merging 17 files with 967 additions and no deletions.

@ghost
Copy link
Author

ghost commented Aug 14, 2022

@tommaitland I would like to let you know that starting next Monday (Tuesday for Australia) I will be focusing on college, and I may not be able to work on this PR very much during the rest of this year. If you want me to make changes to anything regarding this PR, today is the best time to let me know, please. If you do have any change requests, I'll see how quickly I can incorporate them into IRod22:templates. Thank you for understanding.

@ghost ghost mentioned this pull request Aug 14, 2022
@ghost
Copy link
Author

ghost commented Aug 18, 2022

Hello @tommaitland, I gave you access as a collaborator to my fork because I will not be able to commit to it long-term for a while (until sometime in October, then not much activity until my next break). You may see some activity on my profile, but it will be sporadic at best. Is there anyone else you think may want or need access? I may not be able to grant access after 08/22/2022 because I will be busy from that date until my break. Sorry for the short-notice news.

@ghost
Copy link
Author

ghost commented Sep 10, 2022

@tommaitland, I am just asking, but have you had a chance to looking into reviewing and merging this PR into raisely:publish? The changes are pretty much ready (they have been for a month), unless you want me to merge IRod22:incorp-pr-69, which almost takes care of PR #69, into IRod22:templates, or you want me to change any configuration.

@ghost ghost changed the title Using templates to build the license [Stale!] Using templates to build the license Sep 11, 2022
@ghost
Copy link
Author

ghost commented Sep 11, 2022

Because this PR has not been reviewed in the past month, I am marking it as stale by changing the title.

@ghost
Copy link
Author

ghost commented Sep 16, 2022

(edited for grammar)
I am closing this PR because there have been no reviews or changes from the @raisely core team for a month and a half. I'll still keep the branch, so anyone can reopen this PR and contribute.

@ghost ghost closed this Sep 16, 2022
@tommaitland
Copy link
Contributor

Hi @IRod22 I'm sorry you didn't receive feedback on this. The NoHarm license is just a side project of Raisely and while we use it day-to-day we don't always have time to prioritise changes to it. It's open source so others can use it, fork it, and build on it from there. It just means I can't always reply to issues same day or even same month, which I know you've been expecting from time-to-time.

In terms of this PR, I don't think we need a license generator inside this repo. I think it makes it a little hard to digest and is over-engineering what can just be markdown files in a folder that get updated. I never really got a chance to give you feedback on the idea before you did all the work to code it up, as it was only days between your draft PR and then the final one.

I know you put a lot of work into this, so if you'd like to continue maintaining this version of the license I'm happy to create a list of (agreeable) forks of NoHarm in our readme so there's a flavour for everyone.

@ghost
Copy link
Author

ghost commented Sep 17, 2022

Ok @tommaitland, but what about the legal advice? It looks fine to me, but neither I nor the other approved contributers can re-assure ourselves or the community that the license(s) will not have any legal loopholes or step on any toes. Also, what about naming the licenses? Some devs may see the forks as knock-offs and there could be a chance of litigation. Those are just a few questions other contributors could ask at the thought of maintaining legally-sound forks.

@tommaitland
Copy link
Contributor

This license is free to be forked and modified. The license permits that. There’s no trademark or copyright on the name. What are your legal concerns there?

@ghost
Copy link
Author

ghost commented Sep 17, 2022

Sir, we're still waiting on issue #56. NoHarm is still in its draft phase, and as any other devs would, I would not want to maintain or use a license that could cause litigation.

@ghost
Copy link
Author

ghost commented Sep 17, 2022

I was also able to help out in a few issues. I saw that some needed closing, and I gave some of my knowledge for some context in a few issues.

@tommaitland
Copy link
Contributor

Sure thing.

On legal risk, the idea behind #56 was simple due diligence. We use this license already publicly and across our whole business. I’m not a lawyer but I’ve been around enough to know the risk of being sued simply for using any license is at best negligible.

@ghost
Copy link
Author

ghost commented Sep 17, 2022

Oh, ok. I would still recommend copying and pasting parts of my generated license into the existing license, so NoHarm is up to date on formatting standards (:point_up:). I also found a few grammatical errors while generating the license that could confuse the readers (i.e. the ; and, 'and/or', misplaced punctuation, etc.), which as a developer, is the last thing you want when figuring out the conditions of using licensed software. You could actually copy and paste the entire generated content into NoHarm because I edited the parts that needed editing, so you should not see any large diffs after saving the changes. The whitespace will look a bit different, but it was a compromise I had to make for an error-free license :)

@ghost
Copy link
Author

ghost commented Sep 17, 2022

I know you put a lot of work into this, so if you'd like to continue maintaining this version of the license I'm happy to create a list of (agreeable) forks of NoHarm in our readme so there's a flavour for everyone.

I've been thinking about it, and I would be honored to help out; however, I've been looking at the branch/fork network, and besides my fork and @realpixelcode's fork, none of the others are up to date with raisely:publish. For instance, PR #69 has merge conflicts because @eylles's fork is 30 commits behind the main branch, which is why I decided to incorporate it into my fork.

@tommaitland
Copy link
Contributor

Yep, we can’t accept all PRs and additions to the license here.

@ghost
Copy link
Author

ghost commented Sep 18, 2022

I would be able to maintain my fork, but the only other candidate that I know of would be @realpixelcode, which I don't know if they(?) would be up for maintaining a version of the license. Either way, there will be not very many "flavour[s]" to choose from.

Another issue that may need resolution is propagating issues from the main branch to the children branches; GitHub forks don't have issue trackers, so there needs to be a way to report bugs to the child forks.

@realpixelcode
Copy link
Contributor

the only other candidate that I know of would be @realpixelcode, which I don't know if they(?) would be up for maintaining a version of the licence.

The thing is, I already maintain my own “For Good Eyes Only Licence”, and I wouldn't be surprised if I ended up making the exact same changes for that licence and my fork of Do No Harm Licence, eventually making them resemble each other.

While I'd therefore not maintain my own fork, I'd be more than happy to contribute to someone else's version of the Do No Harm Licence! Regardless of who will continue the main work on the Do No Harm Licence, I'll happily offer my help :)

Just one thing: I'd recommend resolving #82 in order to make forking easier.

This pull request was closed.
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.

None yet

2 participants