Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
public interface PythonBean extends PythonClass {

ImmutableSet<PythonImport> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public interface PythonEnum extends PythonClass {

ImmutableSet<PythonImport> DEFAULT_IMPORTS = ImmutableSet.of(
PythonImport.of(PythonClassName.of("conjure", "ConjureEnumType")));
PythonImport.of(PythonClassName.of("conjure_python_client", "ConjureEnumType")));

@Override
@Value.Default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
public interface PythonService extends PythonClass {

ImmutableSet<PythonImport> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
public interface PythonUnionTypeDefinition extends PythonClass {

ImmutableSet<PythonImport> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Set<PythonImport> 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();
}
Expand All @@ -51,7 +51,7 @@ public Set<PythonImport> visitOptional(OptionalType value) {
ImmutableSet.Builder<PythonImport> 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();
}
Expand All @@ -61,7 +61,7 @@ public Set<PythonImport> visitList(ListType value) {
ImmutableSet.Builder<PythonImport> 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();
}
Expand All @@ -71,7 +71,7 @@ public Set<PythonImport> visitSet(SetType value) {
ImmutableSet.Builder<PythonImport> 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();
}
Expand All @@ -81,7 +81,7 @@ public Set<PythonImport> visitMap(MapType value) {
ImmutableSet.Builder<PythonImport> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ requirements:
- setuptools
- requests
- typing
- conjure-client >=0.0.0,<1
- conjure--python-client >=1.0.0,<2

run:
- python
- requests
- typing
- conjure-client >=0.0.0,<1
- conjure--python-client >=1.0.0,<2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
install_requires=[
'requests',
'typing',
'conjure-client>=0.0.0,<1',
'conjure-python-client>=1.0.0,<2',
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ requirements:
- setuptools
- requests
- typing
- conjure-client >=0.0.0,<1
- conjure--python-client >=1.0.0,<2

run:
- python
- requests
- typing
- conjure-client >=0.0.0,<1
- conjure--python-client >=1.0.0,<2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from conjure import BinaryType
from conjure_python_client import BinaryType

BinaryAliasExample = BinaryType()

Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from conjure import ConjureEnumType
from conjure_python_client import ConjureEnumType

class EnumExample(ConjureEnumType):
"""This enumerates the numbers 1:2."""
Expand Down
Original file line number Diff line number Diff line change
@@ -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):

Expand Down
Loading