Opened 14 years ago
Closed 8 years ago
#8277 closed enhancement (fixed)
Integrate help pages into plugin
Reported by: | Ryan J Ollos | Owned by: | EmeCas |
---|---|---|---|
Priority: | high | Component: | TracHoursPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description (last modified by )
The help pages should be integrated into the plugin and installed with the plugin.
Attachments (0)
Change History (17)
comment:1 Changed 14 years ago by
Priority: | normal → high |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
Status: | assigned → new |
---|
comment:3 Changed 9 years ago by
Owner: | Ryan J Ollos deleted |
---|
comment:4 Changed 8 years ago by
Owner: | set to EmeCas |
---|---|
Status: | new → assigned |
comment:5 follow-up: 7 Changed 8 years ago by
WorkLogPlugin might be a good example of adding help. See WorkLogSetupParticipant.
Regarding help links, I haven't looked at the plugin in a while but suggest confirming that it has standard help links at the bottom of each page, like the following example from the ticket page:
<div id="help" i18n:msg=""> <strong>Note:</strong> See <a href="${href.wiki('TracTickets')}">TracTickets</a> for help on using tickets. </div>
comment:6 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:7 Changed 8 years ago by
Replying to Ryan J Ollos:
May you please have a look at the [16658] (changeset) & [16660] (changeset).
It's incorporating a very simple user manual version, including the upgrading of installation process, as well as link in all compatible html templates as indicated with its unit testing.
Thanks
comment:8 follow-up: 11 Changed 8 years ago by
Be careful with indentation in r16660. It's easy to check and fix before committing:
$ pip install reindent $ reindent -r -n .
comment:9 follow-up: 12 Changed 8 years ago by
wiki:TracDev/DatabaseApi#Trac1.0API has some coding style suggestions when using the database transaction context managers. Here's an example refactoring:
-
trachours/setup.py
ndex: trachours/setup.py
105 105 user_manual_content, '', 0,)) 106 106 107 107 def version(self): 108 with self.env.db_transaction as db: 109 cursor = db.cursor() 110 cursor.execute(""" 111 SELECT value FROM system WHERE name = 'trachours.db_version' 112 """) 113 version = cursor.fetchone() 114 if version: 115 return int(version[0]) 116 return 0 108 for value, in self.env.db_query(""" 109 SELECT value FROM system WHERE name = 'trachours.db_version' 110 """): 111 return value 112 else: 113 return 0 117 114 118 115 def create_db(self): 119 116 ticket_time_table = Table('ticket_time', key='id')[
However, for that specific case, since you are targeting Trac >= 1.2, you can use the new database API methods, one of which is:
version = DatabaseManager(self.env).get_version(name='trachours.db_version')
See example in wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.env.IEnvironmentSetupParticipant.
comment:10 follow-up: 14 Changed 8 years ago by
One more suggestion, a change that I've been meaning to make for some time: it was a questionable choice to name a module setup.py
since that has a conventional meaning in Python. I would rename trachours/setup.py
to something like trachours/db.py
. You'll need to make a change to entry_points
in the "real" (top-level) setup.py
.
I'm unsure if you are aware in bumping version number, but builds are still being tagged with dev
due to configuration in setup.cfg
. No problem if that's what you want.
comment:11 Changed 8 years ago by
Replying to Ryan J Ollos:
Be careful with indentation in r16660. It's easy to check and fix before committing:
$ pip install reindent $ reindent -r -n .
Thanks for this feedback. That's fixed. Curiously the correspondences between the changes by reindent
and Pycharm inspection
are different, I'm wondering if that is because some configuration.
comment:12 follow-up: 13 Changed 8 years ago by
Replying to Ryan J Ollos:
wiki:TracDev/DatabaseApi#Trac1.0API has some coding style suggestions when using the database transaction context managers. Here's an example refactoring:
trachours/setup.py
ndex: trachours/setup.py
105 105 user_manual_content, '', 0,)) 106 106 107 107 def version(self): 108 with self.env.db_transaction as db: 109 cursor = db.cursor() 110 cursor.execute(""" 111 SELECT value FROM system WHERE name = 'trachours.db_version' 112 """) 113 version = cursor.fetchone() 114 if version: 115 return int(version[0]) 116 return 0 108 for value, in self.env.db_query(""" 109 SELECT value FROM system WHERE name = 'trachours.db_version' 110 """): 111 return value 112 else: 113 return 0 117 114 118 115 def create_db(self): 119 116 ticket_time_table = Table('ticket_time', key='id')[ However, for that specific case, since you are targeting Trac >= 1.2, you can use the new database API methods, one of which is:
version = DatabaseManager(self.env).get_version(name='trachours.db_version')
Actually. I want to maintain compatibility at least for Trac >= 1.0
, so I'll follow the previous example of refactoring.
See example in wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.env.IEnvironmentSetupParticipant.
comment:13 Changed 8 years ago by
Replying to EmeCas:
Actually. I want to maintain compatibility at least for
Trac >= 1.0
, so I'll follow the previous example of refactoring.
Another option for using those methods with Trac 1.0, you could copy the file: codereviewerplugin/1.0/coderev/compat.py.
comment:14 follow-up: 15 Changed 8 years ago by
Replying to Ryan J Ollos:
One more suggestion, a change that I've been meaning to make for some time: it was a questionable choice to name a module
setup.py
since that has a conventional meaning in Python. I would renametrachours/setup.py
to something liketrachours/db.py
. You'll need to make a change toentry_points
in the "real" (top-level)setup.py
.
I need to evaluate the change to see if that has any other implication, need to do anything else or maybe this is really trivial, and of course I will fix that. I think I'll create another ticket to be aware of this.
I'm unsure if you are aware in bumping version number, but builds are still being tagged with
dev
due to configuration insetup.cfg
. No problem if that's what you want.
Yes, I'm aware of that, thanks. It's something I wanted to ask about, I would like keep DEV meanwhile until everything is stable and I can complete the basic functionality that is not completed yet. In other words, let's say at least until I can close all the tickets for those I'm the owner currently. what do you think?
comment:15 Changed 8 years ago by
Replying to EmeCas:
Yes, I'm aware of that, thanks. It's something I wanted to ask about, I would like keep DEV meanwhile until everything is stable and I can complete the basic functionality that is not completed yet. In other words, let's say at least until I can close all the tickets for those I'm the owner currently. what do you think?
Sounds good to me. Maybe bump from 0.7.xdev to 0.8.0 when you have a stable version to release.
comment:17 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
A simple manual had been incorporated!
Replying to Ryan J Ollos:
Can you please provide links as example about what you meant exactly, as well as a reference to a plugin that's integrating/installing the help pages in that way.
Thanks