[ https://issues.apache.org/jira/browse/AVRO-3523?focusedWorklogId=776680&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-776680 ]
ASF GitHub Bot logged work on AVRO-3523: ---------------------------------------- Author: ASF GitHub Bot Created on: 01/Jun/22 06:28 Start Date: 01/Jun/22 06:28 Worklog Time Spent: 10m Work Description: clesaec commented on code in PR #1707: URL: https://github.com/apache/avro/pull/1707#discussion_r886360052 ########## 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 Review Comment: Indeed, there is only one python section now, remove python 3 section. Only python section with `./setup.py build test` for build Issue Time Tracking ------------------- Worklog Id: (was: 776680) Time Spent: 20m (was: 10m) > How to contribute : remove patch section > ---------------------------------------- > > Key: AVRO-3523 > URL: https://issues.apache.org/jira/browse/AVRO-3523 > Project: Apache Avro > Issue Type: Sub-task > Components: community > Reporter: Christophe Le Saec > Assignee: Christophe Le Saec > Priority: Trivial > Labels: documentation, pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > The page [how to > contribute|https://cwiki.apache.org/confluence/display/AVRO/How+To+Contribute#HowToContribute-CommittingGuidelinesforcommitters] > contains description to patch but PR is enough. > The aim of this JIRA is to remove patch from website. -- This message was sent by Atlassian Jira (v8.20.7#820007)