From fc1e90032bc2bc1a06a2d24fd5b6060d0c122f28 Mon Sep 17 00:00:00 2001 From: forozco Date: Wed, 18 Jul 2018 22:41:29 +0100 Subject: [PATCH 1/5] use new conjure-python-client --- .../palantir/conjure/python/poet/PythonBean.java | 4 ++-- .../palantir/conjure/python/poet/PythonEnum.java | 2 +- .../conjure/python/poet/PythonService.java | 6 +++--- .../python/poet/PythonUnionTypeDefinition.java | 4 ++-- .../conjure/python/util/ImportsVisitor.java | 10 +++++----- .../conjure/python/ConjurePythonGeneratorTest.java | 2 +- .../services/expected/conda_recipe/meta.yaml | 4 ++-- .../expected/package/another/TestService.py | 14 +++++++------- .../package/product/CreateDatasetRequest.py | 4 ++-- .../package/product_datasets/BackingFileSystem.py | 6 +++--- .../expected/package/product_datasets/Dataset.py | 4 ++-- .../src/test/resources/services/expected/setup.py | 2 +- .../types/expected/conda_recipe/meta.yaml | 4 ++-- .../types/expected/package/another/TestService.py | 14 +++++++------- .../DeeplyNestedService.py | 6 +++--- .../package/nested_service/SimpleNestedService.py | 6 +++--- .../package/nested_service/SimpleObject.py | 4 ++-- .../nested_service2/SimpleNestedService2.py | 6 +++--- .../package/product/AliasAsMapKeyExample.py | 6 +++--- .../types/expected/package/product/AnyExample.py | 4 ++-- .../expected/package/product/AnyMapExample.py | 6 +++--- .../expected/package/product/BearerTokenExample.py | 4 ++-- .../expected/package/product/BinaryAliasExample.py | 2 +- .../expected/package/product/BinaryExample.py | 6 +++--- .../expected/package/product/BooleanExample.py | 4 ++-- .../package/product/CreateDatasetRequest.py | 4 ++-- .../expected/package/product/DateTimeExample.py | 4 ++-- .../expected/package/product/DoubleExample.py | 4 ++-- .../expected/package/product/EmptyObjectExample.py | 4 ++-- .../types/expected/package/product/EnumExample.py | 2 +- .../expected/package/product/EnumFieldExample.py | 4 ++-- .../expected/package/product/IntegerExample.py | 4 ++-- .../types/expected/package/product/ListExample.py | 6 +++--- .../expected/package/product/ManyFieldExample.py | 10 +++++----- .../expected/package/product/MapAliasExample.py | 2 +- .../types/expected/package/product/MapExample.py | 6 +++--- .../expected/package/product/OptionalExample.py | 6 +++--- .../package/product/PrimitiveOptionalsExample.py | 6 +++--- .../expected/package/product/ReservedKeyExample.py | 4 ++-- .../types/expected/package/product/RidExample.py | 4 ++-- .../expected/package/product/SafeLongExample.py | 4 ++-- .../types/expected/package/product/SetExample.py | 6 +++--- .../expected/package/product/StringExample.py | 4 ++-- .../expected/package/product/UnionTypeExample.py | 6 +++--- .../types/expected/package/product/UuidExample.py | 4 ++-- .../package/product_datasets/BackingFileSystem.py | 6 +++--- .../expected/package/product_datasets/Dataset.py | 4 ++-- .../with_imports/ComplexObjectWithImports.py | 4 ++-- .../expected/package/with_imports/ImportService.py | 6 +++--- .../package/with_imports/ImportedAliasInMaps.py | 6 +++--- .../package/with_imports/UnionWithImports.py | 4 ++-- .../src/test/resources/types/expected/setup.py | 2 +- conjure-python-verifier/python/setup.py | 2 +- .../python/test/client/conftest.py | 2 +- conjure-python/build.gradle | 2 +- .../conjure/python/cli/ConjurePythonCliTest.java | 2 +- .../src/test/resources/buildConfiguration.yml | 1 - versions.props | 2 +- 58 files changed, 135 insertions(+), 136 deletions(-) delete mode 100644 conjure-python/src/test/resources/buildConfiguration.yml diff --git a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonBean.java b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonBean.java index 869e529a0..50e7a45e2 100644 --- a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonBean.java +++ b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonBean.java @@ -29,8 +29,8 @@ public interface PythonBean extends PythonClass { ImmutableSet DEFAULT_IMPORTS = ImmutableSet.of( - PythonImport.of(PythonClassName.of("conjure", "ConjureBeanType")), - PythonImport.of(PythonClassName.of("conjure", "ConjureFieldDefinition"))); + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureBeanType")), + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureFieldDefinition"))); @Override @Value.Default diff --git a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonEnum.java b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonEnum.java index 951c964cb..209d8688e 100644 --- a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonEnum.java +++ b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonEnum.java @@ -28,7 +28,7 @@ public interface PythonEnum extends PythonClass { ImmutableSet DEFAULT_IMPORTS = ImmutableSet.of( - PythonImport.of(PythonClassName.of("conjure", "ConjureEnumType"))); + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureEnumType"))); @Override @Value.Default diff --git a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonService.java b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonService.java index dd3d029bd..dac8fc778 100644 --- a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonService.java +++ b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonService.java @@ -25,9 +25,9 @@ public interface PythonService extends PythonClass { ImmutableSet DEFAULT_IMPORTS = ImmutableSet.of( - PythonImport.of(PythonClassName.of("conjure", "ConjureEncoder")), - PythonImport.of(PythonClassName.of("conjure", "ConjureDecoder")), - PythonImport.of(PythonClassName.of("httpremoting", "Service"))); + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureEncoder")), + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureDecoder")), + PythonImport.of(PythonClassName.of("conjure_python_client", "Service"))); @Override @Value.Default diff --git a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonUnionTypeDefinition.java b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonUnionTypeDefinition.java index 33303d174..1f58531da 100644 --- a/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonUnionTypeDefinition.java +++ b/conjure-python-core/src/main/java/com/palantir/conjure/python/poet/PythonUnionTypeDefinition.java @@ -28,8 +28,8 @@ public interface PythonUnionTypeDefinition extends PythonClass { ImmutableSet DEFAULT_IMPORTS = ImmutableSet.of( - PythonImport.of(PythonClassName.of("conjure", "ConjureUnionType")), - PythonImport.of(PythonClassName.of("conjure", "ConjureFieldDefinition"))); + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureUnionType")), + PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureFieldDefinition"))); @Override @Value.Default diff --git a/conjure-python-core/src/main/java/com/palantir/conjure/python/util/ImportsVisitor.java b/conjure-python-core/src/main/java/com/palantir/conjure/python/util/ImportsVisitor.java index 371756983..2989df3d1 100644 --- a/conjure-python-core/src/main/java/com/palantir/conjure/python/util/ImportsVisitor.java +++ b/conjure-python-core/src/main/java/com/palantir/conjure/python/util/ImportsVisitor.java @@ -41,7 +41,7 @@ public Set visitPrimitive(PrimitiveType value) { if (value.equals(PrimitiveType.ANY)) { return ImmutableSet.of(PythonImport.of(PythonClassName.of("typing", "Any"))); } else if (value.equals(PrimitiveType.BINARY)) { - return ImmutableSet.of(PythonImport.of(PythonClassName.of("conjure", "BinaryType"))); + return ImmutableSet.of(PythonImport.of(PythonClassName.of("conjure_python_client", "BinaryType"))); } return Collections.emptySet(); } @@ -51,7 +51,7 @@ public Set visitOptional(OptionalType value) { ImmutableSet.Builder setBuilder = ImmutableSet.builder(); return setBuilder .add(PythonImport.of(PythonClassName.of("typing", "Optional"))) - .add(PythonImport.of(PythonClassName.of("conjure", "OptionalType"))) + .add(PythonImport.of(PythonClassName.of("conjure_python_client", "OptionalType"))) .addAll(value.getItemType().accept(this)) .build(); } @@ -61,7 +61,7 @@ public Set visitList(ListType value) { ImmutableSet.Builder setBuilder = ImmutableSet.builder(); return setBuilder .add(PythonImport.of(PythonClassName.of("typing", "List"))) - .add(PythonImport.of(PythonClassName.of("conjure", "ListType"))) + .add(PythonImport.of(PythonClassName.of("conjure_python_client", "ListType"))) .addAll(value.getItemType().accept(this)) .build(); } @@ -71,7 +71,7 @@ public Set visitSet(SetType value) { ImmutableSet.Builder setBuilder = ImmutableSet.builder(); return setBuilder .add(PythonImport.of(PythonClassName.of("typing", "Set"))) - .add(PythonImport.of(PythonClassName.of("conjure", "ListType"))) + .add(PythonImport.of(PythonClassName.of("conjure_python_client", "ListType"))) .addAll(value.getItemType().accept(this)) .build(); } @@ -81,7 +81,7 @@ public Set visitMap(MapType value) { ImmutableSet.Builder setBuilder = ImmutableSet.builder(); return setBuilder .add(PythonImport.of(PythonClassName.of("typing", "Dict"))) - .add(PythonImport.of(PythonClassName.of("conjure", "DictType"))) + .add(PythonImport.of(PythonClassName.of("conjure_python_client", "DictType"))) .addAll(value.getKeyType().accept(this)) .addAll(value.getValueType().accept(this)) .build(); diff --git a/conjure-python-core/src/test/java/com/palantir/conjure/python/ConjurePythonGeneratorTest.java b/conjure-python-core/src/test/java/com/palantir/conjure/python/ConjurePythonGeneratorTest.java index 8b5f6ba39..cd847ebd0 100644 --- a/conjure-python-core/src/test/java/com/palantir/conjure/python/ConjurePythonGeneratorTest.java +++ b/conjure-python-core/src/test/java/com/palantir/conjure/python/ConjurePythonGeneratorTest.java @@ -43,7 +43,7 @@ public final class ConjurePythonGeneratorTest { .packageName("package") .packageVersion("0.0.0") .packageDescription("project description") - .minConjureClientVersion("0.0.0") + .minConjureClientVersion("1.0.0") .shouldWriteCondaRecipe(true) .build()); private final InMemoryPythonFileWriter pythonFileWriter = new InMemoryPythonFileWriter(); diff --git a/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml b/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml index 371519a3a..2d849a44e 100644 --- a/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml +++ b/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml @@ -16,10 +16,10 @@ requirements: - setuptools - requests - typing - - conjure-client >=0.0.0,<1 + - conjure-client >=1.0.0,<2 run: - python - requests - typing - - conjure-client >=0.0.0,<1 + - conjure-client >=1.0.0,<2 diff --git a/conjure-python-core/src/test/resources/services/expected/package/another/TestService.py b/conjure-python-core/src/test/resources/services/expected/package/another/TestService.py index f97343c90..9ae77a28a 100644 --- a/conjure-python-core/src/test/resources/services/expected/package/another/TestService.py +++ b/conjure-python-core/src/test/resources/services/expected/package/another/TestService.py @@ -1,13 +1,13 @@ from ..product.CreateDatasetRequest import CreateDatasetRequest from ..product_datasets.BackingFileSystem import BackingFileSystem from ..product_datasets.Dataset import Dataset -from conjure import BinaryType -from conjure import ConjureDecoder -from conjure import ConjureEncoder -from conjure import DictType -from conjure import ListType -from conjure import OptionalType -from httpremoting import Service +from conjure_python_client import BinaryType +from conjure_python_client import ConjureDecoder +from conjure_python_client import ConjureEncoder +from conjure_python_client import DictType +from conjure_python_client import ListType +from conjure_python_client import OptionalType +from conjure_python_client import Service from typing import Dict from typing import Optional from typing import Set diff --git a/conjure-python-core/src/test/resources/services/expected/package/product/CreateDatasetRequest.py b/conjure-python-core/src/test/resources/services/expected/package/product/CreateDatasetRequest.py index 73bfc003c..2287738ae 100644 --- a/conjure-python-core/src/test/resources/services/expected/package/product/CreateDatasetRequest.py +++ b/conjure-python-core/src/test/resources/services/expected/package/product/CreateDatasetRequest.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class CreateDatasetRequest(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/services/expected/package/product_datasets/BackingFileSystem.py b/conjure-python-core/src/test/resources/services/expected/package/product_datasets/BackingFileSystem.py index 75672c836..5284e7f0a 100644 --- a/conjure-python-core/src/test/resources/services/expected/package/product_datasets/BackingFileSystem.py +++ b/conjure-python-core/src/test/resources/services/expected/package/product_datasets/BackingFileSystem.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType from typing import Dict class BackingFileSystem(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/services/expected/package/product_datasets/Dataset.py b/conjure-python-core/src/test/resources/services/expected/package/product_datasets/Dataset.py index 1b31d4837..37b5cbc04 100644 --- a/conjure-python-core/src/test/resources/services/expected/package/product_datasets/Dataset.py +++ b/conjure-python-core/src/test/resources/services/expected/package/product_datasets/Dataset.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class Dataset(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/services/expected/setup.py b/conjure-python-core/src/test/resources/services/expected/setup.py index 77c44de29..6b6845c4a 100644 --- a/conjure-python-core/src/test/resources/services/expected/setup.py +++ b/conjure-python-core/src/test/resources/services/expected/setup.py @@ -9,6 +9,6 @@ install_requires=[ 'requests', 'typing', - 'conjure-client>=0.0.0,<1', + 'conjure-client>=1.0.0,<2', ], ) diff --git a/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml b/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml index 371519a3a..2d849a44e 100644 --- a/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml +++ b/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml @@ -16,10 +16,10 @@ requirements: - setuptools - requests - typing - - conjure-client >=0.0.0,<1 + - conjure-client >=1.0.0,<2 run: - python - requests - typing - - conjure-client >=0.0.0,<1 + - conjure-client >=1.0.0,<2 diff --git a/conjure-python-core/src/test/resources/types/expected/package/another/TestService.py b/conjure-python-core/src/test/resources/types/expected/package/another/TestService.py index f97343c90..9ae77a28a 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/another/TestService.py +++ b/conjure-python-core/src/test/resources/types/expected/package/another/TestService.py @@ -1,13 +1,13 @@ from ..product.CreateDatasetRequest import CreateDatasetRequest from ..product_datasets.BackingFileSystem import BackingFileSystem from ..product_datasets.Dataset import Dataset -from conjure import BinaryType -from conjure import ConjureDecoder -from conjure import ConjureEncoder -from conjure import DictType -from conjure import ListType -from conjure import OptionalType -from httpremoting import Service +from conjure_python_client import BinaryType +from conjure_python_client import ConjureDecoder +from conjure_python_client import ConjureEncoder +from conjure_python_client import DictType +from conjure_python_client import ListType +from conjure_python_client import OptionalType +from conjure_python_client import Service from typing import Dict from typing import Optional from typing import Set diff --git a/conjure-python-core/src/test/resources/types/expected/package/nested_deeply_nested_service/DeeplyNestedService.py b/conjure-python-core/src/test/resources/types/expected/package/nested_deeply_nested_service/DeeplyNestedService.py index b2934e752..03e2a7126 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/nested_deeply_nested_service/DeeplyNestedService.py +++ b/conjure-python-core/src/test/resources/types/expected/package/nested_deeply_nested_service/DeeplyNestedService.py @@ -1,6 +1,6 @@ -from conjure import ConjureDecoder -from conjure import ConjureEncoder -from httpremoting import Service +from conjure_python_client import ConjureDecoder +from conjure_python_client import ConjureEncoder +from conjure_python_client import Service class DeeplyNestedService(Service): diff --git a/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleNestedService.py b/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleNestedService.py index a09c675a1..26b7b8a9c 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleNestedService.py +++ b/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleNestedService.py @@ -1,6 +1,6 @@ -from conjure import ConjureDecoder -from conjure import ConjureEncoder -from httpremoting import Service +from conjure_python_client import ConjureDecoder +from conjure_python_client import ConjureEncoder +from conjure_python_client import Service class SimpleNestedService(Service): diff --git a/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleObject.py b/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleObject.py index cff287b3c..a27cea9d1 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleObject.py +++ b/conjure-python-core/src/test/resources/types/expected/package/nested_service/SimpleObject.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class SimpleObject(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/nested_service2/SimpleNestedService2.py b/conjure-python-core/src/test/resources/types/expected/package/nested_service2/SimpleNestedService2.py index 822e94da6..541ca763e 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/nested_service2/SimpleNestedService2.py +++ b/conjure-python-core/src/test/resources/types/expected/package/nested_service2/SimpleNestedService2.py @@ -1,6 +1,6 @@ -from conjure import ConjureDecoder -from conjure import ConjureEncoder -from httpremoting import Service +from conjure_python_client import ConjureDecoder +from conjure_python_client import ConjureEncoder +from conjure_python_client import Service class SimpleNestedService2(Service): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/AliasAsMapKeyExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/AliasAsMapKeyExample.py index 763e9c2fb..f6f9f9e64 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/AliasAsMapKeyExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/AliasAsMapKeyExample.py @@ -6,9 +6,9 @@ from .SafeLongAliasExample import SafeLongAliasExample from .StringAliasExample import StringAliasExample from .UuidAliasExample import UuidAliasExample -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType from typing import Dict class AliasAsMapKeyExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/AnyExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/AnyExample.py index b23fb1074..0cd2e53b6 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/AnyExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/AnyExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition from typing import Any class AnyExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/AnyMapExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/AnyMapExample.py index a8f5f1edf..2163eed3f 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/AnyMapExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/AnyMapExample.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType from typing import Any from typing import Dict diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/BearerTokenExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/BearerTokenExample.py index 420c50f2f..9ab31cec2 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/BearerTokenExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/BearerTokenExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class BearerTokenExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/BinaryAliasExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/BinaryAliasExample.py index 0a3228dc5..e57dcc69f 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/BinaryAliasExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/BinaryAliasExample.py @@ -1,4 +1,4 @@ -from conjure import BinaryType +from conjure_python_client import BinaryType BinaryAliasExample = BinaryType() diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/BinaryExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/BinaryExample.py index 40d541ecf..e73aa7515 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/BinaryExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/BinaryExample.py @@ -1,6 +1,6 @@ -from conjure import BinaryType -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import BinaryType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class BinaryExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/BooleanExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/BooleanExample.py index a5dd85f5d..dc4b9fa38 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/BooleanExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/BooleanExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class BooleanExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/CreateDatasetRequest.py b/conjure-python-core/src/test/resources/types/expected/package/product/CreateDatasetRequest.py index 73bfc003c..2287738ae 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/CreateDatasetRequest.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/CreateDatasetRequest.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class CreateDatasetRequest(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/DateTimeExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/DateTimeExample.py index d992fabaa..222e4a442 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/DateTimeExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/DateTimeExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class DateTimeExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/DoubleExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/DoubleExample.py index 98950ad1c..c62912ead 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/DoubleExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/DoubleExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class DoubleExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/EmptyObjectExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/EmptyObjectExample.py index 01eada21b..1f7cee8fa 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/EmptyObjectExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/EmptyObjectExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class EmptyObjectExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/EnumExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/EnumExample.py index 049a352db..968983ee7 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/EnumExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/EnumExample.py @@ -1,4 +1,4 @@ -from conjure import ConjureEnumType +from conjure_python_client import ConjureEnumType class EnumExample(ConjureEnumType): """This enumerates the numbers 1:2.""" diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/EnumFieldExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/EnumFieldExample.py index fb8fac3c5..e0125f726 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/EnumFieldExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/EnumFieldExample.py @@ -1,6 +1,6 @@ from .EnumExample import EnumExample -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class EnumFieldExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/IntegerExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/IntegerExample.py index 31cc33e38..9814ba03d 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/IntegerExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/IntegerExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class IntegerExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/ListExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/ListExample.py index f1ad87c67..2c7e779cb 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/ListExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/ListExample.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import ListType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import ListType from typing import List class ListExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/ManyFieldExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/ManyFieldExample.py index 762b58448..51117562a 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/ManyFieldExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/ManyFieldExample.py @@ -1,9 +1,9 @@ from .StringAliasExample import StringAliasExample -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType -from conjure import ListType -from conjure import OptionalType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType +from conjure_python_client import ListType +from conjure_python_client import OptionalType from typing import Dict from typing import List from typing import Optional diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/MapAliasExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/MapAliasExample.py index dcf373a95..ea0fff42f 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/MapAliasExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/MapAliasExample.py @@ -1,4 +1,4 @@ -from conjure import DictType +from conjure_python_client import DictType from typing import Any from typing import Dict diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/MapExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/MapExample.py index e9cbd6e83..cc46d0384 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/MapExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/MapExample.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType from typing import Dict class MapExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/OptionalExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/OptionalExample.py index 4a2d7b819..b9ebb5df6 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/OptionalExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/OptionalExample.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import OptionalType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import OptionalType from typing import Optional class OptionalExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/PrimitiveOptionalsExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/PrimitiveOptionalsExample.py index c9e611a89..eaa2ad0ac 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/PrimitiveOptionalsExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/PrimitiveOptionalsExample.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import OptionalType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import OptionalType from typing import Optional class PrimitiveOptionalsExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/ReservedKeyExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/ReservedKeyExample.py index b8c679b83..9b19e0466 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/ReservedKeyExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/ReservedKeyExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class ReservedKeyExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/RidExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/RidExample.py index ac2613c88..36e83581b 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/RidExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/RidExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class RidExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/SafeLongExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/SafeLongExample.py index b13400309..3afb1c04e 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/SafeLongExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/SafeLongExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class SafeLongExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/SetExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/SetExample.py index f402d1afd..fd749ef89 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/SetExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/SetExample.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import ListType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import ListType from typing import Set class SetExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/StringExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/StringExample.py index fe7c4428b..555390b5f 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/StringExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/StringExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class StringExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/UnionTypeExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/UnionTypeExample.py index a30d82980..629218a56 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/UnionTypeExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/UnionTypeExample.py @@ -1,7 +1,7 @@ from .StringExample import StringExample -from conjure import ConjureFieldDefinition -from conjure import ConjureUnionType -from conjure import ListType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import ConjureUnionType +from conjure_python_client import ListType from typing import Set class UnionTypeExample(ConjureUnionType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product/UuidExample.py b/conjure-python-core/src/test/resources/types/expected/package/product/UuidExample.py index 08b4c2e47..a4a014be7 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product/UuidExample.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product/UuidExample.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class UuidExample(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product_datasets/BackingFileSystem.py b/conjure-python-core/src/test/resources/types/expected/package/product_datasets/BackingFileSystem.py index 75672c836..5284e7f0a 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product_datasets/BackingFileSystem.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product_datasets/BackingFileSystem.py @@ -1,6 +1,6 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType from typing import Dict class BackingFileSystem(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/product_datasets/Dataset.py b/conjure-python-core/src/test/resources/types/expected/package/product_datasets/Dataset.py index 1b31d4837..37b5cbc04 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/product_datasets/Dataset.py +++ b/conjure-python-core/src/test/resources/types/expected/package/product_datasets/Dataset.py @@ -1,5 +1,5 @@ -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class Dataset(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/with_imports/ComplexObjectWithImports.py b/conjure-python-core/src/test/resources/types/expected/package/with_imports/ComplexObjectWithImports.py index 800cb03a1..7733a0b51 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/with_imports/ComplexObjectWithImports.py +++ b/conjure-python-core/src/test/resources/types/expected/package/with_imports/ComplexObjectWithImports.py @@ -1,6 +1,6 @@ from ..product.StringExample import StringExample -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition class ComplexObjectWithImports(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportService.py b/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportService.py index ad9be40e0..f967255fc 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportService.py +++ b/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportService.py @@ -1,8 +1,8 @@ from ..product.StringExample import StringExample from ..product_datasets.BackingFileSystem import BackingFileSystem -from conjure import ConjureDecoder -from conjure import ConjureEncoder -from httpremoting import Service +from conjure_python_client import ConjureDecoder +from conjure_python_client import ConjureEncoder +from conjure_python_client import Service class ImportService(Service): diff --git a/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportedAliasInMaps.py b/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportedAliasInMaps.py index c1b2159cf..75885c717 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportedAliasInMaps.py +++ b/conjure-python-core/src/test/resources/types/expected/package/with_imports/ImportedAliasInMaps.py @@ -1,8 +1,8 @@ from ..product.DateTimeAliasExample import DateTimeAliasExample from ..product.RidAliasExample import RidAliasExample -from conjure import ConjureBeanType -from conjure import ConjureFieldDefinition -from conjure import DictType +from conjure_python_client import ConjureBeanType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import DictType from typing import Dict class ImportedAliasInMaps(ConjureBeanType): diff --git a/conjure-python-core/src/test/resources/types/expected/package/with_imports/UnionWithImports.py b/conjure-python-core/src/test/resources/types/expected/package/with_imports/UnionWithImports.py index cc254da60..4e43f8999 100644 --- a/conjure-python-core/src/test/resources/types/expected/package/with_imports/UnionWithImports.py +++ b/conjure-python-core/src/test/resources/types/expected/package/with_imports/UnionWithImports.py @@ -1,6 +1,6 @@ from ..product.AnyMapExample import AnyMapExample -from conjure import ConjureFieldDefinition -from conjure import ConjureUnionType +from conjure_python_client import ConjureFieldDefinition +from conjure_python_client import ConjureUnionType class UnionWithImports(ConjureUnionType): diff --git a/conjure-python-core/src/test/resources/types/expected/setup.py b/conjure-python-core/src/test/resources/types/expected/setup.py index 77c44de29..6b6845c4a 100644 --- a/conjure-python-core/src/test/resources/types/expected/setup.py +++ b/conjure-python-core/src/test/resources/types/expected/setup.py @@ -9,6 +9,6 @@ install_requires=[ 'requests', 'typing', - 'conjure-client>=0.0.0,<1', + 'conjure-client>=1.0.0,<2', ], ) diff --git a/conjure-python-verifier/python/setup.py b/conjure-python-verifier/python/setup.py index f1faf3a1e..33f2c5e8e 100644 --- a/conjure-python-verifier/python/setup.py +++ b/conjure-python-verifier/python/setup.py @@ -30,6 +30,6 @@ # your project is installed. For an analysis of "install_requires" vs pip's # requirements files see: # https://packaging.python.org/en/latest/requirements.html - install_requires=["conjure-client", "pyyaml"], + install_requires=["conjure-python-client", "pyyaml"], tests_require=["pytest", "pyyaml"], ) diff --git a/conjure-python-verifier/python/test/client/conftest.py b/conjure-python-verifier/python/test/client/conftest.py index 560126a98..03981276a 100644 --- a/conjure-python-verifier/python/test/client/conftest.py +++ b/conjure-python-verifier/python/test/client/conftest.py @@ -1,7 +1,7 @@ import pytest import subprocess import yaml -from httpremoting import RequestsClient, ServiceConfiguration +from conjure_python_client import RequestsClient, ServiceConfiguration from os import path from ..generated.conjure_verification import ( diff --git a/conjure-python/build.gradle b/conjure-python/build.gradle index 1db3f5f60..14af2a0a9 100644 --- a/conjure-python/build.gradle +++ b/conjure-python/build.gradle @@ -30,7 +30,7 @@ dependencies { task generateBuildConfiguration() { doLast { - def minConjureClientVersion = dependencyRecommendations.getRecommendedVersion('com.palantir.conjure.python', 'conjure-client') + def minConjureClientVersion = dependencyRecommendations.getRecommendedVersion('com.palantir.conjure.python', 'conjure-python-client') def props = new File("$projectDir/src/main/resources/buildConfiguration.yml") props.getParentFile().mkdirs() props.text = "minConjureClientVersion: $minConjureClientVersion" diff --git a/conjure-python/src/test/java/com/palantir/conjure/python/cli/ConjurePythonCliTest.java b/conjure-python/src/test/java/com/palantir/conjure/python/cli/ConjurePythonCliTest.java index 93c293020..76796ea13 100644 --- a/conjure-python/src/test/java/com/palantir/conjure/python/cli/ConjurePythonCliTest.java +++ b/conjure-python/src/test/java/com/palantir/conjure/python/cli/ConjurePythonCliTest.java @@ -153,6 +153,6 @@ public void makesPackageVersionPythonic() { @Test public void loadBuildConfiguration() { - assertThat(BuildConfiguration.load().minConjureClientVersion()).isEqualTo("0.0.0"); + assertThat(BuildConfiguration.load().minConjureClientVersion()).isEqualTo("1.0.0"); } } diff --git a/conjure-python/src/test/resources/buildConfiguration.yml b/conjure-python/src/test/resources/buildConfiguration.yml deleted file mode 100644 index 706a7d516..000000000 --- a/conjure-python/src/test/resources/buildConfiguration.yml +++ /dev/null @@ -1 +0,0 @@ -minConjureClientVersion: 0.0.0 \ No newline at end of file diff --git a/versions.props b/versions.props index 76f64faf8..a383cc3ed 100644 --- a/versions.props +++ b/versions.props @@ -5,7 +5,7 @@ com.google.guava:guava = 22.0 com.palantir.baseline:* = 0.19.0 com.palantir.conda.installer:conda-installer = 3.0.0 com.palantir.conda.wrapper:* = 1.6.2 -com.palantir.conjure.python:conjure-client = 0.2.0 +com.palantir.conjure.python:conjure-python-client = 1.0.0 com.palantir.conjure.verification:* = 0.3.1 com.palantir.conjure:* = 4.0.0 commons-cli:commons-cli = 1.4 From 63b2cdfa65c6accd10e1ae83e5ea9ef6db950f20 Mon Sep 17 00:00:00 2001 From: forozco Date: Wed, 18 Jul 2018 22:44:40 +0100 Subject: [PATCH 2/5] cleanup python --- conjure-python-verifier/python/Pipfile | 2 +- conjure-python-verifier/python/Pipfile.lock | 68 +++++++++++++++------ conjure-python-verifier/python/setup.py | 2 +- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/conjure-python-verifier/python/Pipfile b/conjure-python-verifier/python/Pipfile index 4e987222e..47b248918 100644 --- a/conjure-python-verifier/python/Pipfile +++ b/conjure-python-verifier/python/Pipfile @@ -5,7 +5,7 @@ name = "pypi" [packages] # TODO(forozco): inject version of conjure-client -conjure-client = "==0.2.0" +conjure-python-client = "==1.0.0" [dev-packages] setuptools = "*" diff --git a/conjure-python-verifier/python/Pipfile.lock b/conjure-python-verifier/python/Pipfile.lock index 58b7e396c..d5f443e3e 100644 --- a/conjure-python-verifier/python/Pipfile.lock +++ b/conjure-python-verifier/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "70444e38d2577f9cce85591d6ee384894b0fda8604206c4990a63facf1b76aee" + "sha256": "8a01243e4bbdad0c5187c94385ff537855d9cbb81755d2586d8e81897d10aeba" }, "pipfile-spec": 6, "requires": {}, @@ -28,13 +28,13 @@ ], "version": "==3.0.4" }, - "conjure-client": { + "conjure-python-client": { "hashes": [ - "sha256:3e5ef49635e574e48428e38c1914ae18e618a7ab450fd4957c88309f708594f6", - "sha256:ceae333fb4d4b9aad62c7af9e472e3a13317969577ba32bded2277907fe10087" + "sha256:6bb5871ec024c9b6e94008fb4974fa9f1105ceedd4e6521061535f36318301b5", + "sha256:9ef221214491bbbf65699cb8c067a19d80ec6bbd32e5f693a1bf14d667d1b48c" ], "index": "pypi", - "version": "==0.2.0" + "version": "==1.0.0" }, "enum34": { "hashes": [ @@ -72,17 +72,16 @@ "sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf", "sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5" ], - "markers": "python_version != '3.3.*' and python_version != '3.2.*' and python_version != '3.1.*' and python_version >= '2.6' and python_version < '4' and python_version != '3.0.*'", "version": "==1.23" } }, "develop": { "astroid": { "hashes": [ - "sha256:0ef2bf9f07c3150929b25e8e61b5198c27b0dca195e156f0e4d5bdd89185ca1a", - "sha256:fc9b582dba0366e63540982c3944a9230cbc6f303641c51483fa547dcc22393a" + "sha256:8704779744963d56a2625ec2949eb150bd499fc099510161ddbb2b64e2d98138", + "sha256:add3fd690e7c1fe92436d17be461feeaa173e6f33e0789734310334da0f30027" ], - "version": "==1.6.5" + "version": "==2.0" }, "attrs": { "hashes": [ @@ -112,7 +111,6 @@ "sha256:b9c40e9750f3d77e6e4d441d8b0266cf555e7cdabdcff33c4fd06366ca761ef8", "sha256:ec9ef8f4a9bc6f71eec99e1806bfa2de401650d996c59330782b89a5555c1497" ], - "markers": "python_version != '3.2.*' and python_version >= '2.7' and python_version != '3.0.*' and python_version != '3.3.*' and python_version != '3.1.*'", "version": "==4.3.4" }, "lazy-object-proxy": { @@ -184,7 +182,6 @@ "sha256:d345c8fe681115900d6da8d048ba67c25df42973bda370783cd58826442dcd7c", "sha256:e160a7fcf25762bb60efc7e171d4497ff1d8d2d75a3d0df7a21b76821ecbf5c5" ], - "markers": "python_version != '3.2.*' and python_version >= '2.7' and python_version != '3.0.*' and python_version != '3.3.*' and python_version != '3.1.*'", "version": "==0.6.0" }, "py": { @@ -192,11 +189,11 @@ "sha256:3fd59af7435864e1a243790d322d763925431213b6b8529c6ca71081ace3bbf7", "sha256:e31fb2767eb657cbde86c454f02e99cb846d3cd9d61b318525140214fdc0e98e" ], - "markers": "python_version != '3.2.*' and python_version >= '2.7' and python_version != '3.0.*' and python_version != '3.3.*' and python_version != '3.1.*'", "version": "==1.5.4" }, "pycodestyle": { "hashes": [ + "sha256:74abc4e221d393ea5ce1f129ea6903209940c1ecd29e002e8c6933c2b21026e0", "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b35400f93dcfb83", "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a" ], @@ -205,15 +202,20 @@ }, "pylint": { "hashes": [ - "sha256:a48070545c12430cfc4e865bf62f5ad367784765681b3db442d8230f0960aa3c", - "sha256:fff220bcb996b4f7e2b0f6812fd81507b72ca4d8c4d05daf2655c333800cb9b3" + "sha256:248a7b19138b22e6390cba71adc0cb03ac6dd75a25d3544f03ea1728fa20e8f4", + "sha256:9cd70527ef3b099543eeabeb5c80ff325d86b477aa2b3d49e264e12d12153bc8" ], "index": "pypi", - "version": "==1.9.2" + "version": "==2.0.0" }, "pyparsing": { "hashes": [ "sha256:0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04", + "sha256:281683241b25fe9b80ec9d66017485f6deff1af5cde372469134b56ca8447a07", + "sha256:8f1e18d3fd36c6795bb7e02a39fd05c611ffc2596c1e0d995d34d67630426c18", + "sha256:9e8143a3e15c13713506886badd96ca4b579a87fbdf49e550dbfc057d6cb218e", + "sha256:b8b3117ed9bdf45e14dcc89345ce638ec7e0e29b2b579fa1ecf32ce45ebac8a5", + "sha256:e4d45427c6e20a59bf4f88c639dcc03ce30d193112047f94012102f235853a58", "sha256:fee43f17a9c4087e7ed1605bd6df994c6173c1e977d7ade7b651292fab2bd010" ], "version": "==2.2.0" @@ -259,18 +261,46 @@ }, "tox": { "hashes": [ - "sha256:8df73fb0eae939692d67a095c49081b1afb948eca51879e5dc1868d9b0ad11de", - "sha256:9f09ec569b5019ed030d3ed3d486a9263e8964a9752253a98f5d67b46e954055" + "sha256:4df108a1fcc93a7ee4ac97e1a3a1fc3d41ddd22445d518976604e2ef05025280", + "sha256:9f0cbcc36e08c2c4ae90d02d3d1f9a62231f974bcbc1df85e8045946d8261059" ], "index": "pypi", - "version": "==3.1.1" + "version": "==3.1.2" + }, + "typed-ast": { + "hashes": [ + "sha256:0948004fa228ae071054f5208840a1e88747a357ec1101c17217bfe99b299d58", + "sha256:10703d3cec8dcd9eef5a630a04056bbc898abc19bac5691612acba7d1325b66d", + "sha256:1f6c4bd0bdc0f14246fd41262df7dfc018d65bb05f6e16390b7ea26ca454a291", + "sha256:25d8feefe27eb0303b73545416b13d108c6067b846b543738a25ff304824ed9a", + "sha256:29464a177d56e4e055b5f7b629935af7f49c196be47528cc94e0a7bf83fbc2b9", + "sha256:2e214b72168ea0275efd6c884b114ab42e316de3ffa125b267e732ed2abda892", + "sha256:3e0d5e48e3a23e9a4d1a9f698e32a542a4a288c871d33ed8df1b092a40f3a0f9", + "sha256:519425deca5c2b2bdac49f77b2c5625781abbaf9a809d727d3a5596b30bb4ded", + "sha256:57fe287f0cdd9ceaf69e7b71a2e94a24b5d268b35df251a88fef5cc241bf73aa", + "sha256:668d0cec391d9aed1c6a388b0d5b97cd22e6073eaa5fbaa6d2946603b4871efe", + "sha256:68ba70684990f59497680ff90d18e756a47bf4863c604098f10de9716b2c0bdd", + "sha256:6de012d2b166fe7a4cdf505eee3aaa12192f7ba365beeefaca4ec10e31241a85", + "sha256:79b91ebe5a28d349b6d0d323023350133e927b4de5b651a8aa2db69c761420c6", + "sha256:8550177fa5d4c1f09b5e5f524411c44633c80ec69b24e0e98906dd761941ca46", + "sha256:898f818399cafcdb93cbbe15fc83a33d05f18e29fb498ddc09b0214cdfc7cd51", + "sha256:94b091dc0f19291adcb279a108f5d38de2430411068b219f41b343c03b28fb1f", + "sha256:a26863198902cda15ab4503991e8cf1ca874219e0118cbf07c126bce7c4db129", + "sha256:a8034021801bc0440f2e027c354b4eafd95891b573e12ff0418dec385c76785c", + "sha256:bc978ac17468fe868ee589c795d06777f75496b1ed576d308002c8a5756fb9ea", + "sha256:c05b41bc1deade9f90ddc5d988fe506208019ebba9f2578c622516fd201f5863", + "sha256:c9b060bd1e5a26ab6e8267fd46fc9e02b54eb15fffb16d112d4c7b1c12987559", + "sha256:edb04bdd45bfd76c8292c4d9654568efaedf76fe78eb246dde69bdb13b2dad87", + "sha256:f19f2a4f547505fe9072e15f6f4ae714af51b5a681a97f187971f50c283193b6" + ], + "markers": "python_version < '3.7' and implementation_name == 'cpython'", + "version": "==1.1.0" }, "virtualenv": { "hashes": [ "sha256:2ce32cd126117ce2c539f0134eb89de91a8413a29baac49cbab3eb50e2026669", "sha256:ca07b4c0b54e14a91af9f34d0919790b016923d157afda5efdde55c96718f752" ], - "markers": "python_version >= '2.7' and python_version != '3.2.*' and python_version != '3.0.*' and python_version != '3.1.*'", "version": "==16.0.0" }, "wheel": { diff --git a/conjure-python-verifier/python/setup.py b/conjure-python-verifier/python/setup.py index 33f2c5e8e..f098739c6 100644 --- a/conjure-python-verifier/python/setup.py +++ b/conjure-python-verifier/python/setup.py @@ -21,7 +21,7 @@ version="0.0.0", description="Test cases to verify wire compatibility of generated clients", # The project's main homepage. - url="https://github.com/palantir/conjure-python-client", + url="https://github.com/palantir/conjure-python", author="Palantir Technologies, Inc.", # You can just specify the packages manually here if your project is # simple. Or you can use find_packages(). From 5e6a33288b8214bb5d5ffe87897b431078118704 Mon Sep 17 00:00:00 2001 From: forozco Date: Wed, 18 Jul 2018 22:51:04 +0100 Subject: [PATCH 3/5] update metadata gen --- .../com/palantir/conjure/python/ConjurePythonGenerator.java | 4 ++-- .../test/resources/services/expected/conda_recipe/meta.yaml | 4 ++-- .../src/test/resources/services/expected/setup.py | 2 +- .../src/test/resources/types/expected/conda_recipe/meta.yaml | 4 ++-- .../src/test/resources/types/expected/setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conjure-python-core/src/main/java/com/palantir/conjure/python/ConjurePythonGenerator.java b/conjure-python-core/src/main/java/com/palantir/conjure/python/ConjurePythonGenerator.java index 60b30bb4d..6aa6215c2 100644 --- a/conjure-python-core/src/main/java/com/palantir/conjure/python/ConjurePythonGenerator.java +++ b/conjure-python-core/src/main/java/com/palantir/conjure/python/ConjurePythonGenerator.java @@ -145,7 +145,7 @@ private PythonFile buildPythonSetupFile() { .putOptions("name", config.packageName()) .putOptions("version", config.packageVersion()) .addInstallDependencies("requests", "typing") - .addInstallDependencies(String.format("conjure-client>=%s,<%s", + .addInstallDependencies(String.format("conjure-python-client>=%s,<%s", config.minConjureClientVersion(), config.maxConjureClientVersion())); config.packageDescription().ifPresent(value -> builder.putOptions("description", value)); config.packageUrl().ifPresent(value -> builder.putOptions("url", value)); @@ -163,7 +163,7 @@ private PythonFile buildCondaMetaYamlFile() { .condaPackageName(config.packageName()) .packageVersion(config.packageVersion()) .addInstallDependencies("requests", "typing") - .addInstallDependencies(String.format("conjure-client >=%s,<%s", + .addInstallDependencies(String.format("conjure--python-client >=%s,<%s", config.minConjureClientVersion(), config.maxConjureClientVersion())) .build(); diff --git a/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml b/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml index 2d849a44e..3e3c5ccd6 100644 --- a/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml +++ b/conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml @@ -16,10 +16,10 @@ requirements: - setuptools - requests - typing - - conjure-client >=1.0.0,<2 + - conjure--python-client >=1.0.0,<2 run: - python - requests - typing - - conjure-client >=1.0.0,<2 + - conjure--python-client >=1.0.0,<2 diff --git a/conjure-python-core/src/test/resources/services/expected/setup.py b/conjure-python-core/src/test/resources/services/expected/setup.py index 6b6845c4a..b97413dfd 100644 --- a/conjure-python-core/src/test/resources/services/expected/setup.py +++ b/conjure-python-core/src/test/resources/services/expected/setup.py @@ -9,6 +9,6 @@ install_requires=[ 'requests', 'typing', - 'conjure-client>=1.0.0,<2', + 'conjure-python-client>=1.0.0,<2', ], ) diff --git a/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml b/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml index 2d849a44e..3e3c5ccd6 100644 --- a/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml +++ b/conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml @@ -16,10 +16,10 @@ requirements: - setuptools - requests - typing - - conjure-client >=1.0.0,<2 + - conjure--python-client >=1.0.0,<2 run: - python - requests - typing - - conjure-client >=1.0.0,<2 + - conjure--python-client >=1.0.0,<2 diff --git a/conjure-python-core/src/test/resources/types/expected/setup.py b/conjure-python-core/src/test/resources/types/expected/setup.py index 6b6845c4a..b97413dfd 100644 --- a/conjure-python-core/src/test/resources/types/expected/setup.py +++ b/conjure-python-core/src/test/resources/types/expected/setup.py @@ -9,6 +9,6 @@ install_requires=[ 'requests', 'typing', - 'conjure-client>=1.0.0,<2', + 'conjure-python-client>=1.0.0,<2', ], ) From 1884b4edd4c722241c62c35912aa5bf57de6ce0b Mon Sep 17 00:00:00 2001 From: forozco Date: Wed, 18 Jul 2018 22:54:42 +0100 Subject: [PATCH 4/5] tox caching --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 135191f6c..1adda849c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,14 +63,14 @@ jobs: command: pip install --user setuptools tox==2.9.1 tox-virtualenv-no-download - restore_cache: - key: tox-v2-py27-{{ checksum "tox.ini" }} + key: tox-v2-py27-{{ checksum "tox.ini" }}-{{ checksum "setup.py" }} - run: name: Install tox things command: if [ ! -d ".tox" ]; then python -m tox -e py27 --notest; fi - save_cache: - key: tox-v2-py27-{{ checksum "tox.ini" }} + key: tox-v2-py27-{{ checksum "tox.ini" }}-{{ checksum "setup.py"}} paths: - .tox @@ -99,14 +99,14 @@ jobs: command: pip install --user setuptools tox==2.9.1 tox-virtualenv-no-download - restore_cache: - key: tox-v2-py3-{{ checksum "tox.ini" }} + key: tox-v2-py3-{{ checksum "tox.ini" }}-{{ checksum "setup.py" }} - run: name: Install tox things command: if [ ! -d ".tox" ]; then python -m tox -e py3 --notest; fi - save_cache: - key: tox-v2-py3-{{ checksum "tox.ini" }} + key: tox-v2-py3-{{ checksum "tox.ini" }}-{{ checksum "setup.py" }} paths: - .tox From e3d73abee767e4a77728affaa67cf117e8cb4315 Mon Sep 17 00:00:00 2001 From: forozco Date: Thu, 19 Jul 2018 10:50:03 +0100 Subject: [PATCH 5/5] cleanup documentation --- CONTRIBUTING.md | 13 ++++++++++++- README.md | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3072780a5..cf5690329 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,15 +10,26 @@ The team welcomes contributions! To make changes: ### Prerequisites -The generator is written in Java, so you'll need Java 8 installed on your machine. (We recommend [Intellij IDEA Community Edition](https://www.jetbrains.com/idea/) for Java projects.) +- Java 8 +- Python2 (On macOS: `brew install python3`) +- Python3 (On macOS: `brew install python`) +- [pipenv](https://github.com/pypa/pipenv) (`pip3 install pipenv`) + + +_We recommend the free [VSCode](https://code.visualstudio.com/) editor to work on python projects +and [Intellij IDEA Community Edition](https://www.jetbrains.com/idea/) for Java projects._ ### One-time setup for development 1. Fork the repository 1. Generate the IDE configuration: `./gradlew idea` 1. Open projects in Intellij: `open *.ipr` +1. Generate integration test bindings: `./gradlew generateVerifierBindings` +1. In `conjure-python-verification/python` create the virtual environment `PIPENV_VENV_IN_PROJECT=1 pipenv --python 3 shell` +1. In `conjure-python-verification/python` install all dependencies `pipenv install --dev` ### Development tips - run `./gradlew checkstyleMain checkstyleTest` locally to make sure your code conforms to the code-style. +- Use `tox` in `conjure-python-verification/python` to run all tests using both python 2 and 3 diff --git a/README.md b/README.md index 23119ac9f..4a90eb663 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ conjure-python generates code that works on both Python 2 and Python 3. ## Generated services -- [TestService](./conjure-python-core/src/test/resources/services/expected/package/another/__init__.py) +- [TestService](./conjure-python-core/src/test/resources/services/expected/package/another/TestService.py) ```python -from httpremoting import RequestsClient, ServiceConfiguration +from conjure_python_client import RequestsClient, ServiceConfiguration config = ServiceConfiguration() config.uris = ["https://foo.com/api"]