Skip to content

Conversation

@alexzurbonsen
Copy link
Contributor

Triage

Related issue/s

Please list below any issues this pull request is related to.

Describe the changes made in this pull request

As clearly as possible, describe the changes made in the pull request. You should at least detail "what changes have been made" and "what the results of these changes will be".

@alexzurbonsen alexzurbonsen marked this pull request as ready for review July 15, 2024 16:50
@alexzurbonsen
Copy link
Contributor Author

@fershad This one is not really finished yet, but I want to open it up for review as early as possible.

E.g. I have never used gitpod before and I am wondering if you want to include this here as well?
Also there is already a bunch of explanations that can already be reviewed.

But:

  • the installation method for my plugins is not practical. Need to publish to npm eventually I guess.
  • if-unofficial-plugins need another release before the described installation method is going to work (if you would want to test running the manifest file you would have to clone the current main branch of the if-unofficial-plugins repo, and run npm install && npm link

@fershad fershad linked an issue Sep 4, 2024 that may be closed by this pull request
@fershad
Copy link
Collaborator

fershad commented Sep 4, 2024

Hi @alexzurbonsen thanks for this. I've merged in some redesign work we did on the site late last month.

I'll go through the documentation tomorrow, but:

  • Gitpod, no problem not having that.
  • Are the other two installation items you mentioned still blockers for this, or could we go live with it & update later as things evolve?

@fershad
Copy link
Collaborator

fershad commented Sep 5, 2024

Hi @alexzurbonsen. I made a few text changes to the tutorial, and tried to run through it myself. I was getting a warning that I need to update to the latest manifest format, however when I tried this I got some errors around "green-web-host" parameter is required.

Could you please help update the example manifest to the latest version.

Once that's done I'm happy to merge this tutorial.

Signed-off-by: alexzurbonsen <[email protected]>
@alexzurbonsen
Copy link
Contributor Author

Hi @fershad thanks for going over the text! Looks good. Pushed some minor changes.

I think the issue you are getting is because you used the co2js plugin from the if-unofficial-plugins repo.
They haven't come around with another release as far as I can see. Currently, the necessary change that deals with the green-web-host parameter is only available on main.

To make it work you would have to uninstall the globally installed version

# verify it is there
npm -g list
# uninstall
npm uninstall -g @grnsft/if-unofficial-plugins

and then get an installation of current main:

git clone https://github.com/Green-Software-Foundation/if-unofficial-plugins.git

and inside the cloned repo

npm install
npm link

This should fix the issue.

But I am not sure that is the state we want it to be when you publish the tutorial? We could also ask the IF folks if they are planning to do another release soon.

@alexzurbonsen
Copy link
Contributor Author

I am not sure about the version conflicts of the manifest file. I had that as well previously but cannot reproduce it now. What did you do to fix it?

@alexzurbonsen
Copy link
Contributor Author

Hi @fershad and @mrchrisadams ,

I was playing around with the plugins again and realized that the plugin interface changed substantially in the latest version of IF.

  1. I will need to refactor the plugins a lot.
  2. Who is owning the co2js plugin now? The if-unofficial-plugins repo has been deprecated. There is an info text saying that the plugins have been handed over to external owners. (I need a refactored version of that as well, for the pipeline to work. If it didn't happen yet, I guess I will refactor it sooner or later.)

@alexzurbonsen
Copy link
Contributor Author

alexzurbonsen commented Oct 26, 2024

@fershad, @mrchrisadams Good news: I refactored the plugins, including the co2js plugin.

There is a new and little bit improved co2js plugin at https://github.com/TNG/if-webpage-plugins/tree/main/src/lib/co2js
It now supports the latest co2js version and the SWD model v4.

But I believe this does not need to be owned by our org. Would you be open to owning it in a if-co2js-plugin repo in your org?

@fershad
Copy link
Collaborator

fershad commented Oct 28, 2024

Hi @alexzurbonsen, thanks for this. There were some conversations a while back about the ownership of the plugins and stuff. I'm not sure what the resolution to that was, I'll check with @mrchrisadams and we'll get back to you.

I think those updates might also help unblock some of the issues I was having running through the tutorial. I'll set aside some time to try again later on this week.

@fershad
Copy link
Collaborator

fershad commented Oct 31, 2024

@alexzurbonsen I spoke to @mrchrisadams about this, and we'd be able to own the repo. If there's still some things in the readme or code that need tidying up for the new spec, then could you take care of that before transferring ownership to our org?

commit 2edf5cf
Author: fershad <[email protected]>
Date:   Fri Nov 8 12:20:54 2024 +0800

    change deps

commit 53a4b06
Author: fershad <[email protected]>
Date:   Fri Nov 8 12:20:21 2024 +0800

    change deps

commit 9d9f745
Author: fershad <[email protected]>
Date:   Fri Nov 8 12:15:15 2024 +0800

    update build command

commit fa659cb
Author: fershad <[email protected]>
Date:   Fri Nov 8 12:12:27 2024 +0800

    update build command

commit 1c42575
Author: fershad <[email protected]>
Date:   Fri Nov 8 12:03:29 2024 +0800

    update build command

commit d08b569
Author: fershad <[email protected]>
Date:   Fri Nov 8 11:50:09 2024 +0800

    update build command

commit 535b8e0
Merge: 1338114 048fa93
Author: fershad <[email protected]>
Date:   Fri Nov 8 11:30:34 2024 +0800

    Improve CO2.js Roadmap categorisation

commit 048fa93
Author: fershad <[email protected]>
Date:   Fri Nov 8 11:29:56 2024 +0800

    add link to all issues

commit 14cfe89
Author: fershad <[email protected]>
Date:   Mon Nov 4 11:43:59 2024 +0800

    add dev data

commit b041828
Author: fershad <[email protected]>
Date:   Mon Nov 4 11:43:51 2024 +0800

    fix filtering

commit 47b609b
Author: fershad <[email protected]>
Date:   Mon Nov 4 11:39:02 2024 +0800

    add empty state

commit d4ed91b
Author: fershad <[email protected]>
Date:   Mon Nov 4 10:54:31 2024 +0800

    update roadmap page content

commit c0987b4
Author: fershad <[email protected]>
Date:   Mon Nov 4 10:54:22 2024 +0800

    rename data files

commit 1338114
Author: fershad <[email protected]>
Date:   Mon Nov 4 10:34:24 2024 +0800

    remove github link

commit fd874b7
Author: fershad <[email protected]>
Date:   Mon Nov 4 10:33:33 2024 +0800

    change wording for funding required

commit 7b41b72
Merge: 57fe76a 338d506
Author: fershad <[email protected]>
Date:   Tue Oct 29 09:28:11 2024 +0100

    Add a roadmap page for CO2.js

commit 338d506
Author: fershad <[email protected]>
Date:   Tue Oct 29 16:21:46 2024 +0800

    style updates

commit 46bd946
Author: fershad <[email protected]>
Date:   Mon Oct 14 19:40:36 2024 +0800

    style user link

commit 92fab9a
Author: fershad <[email protected]>
Date:   Mon Oct 14 19:38:05 2024 +0800

    make partial, improve styling

commit 4df68b2
Author: fershad <[email protected]>
Date:   Mon Oct 14 19:27:19 2024 +0800

    authenticate requests

commit de2cd4f
Author: fershad <[email protected]>
Date:   Mon Oct 14 18:38:10 2024 +0800

    remove console log

commit 45b1920
Author: fershad <[email protected]>
Date:   Mon Oct 14 18:38:04 2024 +0800

    remove tags causing duplication

commit 842680d
Author: fershad <[email protected]>
Date:   Fri Oct 11 21:48:33 2024 +0800

    put data on the page

commit 491534b
Author: fershad <[email protected]>
Date:   Fri Oct 11 20:56:22 2024 +0800

    better define data files

commit 993253f
Author: fershad <[email protected]>
Date:   Fri Oct 11 18:21:08 2024 +0800

    query github API

commit 57fe76a
Author: fershad <[email protected]>
Date:   Sat Aug 31 23:04:19 2024 +0800

    add links to mailing list and rss feed

commit 342e040
Merge: 95c77b1 bcb8e21
Author: fershad <[email protected]>
Date:   Wed Aug 21 18:27:31 2024 +0800

    Update our dutch address

commit bcb8e21
Author: hanopcan <[email protected]>
Date:   Wed Aug 21 10:28:26 2024 +0100

    Update our dutch address

commit 95c77b1
Merge: 15d1bcb 8bdb1d0
Author: fershad <[email protected]>
Date:   Wed Aug 21 12:34:45 2024 +0800

    Update website design and branding

commit 8bdb1d0
Author: fershad <[email protected]>
Date:   Wed Aug 21 07:18:02 2024 +0800

    update NL address

commit 2ded093
Author: fershad <[email protected]>
Date:   Wed Aug 21 07:12:21 2024 +0800

    update icons

commit ca69911
Author: hanopcan <[email protected]>
Date:   Mon Aug 19 17:54:00 2024 +0100

    Finish off initial rebrand effort

commit e689eb9
Author: fershad <[email protected]>
Date:   Sat Aug 10 22:18:47 2024 +0200

    watch for css changes

commit ed76e3c
Author: hanopcan <[email protected]>
Date:   Mon Jul 29 16:39:16 2024 +0100

    Prelim styling to menus, footer, and home

commit ce8ba3b
Author: hanopcan <[email protected]>
Date:   Mon Jul 29 15:14:49 2024 +0100

    Replace logo and tweak padding and responsiveness
@fershad
Copy link
Collaborator

fershad commented Nov 8, 2024

Hi @alexzurbonsen I'm still struggling to get this working on my end as I walk through the tutorial.

After going through the steps, when I run the if-run command I get an output file generated with a status: success value. However, there are no dependencies listed in the output, and there's not outputs block either. It gives the impression that the script is executing but not performing any steps.

When I go into the @tngtech/if-webpage-plugins repo though and run one of the example manifest files, everything works okay.

Are there some more steps that need to be updated in the instructions for this guide?

@alexzurbonsen
Copy link
Contributor Author

Hi @fershad, I didn't touch the tutorial yet. But I guess something will have to be updated there as well.
I am about to publish the if-webpage-plugins on npm. That would simplify installation instructions a bit. Thus, I am waiting for that.

As for the co2js plugin: that's nice. I have cleaned everything up to the best of my knowledge. Also added a note, that it was tested with IF v0.7.

@alexzurbonsen
Copy link
Contributor Author

@fershad It took some time to get the package through internal processes, also wasn't highest prio. But I am close to publishing now. Before doing that, can we move the co2js plugin to a repo you guys own? Would be nice if we do this before I am publishing it on npm I guess.

- adapt manifest to v1.0.0 of IF
- adapt descriptions accordingly
- adapt to changes in webpage impact plugins
- install webpage plugins from npm

Signed-off-by: Alexander zur Bonsen <[email protected]>
@alexzurbonsen
Copy link
Contributor Author

alexzurbonsen commented Jan 19, 2025

@fershad I reworked the tutorial. IF released a matured version last week. As we already discussed, the manifest changed a lot, which also required changes in the plugins. I already did all that back then. I made the manifest file of the tutorial a bit simpler, which is nice I think. I adapted the instructions accordingly.

Also adapted links.

I am about to publish the plugins on npm (probably within the next week). If that is done, you should be able to follow the tutorial as it is. (Currently, that wouldn't work because the installation instructions already assume installation via npm is working.)

I'll keep you posted.

@fershad
Copy link
Collaborator

fershad commented Jan 20, 2025

@fershad It took some time to get the package through internal processes, also wasn't highest prio. But I am close to publishing now. Before doing that, can we move the co2js plugin to a repo you guys own? Would be nice if we do this before I am publishing it on npm I guess.

Thanks @alexzurbonsen . Sorry for not getting around to this earlier, we've got a few projects happening simultaneously at this time which are taking up a lot of our time.

Since you've reworked the tutorial, and a ready to publish the plugin let's proceed with that. What we can do later this year is fork the plugin & then maintain that fork going forwards. You can then update your repo & published plugin to point to that fork. Does that sound like a sensible approach, given that we'd probably not be able to put too much time into this until later in February?

@alexzurbonsen
Copy link
Contributor Author

@fershad Yes, let's go with the approach that you suggested. I also had something similar in mind, when reworking the tutorial.

@alexzurbonsen
Copy link
Contributor Author

@fershad the package is published. You can now install it with npm install -g @tngtech/if-webpage-plugins - so the tutorial should finally work.

@fershad
Copy link
Collaborator

fershad commented Jan 24, 2025

Thanks @alexzurbonsen . We're busy on another project at this time, but I'll take a look at this PR and the docs update sometime next week.

@fershad fershad changed the title [WIP] add tutorial on how to use CO2.js within IF Add tutorial on how to use CO2.js within IF Feb 5, 2025
@fershad
Copy link
Collaborator

fershad commented Feb 5, 2025

@alexzurbonsen thanks so much for this!

I've read through the content and tried out the code - it works really well. I'm happy to publish this.

I have raised on issue and PR for the CO2.js plugin to rename the output to avoid confusion about what it represents. That's not a blocker for publishing this, but when that's merged & released please tag me so I can update these docs.

@fershad fershad merged commit 8c86033 into thegreenwebfoundation:main Feb 5, 2025
@alexzurbonsen
Copy link
Contributor Author

@fershad Great to see it online. :) Thanks for the work that you put in as well!

And thanks for issue and PR, I am taking a look now.

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.

Add docs for usage of co2js within the impact framework

2 participants