Opened 11 months ago

Last modified 9 months ago

#29057 assigned defect

Adapt bandwidth file classes to be compatible with stem (descriptors, etc) documents

Reported by: juga Owned by: juga
Priority: Medium Milestone: sbws: unspecified
Component: Core Tor/sbws Version:
Severity: Normal Keywords: no-changes-version, sbws-11x-final-removed-20190312, tech-debt, refactor, generator
Cc: juga Actual Points:
Parent ID: #28684 Points: 1
Reviewer: Sponsor:

Description

so that the code can be moved to stem, as commented in #29056

Child Tickets

Change History (6)

comment:1 Changed 10 months ago by juga

After checking stem's implementation, it could be used in sbws for:

  • parsing existing bandwidth files: this would be useful for tests and creating graphs (made with script outside of sbws package), though there're already methods in sbws implementing this and to use stem's one, sbws will need to implement methods that take as input the dictionaries stem creates.
  • generate the bandwidth file: this is would be more useful, though it's also already implemented in sbws and sbws would need to implement methods to pass to stem the data in the format it needs (dictionaries).

To don't depend on the stem implementation until it's released, i think this might be moved to a later milestone.

What it can still be changed in stem, is the way the headers and bandwidth lines attributes are declared, which specify the type for each attribute (https://gitweb.torproject.org/stem.git/tree/stem/descriptor/bandwidth_file.py#n61).
The header could just be a copy of what is implemented in stem (until released).
However, the bandwidth lines are not converted to their types, just parsed from/to strings, so this would be a new way to declare the bandwidth lines.

comment:2 Changed 9 months ago by juga

Keywords: no-changes-version added

Add keyword to help planify releases/milestones.
Tickets that doesn't imply a change of version are tickets which do not affect the code (docs, tests) and some time of refactors.

comment:3 Changed 9 months ago by juga

Keywords: sbws-11x-final-removed-20190312 added
Milestone: sbws: 1.1.x-finalsbws: unspecified

Remove tickets from 11x-final that can be implemented next month

comment:4 Changed 9 months ago by juga

Keywords: tech-debt refactor added

Add keywords

comment:5 Changed 9 months ago by juga

Points: 1

Set points at least to minimum

comment:6 Changed 9 months ago by juga

Keywords: generator added
Note: See TracTickets for help on using tickets.