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

Add API for SSWG Incubated Projects #853

Merged
merged 7 commits into from
Dec 3, 2024
Merged

Add API for SSWG Incubated Projects #853

merged 7 commits into from
Dec 3, 2024

Conversation

0xTim
Copy link
Member

@0xTim 0xTim commented Nov 21, 2024

Adds 4 new APIs to serve the SSWG incubated packages. These will be at https://swift.org/api/v1/sswg/incubation/{graduated|incubating|sandbox|all}.json and provide the graduated packages, incubating packages, sandbox packages and all the packages.

This PR also:

  • Updates the incubation levels for the packages based on the latest review by the SSWG
  • Reworks the Incubated Packages page to split them into 3 tables for each incubation level
Screenshot 2024-11-21 at 01 08 06

@finestructure do you to check that the JSON returned is OK and if we should change it. I know for the 'official' collection (https://github.com/swift-server/sswg-collection) we have extra fields that we don't use but we should be able to rework that script to generate the package collection from the data on Swift.org so it's all in one central place if we want to keep that or just rely on the SPI package collections.

@shahmishal do you know how much traffic https://swiftserver.group/collection/sswg.json gets? Looking at GH it's less that one person a day but I don't know if it's cached

Example JSON returned.

[
    {
        "name": "SwiftNIO",
        "description": "Event-driven network application framework.",
        "maturity": "Graduated",
        "pitched": "N/A",
        "accepted": "2018-09-07",
        "url": "http://github.com/apple/swift-nio.git"
    },
    {
        "name": "SwiftLog",
        "description": "Logging API",
        "maturity": "Graduated",
        "pitched": "2018-09-10",
        "accepted": "2019-02-07",
        "url": "http://github.com/apple/swift-log.git"
    },
    {
        "name": "SwiftMetrics",
        "description": "Metrics API",
        "maturity": "Graduated",
        "pitched": "2019-01-08",
        "accepted": "2019-04-04",
        "url": "http://github.com/apple/swift-metrics.git"
    },
    {
        "name": "PostgresNIO",
        "description": "PostgreSQL driver",
        "maturity": "Graduated",
        "pitched": "2018-11-18",
        "accepted": "2019-05-16",
        "url": "https://github.com/vapor/postgres-nio.git"
    },
    {
        "name": "AsyncHTTPClient",
        "description": "HTTP Client",
        "maturity": "Graduated",
        "pitched": "2019-04-18",
        "accepted": "2019-06-27",
        "url": "https://github.com/swift-server/async-http-client.git"
    },
    {
        "name": "APNSwift",
        "description": "APNS Client",
        "maturity": "Graduated",
        "pitched": "2019-02-05",
        "accepted": "2019-06-27",
        "url": "https://github.com/swift-server-community/APNSwift.git"
    },
    {
        "name": "SwiftStatsdClient",
        "description": "StatsD driver for the metrics API",
        "maturity": "Graduated",
        "pitched": "2019-06-02",
        "accepted": "2019-08-11",
        "url": "https://github.com/apple/swift-statsd-client.git"
    },
    {
        "name": "gRPC Swift",
        "description": "gRPC client & server framework",
        "maturity": "Graduated",
        "pitched": "2019-09-30",
        "accepted": "2020-02-19",
        "url": "https://github.com/grpc/grpc-swift.git"
    },
    {
        "name": "Swift Crypto",
        "description": "Open-source implementation of a substantial portion of the API of Apple CryptoKit",
        "maturity": "Graduated",
        "pitched": "2020-02-20",
        "accepted": "2020-03-04",
        "url": "https://github.com/apple/swift-crypto.git"
    },
    {
        "name": "Soto for AWS",
        "description": "Third-party SDK for AWS",
        "maturity": "Graduated",
        "pitched": "2020-10-01",
        "accepted": "2020-11-12",
        "url": "https://github.com/soto-project/soto.git"
    },
    {
        "name": "MultipartKit",
        "description": "Multipart parser and serializer with Codable support for Multipart Form Data",
        "maturity": "Graduated",
        "pitched": "2021-03-03",
        "accepted": "2021-11-11",
        "url": "https://github.com/vapor/multipart-kit.git"
    },
    {
        "name": "JWTKit",
        "description": "Native Swift library for signing and verifying JSON Web Tokens",
        "maturity": "Graduated",
        "pitched": "2024-03-12",
        "accepted": "2024-03-26",
        "url": "https://github.com/vapor/jwt-kit.git"
    },
    {
        "name": "Vapor",
        "description": "Vapor is a framework for building server applications, APIs and backends in Swift.",
        "maturity": "Graduated",
        "pitched": "2024-03-23",
        "accepted": "2024-05-01",
        "url": "https://github.com/vapor/vapor.git"
    }
]

@finestructure
Copy link
Contributor

@0xTim We'd need flat URL lists per collection as input. Could they be generated and hosted in addition to these annotated lists?

@finestructure
Copy link
Contributor

finestructure commented Nov 21, 2024

If that's a problem I can look into extending our process to handle richer input than just a flat list.

@0xTim
Copy link
Member Author

0xTim commented Nov 21, 2024

@finestructure no problem, updated JSON response:

[
    "http://github.com/apple/swift-nio.git",
    "http://github.com/apple/swift-log.git",
    "http://github.com/apple/swift-metrics.git",
    "https://github.com/vapor/postgres-nio.git",
    "https://github.com/swift-server/async-http-client.git",
    "https://github.com/swift-server-community/APNSwift.git",
    "https://github.com/apple/swift-statsd-client.git",
    "https://github.com/grpc/grpc-swift.git",
    "https://github.com/apple/swift-crypto.git",
    "https://github.com/soto-project/soto.git",
    "https://github.com/vapor/multipart-kit.git",
    "https://github.com/vapor/jwt-kit.git",
    "https://github.com/vapor/vapor.git"
]

@0xTim
Copy link
Member Author

0xTim commented Nov 21, 2024

@swift-ci test

@0xTim
Copy link
Member Author

0xTim commented Nov 21, 2024

@swift-ci please test

@finestructure
Copy link
Contributor

That's great, thanks Tim!

@shahmishal
Copy link
Member

@shahmishal do you know how much traffic https://swiftserver.group/collection/sswg.json gets? Looking at GH it's less that one person a day but I don't know if it's cached

I don't have access to this DNS, it's controlled by swift on server group I think.

@shahmishal shahmishal merged commit e8349bf into main Dec 3, 2024
2 checks passed
@shahmishal shahmishal deleted the sswg-package-api branch December 3, 2024 19:27
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.

3 participants