palantir / palantir/conjure-python

Python constructor argument order is alphabetical

Open
#55 3 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

The generated constructor for a Conjure-defined object currently has its arguments ordered by optional vs. non-optional, followed by alphabetical order. This is defined here.

This seems to be out of sync with generated Java clients for Conjure objects, which have an .of() method whose argument order matches the order in the original Conjure YML definition. Is there a strong reason for this difference between the Java and Python clients?

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

Start with conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonField.java at the referenced ordering logic. Compare that behavior with generated Java clients' .of() argument order and the original Conjure YML definition. Done means the ordering decision is resolved and the relevant generated-client behavior and tests reflect it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
api, tooling
Issue type
Bug
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.