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

Make InterSphinxParser extensible #59

Merged
merged 7 commits into from Jun 3, 2017

Conversation

jnothman
Copy link
Contributor

@jnothman jnothman commented Mar 8, 2017

Partial fix for #57

  • allow INV_TO_TYPE mapping to be overridden via convert_type method
  • allow ParserEntry creation to be overridden with create_entry method

@codecov
Copy link

codecov bot commented Mar 8, 2017

Codecov Report

Merging #59 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #59   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      7           
  Lines         299    310   +11     
  Branches       38     40    +2     
=====================================
+ Hits          299    310   +11
Impacted Files Coverage Δ
src/doc2dash/parsers/intersphinx.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 589fab4...2103ae4. Read the comment docs.

@jnothman
Copy link
Contributor Author

jnothman commented Mar 8, 2017

CI failure is flake8 in setup.py; nothing I touched.

@hynek
Copy link
Owner

hynek commented Mar 10, 2017

Jftr I'm computerless on a vacation right now so I won't be able to look at your tickets/PRs immediately.

* allow INV_TO_TYPE mapping to be overridden via create_type method

* allow ParserEntry creation to be overridden with create_entry method
@hynek
Copy link
Owner

hynek commented Apr 25, 2017

Joel, I feel really bad for not coming back to you but I just have too much on my FOSS plate and doc2dash is a rather low-priority project for me nowadays (it does what I need :)).

Would you be open to discuss ways to get you involved in a maintainer role?

@jnothman
Copy link
Contributor Author

I know what you mean, by my foss load is also to heavy atm and I'm not yet sure I'm that dedicated to dash! I'll think about it...

@hynek
Copy link
Owner

hynek commented Apr 25, 2017

No problem, by no means understand that as any pressuring. I'll try to review/understand your patches this week.

@jnothman
Copy link
Contributor Author

Would it be helpful if I created a InterSphinxWithUserGuide parser as an example of this enhancement to show you how this achieves #57?

@hynek
Copy link
Owner

hynek commented May 23, 2017

Yeah seeing the motivation behind those changes would be def helpful! I’m at the PyCon sprints ATM so I might even find the time to have a closer look. 🙈

@jnothman
Copy link
Contributor Author

Well, given the time pressure, I've just hacked together a standalone script which works with this branch to produce docs with user guides: https://gist.github.com/jnothman/3f164a9f8f766009d29a95ab473ff972

I'm happy to incorporate a similar implementation in the doc2dash Intersphinx docs.

Note that this currently over-generates: pages of API reference are also marked std:guide. I need to work out how to filter them out.

if dash_type is None:
continue
for key, data in iteritems(inv_entries):
yield self.create_entry(dash_type, key, data)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should allow create_entry to return None here.

@codecov-io
Copy link

codecov-io commented Jun 3, 2017

Codecov Report

Merging #59 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #59   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      7           
  Lines         299    310   +11     
  Branches       38     40    +2     
=====================================
+ Hits          299    310   +11
Impacted Files Coverage Δ
src/doc2dash/parsers/intersphinx.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 589fab4...d7123b7. Read the comment docs.

@hynek
Copy link
Owner

hynek commented Jun 3, 2017

OK sorry for all the delays! I’m a terrible maintainer and I feel bad.

Nevertheless, I’ve had finally a closer look. I’m not a fan of subclassing as a method for extension but your problem does look like classic specialization so I guess it’s the less terrible kind of subclassing. :)

@hynek hynek merged commit dd6306e into hynek:master Jun 3, 2017
@jnothman
Copy link
Contributor Author

jnothman commented Jun 3, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants