Ticket #2205 enhancement new

Opened 7 years ago

Last modified 2 years ago

Documentation codelistings need updating and tests

Reported by: jerub Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation, finger, doctests
Cc: thijs, exarkun, kehander1, tom@… Branch: branches/simple-app-2205-2
Author: thijs, jerub Launchpad Bug:

Description

The code used in .tac files is too complicated. I'd like to be able to create an application object with a minimum of verbage.

What we have:

application = Application('myapp', uid=1, gid=1)
serviceCollection = IServiceCollection(application)
service1.setServiceParent(serviceCollection)
service2.setServiceParent(serviceCollection)

What I'd like

application = Application('myapp', uid=1, gid=1, servies=[service1, service2])

The tutorials and documentation would have to be updated to include this new form, and probably to continue to acknowledge how to do both ways.

Change History

1

  Changed 7 years ago by glyph

You asked for my feedback, and my feedback is that I think this is a good idea (although definitely high enough priority for me to work on it...)

I think that this might apply to other twisted.application stuff as well, not just Application. Personally, I can never remember how to create a service without going and reading the code, and that's a very bad sign for other folks...

2

  Changed 7 years ago by jerub

  • status changed from new to assigned

Branch is simple-app-2205. Tests and code have been updated, children=[] is the kwarg as per a suggestion on irc.

Still need to update the docs.

3

  Changed 7 years ago by jerub

  • summary changed from Simplification of Application creation to Documentation codelistings need updating and tests

4

  Changed 5 years ago by thijs

  • status changed from assigned to new
  • author set to jerub
  • cc thijs added
  • keywords documentation added
  • branch set to branches/simple-app-2205
  • owner changed from jerub to thijs

I can go through those docs.

5

  Changed 5 years ago by thijs

  • owner thijs deleted
  • keywords documentation, review added; documentation removed

Perhaps someone can review jerub's branch as well, putting it up for review.

6

follow-up: ↓ 8   Changed 5 years ago by exarkun

  • keywords documentation added; documentation, review removed
  • cc exarkun added
  • owner set to thijs

This conflicts horribly with trunk. The conflicts need to be resolved and the branch merged forward.

7

  Changed 5 years ago by thijs

  • branch changed from branches/simple-app-2205 to branches/simple-app-2205-2
  • branch_author changed from jerub to thijs, jerub

(In [25314]) Branching to 'simple-app-2205-2'

8

in reply to: ↑ 6   Changed 5 years ago by thijs

  • keywords documentation, review added; documentation removed
  • owner thijs deleted

Replying to exarkun:

This conflicts horribly with trunk. The conflicts need to be resolved and the branch merged forward.

Done, see r25315

9

  Changed 5 years ago by thijs

Forgot to add the tests, included in r25319

10

  Changed 5 years ago by therve

  • owner set to thijs
  • keywords documentation added; documentation, review removed

Most of the tests are failing with this error:

[ERROR]: twisted.test.test_fingertutorial.Finger21TestCase.testFingerFactory

Traceback (most recent call last):
  File "/home/therve/projects/Twisted/trunk/twisted/test/test_fingertutorial.py", line 264, in setUp
    super(Finger19TestCase, self).setUp()
  File "/home/therve/projects/Twisted/trunk/twisted/test/test_fingertutorial.py", line 36, in setUp
    self.finger = __import__(self.module)
exceptions.ImportError: No module named finger21
-------------------------------------------------------------------------------
Ran 68 tests in 0.496s

FAILED (errors=47, successes=21)

11

  Changed 4 years ago by thijs

  • cc kehander1 added

kehander1 has been working on splitting up the finger example into libraries and the tests here should be made up to date for that.

12

  Changed 2 years ago by binjured

  • cc tom@… added
  • keywords documentation, finger, doctests added; documentation removed

kehander1 has stopped working on that (as far as I can tell) which takes this ticket to limbo with it. There seem to be a number of circular dependencies for the Finger tutorial to make any progress towards "maybe less awful".

13

  Changed 2 years ago by <automation>

  • owner thijs deleted
Note: See TracTickets for help on using tickets.