Flent-users discussion archives
 help / color / mirror / Atom feed
* [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175)
@ 2019-08-27 18:34 Pete Heist
  2019-08-28  9:53 ` Toke Høiland-Jørgensen
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pete Heist @ 2019-08-27 18:34 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 1769 bytes --]

I don't know how interested you are in taking this, _but_, this allows sections to inherit from multiple other sections by specifying a comma separated value for inherits, for example:

```
[Batch::global]
abstract = yes
title = ${batch_title}
output_path = batch-${batch_time}-${batch_title}/${batch_name}
batch_title = flent-mi
filename_extra = extra
ip_version = 4
length = 10
hosts = apu2c

[Batch::debug]
abstract = yes
extended_metadata = yes
debug_error = yes
debug_log = yes

[Batch::tcp-upload]
inherits = global, debug
test_name = tcp_1up_noping
disabled = no
```

Batches later in the comma separated list take precedence.

This is a simple example, but I've found that it helps me clean up a batch file where I have several batch sections that share a common configuration, but that can also benefit from importing settings specific to the test being run that is not specific to the configuration. I guess it could help any time settings are needed from more than one inheritance hierarchy.

I haven't explored the various ways that people could shoot themselves in the foot with this, but then again, they don't have to use it, and things should work the same as they do today. :)

Signed-off-by: Pete Heist <pete@heistp.net>
You can view, comment on, or merge this pull request online at:

  https://github.com/tohojo/flent/pull/175

-- Commit Summary --

  * Add multiple inheritance support for batch files.

-- File Changes --

    M flent/batch.py (11)

-- Patch Links --

https://github.com/tohojo/flent/pull/175.patch
https://github.com/tohojo/flent/pull/175.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/175

[-- Attachment #1.2: Type: text/html, Size: 3498 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175)
  2019-08-27 18:34 [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175) Pete Heist
@ 2019-08-28  9:53 ` Toke Høiland-Jørgensen
  2019-08-28 10:19 ` Pete Heist
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-08-28  9:53 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 512 bytes --]

Certainly don't mind taking this, no! Only concern is that the "later is preferred" resolution order is the opposite of multiple inheritance in Python, which may be confusing? On the other hand, it's not really code, and I can see why it makes sense this way as well.

Was there any particular reason you picked that order? :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/175#issuecomment-525671367

[-- Attachment #1.2: Type: text/html, Size: 1892 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175)
  2019-08-27 18:34 [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175) Pete Heist
  2019-08-28  9:53 ` Toke Høiland-Jørgensen
@ 2019-08-28 10:19 ` Pete Heist
  2019-08-29 14:02 ` Toke Høiland-Jørgensen
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pete Heist @ 2019-08-28 10:19 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 613 bytes --]

No other reason for the order except it felt natural to me that what comes later overrides what comes earlier. It's about like which way do you like your mouse wheel to scroll ("finger on the paper" is correct, obviously :).

I'm totally fine with taking out the `reversed` call for priority comes first. Your call what you'd prefer in flent, I'm mainly glad you're willing to take it as it does help me keep things cleaner. :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/175#issuecomment-525680604

[-- Attachment #1.2: Type: text/html, Size: 2004 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175)
  2019-08-27 18:34 [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175) Pete Heist
  2019-08-28  9:53 ` Toke Høiland-Jørgensen
  2019-08-28 10:19 ` Pete Heist
@ 2019-08-29 14:02 ` Toke Høiland-Jørgensen
  2019-08-29 14:04 ` Toke Høiland-Jørgensen
  2019-08-29 14:04 ` Toke Høiland-Jørgensen
  4 siblings, 0 replies; 6+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-08-29 14:02 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 315 bytes --]

Right, so the code already does new['inherits'] = parent, child; this
corresponds to your ordering, so let's just go with that...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/175#issuecomment-526199678

[-- Attachment #1.2: Type: text/html, Size: 1693 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175)
  2019-08-27 18:34 [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175) Pete Heist
                   ` (2 preceding siblings ...)
  2019-08-29 14:02 ` Toke Høiland-Jørgensen
@ 2019-08-29 14:04 ` Toke Høiland-Jørgensen
  2019-08-29 14:04 ` Toke Høiland-Jørgensen
  4 siblings, 0 replies; 6+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-08-29 14:04 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 236 bytes --]

Merged as 835d1d9917f32cb2162710133a0cc2292d308860

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/175#issuecomment-526200503

[-- Attachment #1.2: Type: text/html, Size: 1840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175)
  2019-08-27 18:34 [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175) Pete Heist
                   ` (3 preceding siblings ...)
  2019-08-29 14:04 ` Toke Høiland-Jørgensen
@ 2019-08-29 14:04 ` Toke Høiland-Jørgensen
  4 siblings, 0 replies; 6+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-08-29 14:04 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 192 bytes --]

Closed #175.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/175#event-2594119495

[-- Attachment #1.2: Type: text/html, Size: 1960 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-29 14:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27 18:34 [Flent-users] [tohojo/flent] Add multiple inheritance support for batch files. (#175) Pete Heist
2019-08-28  9:53 ` Toke Høiland-Jørgensen
2019-08-28 10:19 ` Pete Heist
2019-08-29 14:02 ` Toke Høiland-Jørgensen
2019-08-29 14:04 ` Toke Høiland-Jørgensen
2019-08-29 14:04 ` Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox