Giter Site home page Giter Site logo

Comments (9)

arthurcro avatar arthurcro commented on August 28, 2024 1

Hey! ๐Ÿ‘‹ As part of the Swift Mentorship Program and with the help of my mentor, I'm hoping to make my first contribution to an open-source project. I would love to give this issue a try! ๐Ÿ™‚

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 28, 2024 1

That's great to hear. Feel free to reach out if you have any questions.

from swift-docc.

arthurcro avatar arthurcro commented on August 28, 2024 1

Thanks for the advice! I just opened a draft PR #391, I look forward to your feedback!

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 28, 2024

@swift-ci create

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 28, 2024

To implement what's described in the Description there are few different places to look at:

The display name and identifier decoded in init(with:bundleDiscoveryOptions: in DocumentationBundle+Info.swift
That's a good place to default to the display name when the identifier is missing. Depending on this the decoding is done, requiredKeys may also need to change.

That code doesn't know what the DocC catalog is named or what the modules are namedโ€”they know the symbols graph URLs but would need to read and decode the files to find the module nameโ€”so the last resort derived display name would need to be passed there or otherwise be made accessible somehow.

There are different code paths for creating documentation "bundles" when there's a DocC catalog and when there isn't.

When there's a DocC catalog the code path that creates the bundle is in createBundle(::options๐Ÿ™‚ in DataProviderBundleDiscovery.swift

When there's no DocC catalog the bundle is created in GeneratedDataProvider. It also has some code to read the module names out of the symbol graph files.

DocumentationBundleInfoTests tests the existing decoding (which would be updated to cover the logic for deriving values) but it could also be good to test the full flow in ConvertActionTests by passing a few different variations of bundle discovery options both with and without a DocC catalog (the documentationBundleURL: argument to ConvertAction

from swift-docc.

Kyle-Ye avatar Kyle-Ye commented on August 28, 2024

Hi @arthurcro, are you still working on this? Let us know we can help!

(This is indeed a annoying issue for the user site, and hope we can solve it ASAP)

from swift-docc.

arthurcro avatar arthurcro commented on August 28, 2024

Hey @Kyle-Ye! My apologies for the delay in closing this issue. I actually have something working on a fork but I got stuck adding a test covering the full flow in ConvertActionTests and I haven't had the opportunity to pick it up again. I'm not quite sure how to get started adding a test there. I'd love some help with this if you have time! ๐Ÿ™‚

from swift-docc.

Kyle-Ye avatar Kyle-Ye commented on August 28, 2024

Hey @Kyle-Ye! My apologies for the delay in closing this issue. I actually have something working on a fork but I got stuck adding a test covering the full flow in ConvertActionTests and I haven't had the opportunity to pick it up again. I'm not quite sure how to get started adding a test there. I'd love some help with this if you have time! ๐Ÿ™‚

Would you mind pointing out which branch you were working? If I guess correctly, should it be https://github.com/arthurcro/swift-docc/tree/arthurcro/improve-deriving-cli-arguments

from swift-docc.

Kyle-Ye avatar Kyle-Ye commented on August 28, 2024

I'd love some help with this if you have time!

Maybe you can start to create a draft PR. So that we can comment on it and give you some feedback

from swift-docc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.