Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need a saner way to declare the mapping between filesystem paths and Python module/package names #8

Open
mwhudson opened this issue Jan 12, 2015 · 4 comments
Labels
Confirmed This issue has been confirmed by a core pydoctor dev not a priority

Comments

@mwhudson
Copy link
Contributor

As it stands, it's a real pain to get pydoctor to document, e.g., bzr plugins, due to it's strong preconcieved notions about how to go from realpath() to Python package/module name, with the "prependedpackage" thing sorta tacked on...


Imported from Launchpad using lp2gh.

@mwhudson mwhudson added Confirmed This issue has been confirmed by a core pydoctor dev Medium priority labels Jan 12, 2015
@mwhudson
Copy link
Contributor Author

(by mwhudson)
I can see the problem (it will also affect a project that uses buildout).

I'm less clear on a solution though :/

@mwhudson
Copy link
Contributor Author

(by naesten)
I was thinking something like

--(module|package)=[python.module.name:]/path/to/file/or/directory

where, if omitted, the python.module.name would be assumed to be just "directory" in this case. If you passed a filename ending in .py, it would be just the basename of that. (It wouldn't really matter whether what you passed was a module filename or a package directory name.)

I've not got my heart set on this exact syntax, but it seems like it wouldn't be too hard...

The config file bit, I'm not too sure about. I guess a variable that you set to a comma-seperated list of these would be the obvious approach ... I'd try to implement it myself, but the code scares me :-(.

@mwhudson
Copy link
Contributor Author

(by mwhudson)
Samuel Bronson wrote:

I was thinking something like

--(module|package)=[python.module.name:]/path/to/file/or/directory

where, if omitted, the python.module.name would be assumed to be just
"directory" in this case. If you passed a filename ending in .py, it
would be just the basename of that. (It wouldn't really matter whether
what you passed was a module filename or a package directory name.)

Actually, I've come to think that the --module options are silly;
they're arguments really.

pydoctor bzrlib.plugins.svn:~/.bazaar/plugins/svn ~/src/bzr.dev/bzrlib

doesn't seem too bad.

I've not got my heart set on this exact syntax, but it seems like it
wouldn't be too hard...

The config file bit, I'm not too sure about. I guess a variable that you
set to a comma-seperated list of these would be the obvious approach ...
I'd try to implement it myself, but the code scares me :-(.

It scares me a bit these days too :( If you wanted to rip it out and
use configlue or something instead, I'd be very happy with that.

Cheers,
mwh

@mwhudson
Copy link
Contributor Author

(by naesten)
On Tue, Aug 4, 2009 at 9:46 PM, Michael Hudson wrote:

Samuel Bronson wrote:

Actually, I've come to think that the --module options are silly;
they're arguments really.

pydoctor bzrlib.plugins.svn:~/.bazaar/plugins/svn ~/src/bzr.dev/bzrlib

doesn't seem too bad.

Yeah, that's even better.

The config file bit, I'm not too sure about. I guess a variable that you
set to a comma-seperated list of these would be the obvious approach ...
I'd try to implement it myself, but the code scares me :-(.

It scares me a bit these days too :(  If you wanted to rip it out and
use configlue or something instead, I'd be very happy with that.

I'm not familiar with that, and ripping large pieces out of other people's code isn't my cup of tea...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed This issue has been confirmed by a core pydoctor dev not a priority
Projects
None yet
Development

No branches or pull requests

2 participants