Skip to content

Refactor as lib#62

Draft
nitram509 wants to merge 7 commits intomainfrom
refactor-as-lib
Draft

Refactor as lib#62
nitram509 wants to merge 7 commits intomainfrom
refactor-as-lib

Conversation

@nitram509
Copy link
Owner

@nitram509 nitram509 commented May 14, 2024

fix issue #61

  • switch to Go 1.22
  • separate the code to have separe CLI and library distribution in the same codebase
  • introduce example code

TODO

  • fix login copies session key into the session object
  • add examples for all public methods
  • add documentation for all public methods

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2024

Codecov Report

Attention: Patch coverage is 30.03802% with 368 lines in your changes missing coverage. Please review.

Project coverage is 36.77%. Comparing base (a2528f0) to head (6cdffd9).

Files Patch % Lines
pkg/ntgrrc/port_set.go 31.94% 98 Missing ⚠️
pkg/ntgrrc/poe_cycle.go 0.00% 34 Missing ⚠️
pkg/ntgrrc/print.go 62.66% 28 Missing ⚠️
pkg/ntgrrc/poe_set_power.go 40.47% 25 Missing ⚠️
cmd/ntgrrc/login.go 0.00% 24 Missing ⚠️
pkg/ntgrrc/poe_settings.go 55.55% 23 Missing and 1 partial ⚠️
cmd/ntgrrc/poe_set_power.go 0.00% 21 Missing ⚠️
cmd/ntgrrc/port_set.go 0.00% 19 Missing ⚠️
pkg/ntgrrc/login.go 0.00% 13 Missing ⚠️
cmd/ntgrrc/poe_cycle_power.go 0.00% 11 Missing ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
- Coverage   39.27%   36.77%   -2.50%     
==========================================
  Files          18       29      +11     
  Lines        1184     1267      +83     
==========================================
+ Hits          465      466       +1     
- Misses        699      774      +75     
- Partials       20       27       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gherlein
Copy link

is this abandoned or still something you are thinking of landing?

@nitram509
Copy link
Owner Author

is this abandoned or still something you are thinking of landing?

The rework towards lib is paused, since I'm focussed on other topics.
I still think it's a good idea and in case of having some time I would work on it.
Meanwhile there are some conflicts to be resolved.

In case you want to make a PR, I would be very glad and commit myself to quickly do the review and make a new release.

@gherlein
Copy link

gherlein commented Aug 1, 2025

I have a lib extracted and working but I need to review the code carefully and test it. I'm going away this weekend but I'll send a PR early next week. I used Claude Code AI so if that kind of thing bothers you you can just reject it. I'm scratching my own itch because I want a daemon that I can hit with rest calls to manage ports and such. It's a huge PR though... if you want you can see the WIP at https://github.com/gherlein/ntgrrc

@nitram509
Copy link
Owner Author

I have a lib extracted and working but I need to review the code carefully and test it. I'm going away this weekend but I'll send a PR early next week. I used Claude Code AI so if that kind of thing bothers you you can just reject it. I'm scratching my own itch because I want a daemon that I can hit with rest calls to manage ports and such. It's a huge PR though... if you want you can see the WIP at https://github.com/gherlein/ntgrrc

I have no objection with you using AI ... just looking at the result.
From other projects I know, AI agents sometimes leave dead code etc. ... such should be eliminated obviously.

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