palantir / palantir/conjure-python

Add a header for autogenerated classes

Open
#596 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
27
Forks
19
Avg merge
12h 22m
Merged PRs (30d)
15

Description

What happened?

This issue is linked to https://github.com/palantir/conjure-python/issues/595. When I discovered an issue with the palantir-python-sdk library, it was pretty much impossible to know that the bug was originating from conjure-python until the person who owns the project told me so.

Additionally, after a bug is fixed in this library, there's currently no way to know if a class generated by this library may be impacted by that bug.

What did you want to happen?

Projects that generate code usually include annotations or a header, so that it's clear how this code is generated (examples that come to mind are jOOQ / Immutables) Ideally, this should include a version number, so that it's easier to read changelogs and understand any potential impact.

Here's what a simple implementation could look like:

'''
This file has been generated by conjure-python version x.y.z
https://github.com/palantir/conjure-python
'''

import ...

class TestService(Service):

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace how conjure-python emits generated Python classes and where the generator version is available. Define the header format from the issue, including the version and project URL, then verify that generated classes consistently include it and that the result remains valid Python.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.