You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/06/06 09:04:24 UTC

[GitHub] [avro] KalleOlaviNiemitalo commented on a diff in pull request #1707: AVRO-3523: Move contributions guidelines to website

KalleOlaviNiemitalo commented on code in PR #1707:
URL: https://github.com/apache/avro/pull/1707#discussion_r889959335


##########
doc/content/en/project/How to contribute/_index.md:
##########
@@ -0,0 +1,287 @@
+---
+title: "How to contribute"
+linkTitle: "How to contribute"
+weight: 3
+---
+
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   https://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+## Getting the source code
+
+First of all, you need the Avro source code.
+
+The easiest way is to clone or fork the GitHub mirror:
+
+```shell
+git clone https://github.com/apache/avro.git -o github
+```
+
+
+## Making Changes
+
+Before you start, file an issue in [JIRA](https://issues.apache.org/jira/browse/AVRO) or discuss your ideas on the [Avro developer mailing list](http://avro.apache.org/mailing_lists.html). Describe your proposed changes and check that they fit in with what others are doing and have planned for the project. Be patient, it may take folks a while to understand your requirements.
+
+Modify the source code and add some (very) nice features using your favorite IDE.
+
+But take care about the following points
+
+**All Languages**
+- Contributions should pass existing unit tests.
+- Contributions should document public facing APIs.
+- Contributions should add new tests to demonstrate bug fixes or test new features.
+
+**Java**
+
+- All public classes and methods should have informative [Javadoc comments](https://www.oracle.com/fr/technical-resources/articles/java/javadoc-tool.html).
+- Do not use @author tags.
+- Java code should be formatted according to [Oracle's conventions](https://www.oracle.com/java/technologies/javase/codeconventions-introduction.html), with one exception:
+  - Indent two spaces per level, not four.
+- [JUnit](http://www.junit.org/) is our test framework:
+- You must implement a class whose class name starts with Test.
+- Define methods within your class and tag them with the @Test annotation. Call JUnit's many assert methods to verify conditions; these methods will be executed when you run mvn test.
+- By default, do not let tests write any temporary files to /tmp. Instead, the tests should write to the location specified by the test.dir system property.
+- Place your class in the src/test/java/ tree.
+- You can run all the unit tests with the command mvn test, or you can run a specific unit test with the command mvn -Dtest=<class name, fully qualified or short name> test (for example mvn -Dtest=TestFoo test)
+
+
+## Code Style (Autoformatting)
+
+For Java code we use [Spotless](https://github.com/diffplug/spotless/) to format the code to comply with Avro's code style conventions (see above). Automatic formatting relies on [Avro's Eclipse JDT formatter definition](https://github.com/apache/avro/blob/master/lang/java/eclipse-java-formatter.xml). You can use the same definition to auto format from Eclipse or from IntelliJ configuring the Eclipse formatter plugin.
+
+If you use maven code styles issues are checked at the compile phase. If your code breaks because of bad formatting, you can format it automatically by running the command:
+```shell
+mvn spotless:apply
+```
+
+## Unit Tests
+
+Please make sure that all unit tests succeed before constructing your patch and that no new compiler warnings are introduced by your patch. Each language has its own directory and test process.
+
+<details><summary>Java</summary>
+
+```shell
+cd avro-trunk/lang/java
+mvn clean test
+```
+</details>
+
+<details><summary>Python</summary>
+
+```shell
+cd avro-trunk/lang/py
+ant clean test
+```
+</details>
+
+<details><summary>Python3</summary>
+
+```shell
+cd avro-trunk/lang/py3
+./setup.py build test
+```
+</details>
+
+<details><summary>C</summary>
+
+```shell
+cd avro-trunk/lang/c
+./build.sh clean
+./build.sh test
+```
+</details>
+
+<details><summary>C++</summary>
+
+```shell
+cd avro-trunk/lang/c++
+./build.sh clean test
+```
+</details>
+
+<details><summary>Ruby</summary>
+
+```shell
+cd avro-trunk/lang/ruby
+gem install echoe
+rake clean test
+```
+</details>
+
+<details><summary>PHP</summary>

Review Comment:
   There is also `lang/csharp/build.sh` for C#. When I tried it with Avro 1.11.0 on Windows, Avro.Test.LogicalTypeTests.TestDecimal failed with FormatException, but that has already been fixed as part of AVRO-3468.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org