Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Convert Avro -> proto3.
Browse files Browse the repository at this point in the history
  • Loading branch information
calbach committed Apr 16, 2016
1 parent f421d6e commit 0ff95ff
Show file tree
Hide file tree
Showing 18 changed files with 1,667 additions and 2,432 deletions.
50 changes: 4 additions & 46 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,54 +118,12 @@ Syntax Style and Conventions

The current code conventions for the source files are as follows:

- Follow the `protocol buffers style guide
<https://developers.google.com/protocol-buffers/docs/style>`__
- Use two-space indentation, and no tabs.
- Hard-wrap code to 80 characters per line.
- Use ``UpperCamelCase`` for object or record names.
- Use ``lowerCamelCase`` for attribute or method names.
- Use ``CONSTANT_CASE`` for global and constant values.
- Comments:

- Comments should be indented at the same level as the surrounding
code.
- Comments should precede the code that they make a comment on.
Documentation comments will not work otherwise.
- Documentation comments, which are intended to be processed by
avrodoc and displayed in the user-facing API documentation, must use
the ``/** ... */`` style, and must not have a leading ``*`` on each
internal line:

::

/**
This documentation comment will be
processed correctly by avrodoc.
*/

::

/**
* This documentation comment will have a
* bullet point at the start of every line
* when processed by avrodoc.
*/

- Block and multi-line non-documentation comments, intended for schema
developers only, must use the ``/* ... */`` style.

::

/*
This multi-line comment will not appear in the
avrodoc documentation and is intended for
schema developers.
*/

- All multi-line comments should have the comment text at the same
indent level as the comment delimeters.
- One-line non-documentation comments, intended for schema developers
only, must use the ``// ...`` style.
- Comments may use `reStructuredText
<http://docutils.sourceforge.net/rst.html>`__ mark up.
- Comments may use `reStructuredText
<http://docutils.sourceforge.net/rst.html>`__ mark up.

Documentation
@@@@@@@@@@@@@
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ primary data collected from sequencing machines.
The team will deliver:

#. Data model. An abstract, mathematically complete and precise model of
the data that is manipulated by the API. See the `Avro
directory <src/main/resources/avro>`__ for our in-progress work on
the data that is manipulated by the API. See the `Proto
directory <src/main/proto>`__ for our in-progress work on
defining v0.5 of the data model.

#. API Specification. A human-readable document introducing and
Expand Down
84 changes: 43 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,44 @@
</developers>

<properties>
<avro.version>1.7.7</avro.version>
<proto.version>3.0.0-beta-2</proto.version>
<maven.enforcer.jdk-version>[1.6,)</maven.enforcer.jdk-version>
<maven.enforcer.maven-version>[3.0.4,)</maven.enforcer.maven-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.targetEncoding>UTF-8</project.build.targetEncoding>
</properties>

<!-- pluginRepositories can be removed entirely once
https://github.com/sergei-ivanov/maven-protoc-plugin/issues/11 is
resolved. -->
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
<pluginRepository>
<id>protoc-plugin</id>
<url>https://dl.bintray.com/sergei-ivanov/maven/</url>
</pluginRepository>
</pluginRepositories>

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.0.Final</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down Expand Up @@ -125,21 +148,18 @@
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.4.4</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${proto.version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
<executions>
<execution>
<id>schemas</id>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
<goal>protocol</goal>
<goal>idl-protocol</goal>
<goal>compile</goal>
<goal>compile-python</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources/avro</sourceDirectory>
<stringType>String</stringType>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -165,7 +185,8 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- FIXME: Doc generation temporarily disabled due to dependency on avro.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
Expand All @@ -184,33 +205,14 @@
<argument>docs</argument>
</arguments>
</configuration>
</plugin>
</plugin> -->
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-ipc</artifactId>
<version>${avro.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-ipc</artifactId>
<scope>compile</scope>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${proto.version}</version>
</dependency>
</dependencies>
<distributionManagement>
Expand Down
Loading

0 comments on commit 0ff95ff

Please sign in to comment.