Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/tp30'
Browse files Browse the repository at this point in the history
Conflicts:
	README.asciidoc
  • Loading branch information
spmallette committed Aug 10, 2015
2 parents 856daac + 5453b2d commit da57f39
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 48 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.0.1 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Clarified semantics of `Transaction.close()` in unit tests - now refers only to closing the current transaction in the current thread.
* `Neo4jGraph` no longer uses `OptOut` on `TransactionTest.shouldRollbackOnCloseWhenConfigured` (formerly `shouldRollbackOnShutdownWhenConfigured`)
* Gremlin Server initialization scripts can now return a `Map` of values that will become global bindings for the server.
* Introduced the `--dryRun` option to the document generation process which ignores actual script execution in the Gremlin Console.
* Fixed bug in `EventStrategy` around property changed events when calling `property` without cardinality or meta-property values.
Expand Down
131 changes: 130 additions & 1 deletion CONTRIBUTING.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,138 @@ 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.
////
## Contributing to Apache TinkerPop
Contributing to Apache TinkerPop
--------------------------------
Contributions via GitHub pull requests are gladly accepted from their original
author. By submitting any copyrighted material via pull request, email, or other means
you agree to license the material under the project's open source license and
warrant that you have the legal authority to do so.
Building and Testing
--------------------
TinkerPop requires `Java 1.8.0_40+` for proper building and proper operations.
* Build Project: `mvn clean install`
** Specify specific tests in a TinkerPop Suite to run with the `GREMLIN_TESTS` environment variable, along with the Maven project list argument, e.g.:
+
----
export GREMLIN_TESTS='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.PathTest'
mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
----
** Clean the `.groovy/grapes/org.apache.tinkerpop` directory on build: `mvn clean install -DcleanGrapes`
** Turn off "heavy" logging in the "process" tests: `mvn clean install -DargLine="-DmuteTestLogs=true"`
** The test suite for `neo4j-gremlin` is disabled by default - to turn it on: `mvn clean install -DincludeNeo4j`
* Regenerate test data (only necessary given changes to IO classes): `mvn clean install -Dio` from `tinkergraph-gremlin` directory
** If there are changes to the Gryo format, it may be necessary to generate the Grateful Dead dataset from GraphSON (see `IoDataGenerationTest.shouldWriteGratefulDead`)
* Check license headers are present: `mvn apache-rat:check`
* Build AsciiDocs (Hadoop and ZooKeeper must be running): `bin/process-docs.sh`
** Build AsciiDocs (but don't evaluate code blocks): `bin/process-docs.sh --dryRun`
** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
* Build JavaDocs: `mvn process-resources -Djavadoc`
* Check for Apache License headers: `mvn apache-rat:check`
* Check for newer dependencies: `mvn versions:display-dependency-updates` or `mvn versions:display-plugin-updates`
* Deploy JavaDocs/AsciiDocs: `bin/publish-docs.sh svn-username`
* Integration Tests: `mvn verify -DskipIntegrationTests=false`
** Execute with the `-DincludeNeo4j` option to include transactional tests.
* Performance Tests: `mvn verify -DskipPerformanceTests=false`
IDE Setup with Intellij
-----------------------
This section refers specifically to setup within Intellij. TinkerPop has a module called `gremlin-shaded` which contains shaded dependencies for some libraries that are widely used and tend to introduce conflicts. To ensure that Intellij properly interprets this module after importing the Maven `pom.xml` perform the following steps:
. Build `gremlin-shaded` from the command line with `mvn clean install`.
. Right-click on the `gremlin-shaded` module in the project viewer of Intellij and select "Remove module".
. In the "Maven Projects" Tool window and click the tool button for "Reimport All Maven projects" (go to `View | Tool Windows | Maven Projects` on the main menu if this panel is not activated).
. At this point it should be possible to compile and run the tests within Intellij, but in the worst case, use `File | Invalidate Caches/Restart` to ensure that indices properly rebuild.
Note that it maybe be necessary to re-execute these steps if the `gremlin-shaded` `pom.xml` is ever updated.
Developers working on the `neo4j-gremlin` module should enabled the `include-neo4j` Maven profile in Intellij. This will ensure that tests will properly execute within the IDE.
If Intellij complains about "duplicate sources" for the Groovy files when attempting to compile/run tests, then install the link:http://plugins.jetbrains.com/plugin/7442?pr=idea[GMavenPlus Intellij plugin].
For Committers
--------------
The guidelines that follow apply to those with commit access to the main repository:
Release Notes
~~~~~~~~~~~~~
There is a two-pronged approach to maintaining the change log and preparing the release notes.
1. For work that is documented in JIRA, run the release notes report to include all of
the tickets targeted for a specific release. This report can be included in the
release announcement.
2. The manual change log (`CHANGELOG.asciidoc`) can be used to highlight large
changes, describe themes (e.g. "We focused on performance improvements") or to
give voice to undocumented changes.
Given the dependence on the JIRA report for generating additions to the `CHANGELOG.asciidoc`,
which uses the title of the issue as the line presented in the release note report, titles should
be edited prior to release to be useful in that context. In other words, an issue title should
be understandable as a change in the fewest words possible while still conveying the gist of the
change.
Changes that break the public APIs should be marked with a "breaking" label and should be
distinguished from other changes in the release notes.
Branches
~~~~~~~~
The "master" branch is used for the main line of development and release branches are constructed
for ongoing maintenance work. For example, the "tp30" branch is used to maintain the 3.0.x line
while work on 3.1.x proceeds on "master".
Other branches may be created for collaborating on features or for RFC's that
other developers may want to inspect. It is suggested that the JIRA issue ID be
used as the prefix, since that triggers certain automation, and it provides a
way to account for the branch lifecycle, i.e. "Who's branch is this, and can I
delete it?"
For branches that are NOT associated with JIRA issues, developers should utilize their Apache ID as
a branch name prefix. This provides a unique namespace, and also a way to account for the branch lifecycle.
Developers should remove their own branches when they are no longer needed.
Tags
~~~~
Tags are used for milestones, release candidates, and approved releases. Please
refrain from creating arbitrary tags, as they produce permanent clutter.
Issue Tracker Conventions
~~~~~~~~~~~~~~~~~~~~~~~~~
TinkerPop uses Apache JIRA as its link:https://issues.apache.org/jira/browse/TINKERPOP3[issue tracker]. JIRA is a
very robust piece of software with many options and configurations. To simplify usage and ensure consistency across
issues, the following conventions should be adhered to:
* An issue's "status" should generally be in one of two states: `open` or `closed` (`reopened` is equivalent to `open`
for our purposes).
** An `open` issue is newly created, under consideration or otherwise in progress.
** A `closed` issue is completed for purposes of release (i.e. code, testing, and documentation complete).
** Issues in a `resolved` state should immediately be evaluated for movement to `closed` - issue become `resolved`
by those who don't have the permissions to `close`.
* An issue's "type" should be one of two options: `bug` or `improvement`.
** A `bug` has a very specific meaning, referring to an error that prevents usage of TinkerPop AND does not have a
reasonable workaround. Given that definition, a `bug` should generally have very high priority for a fix.
** Everything else is an `improvement` in the sense that any other work is an enhancement to the current codebase.
* The "component" should be representative of the primary area of code that it applies to and all issues should have
this property set.
* Issues are not assigned "labels" with one exception: the "breaking" label. The "breaking" label marks an issue
as one that is representative of a change in the API that might affect users or vendors. This label is important when
organizing release notes.
* The "affects/fix version(s)" fields should be appropriately set, where the "fix version" implies the version on
which that particular issue will completed.
Code Style
~~~~~~~~~~
Contributors should examine the current code base to determine what the code style patterns are and should match their
style to what is already present. Of specific note however, TinkerPop does not use "import wildcards" - IDEs should
be adjusted accordingly to not auto-wildcard the imports.
65 changes: 22 additions & 43 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ image:https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/s
Documentation
~~~~~~~~~~~~~
TinkerPop3 provides graph computing capabilities for both graph databases (OLTP) and graph analytic systems (OLAP).
* link:http://tinkerpop.incubator.apache.org/[homepage]
* link:http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/[user documentation]
* link:http://tinkerpop.incubator.apache.org/javadocs/3.0.0-SNAPSHOT/core/[core javadoc]
Expand All @@ -30,47 +32,17 @@ Documentation
Building and Testing
~~~~~~~~~~~~~~~~~~~~
TinkerPop requires `Java 1.8.0_40+` for proper building and proper operations.
TinkerPop uses link:https://maven.apache.org/[Maven] and requires `Java 1.8.0_40+` for proper building and proper operations. To build, execute unit tests and package Gremlin Console/Server run:
* Build Project: `mvn clean install`
** Specify specific tests in a TinkerPop Suite to run with the `GREMLIN_TESTS` environment variable, along with the Maven project list argument, e.g.:
+
----
export GREMLIN_TESTS='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.PathTest'
mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
----
** Clean the `.groovy/grapes/org.apache.tinkerpop` directory on build: `mvn clean install -DcleanGrapes`
** Turn off "heavy" logging in the "process" tests: `mvn clean install -DargLine="-DmuteTestLogs=true"`
** The test suite for `neo4j-gremlin` is disabled by default - to turn it on: `mvn clean install -DincludeNeo4j`
* Regenerate test data (only necessary given changes to IO classes): `mvn clean install -Dio` from `tinkergraph-gremlin` directory
** If there are changes to the Gryo format, it may be necessary to generate the Grateful Dead dataset from GraphSON (see `IoDataGenerationTest.shouldWriteGratefulDead`)
* Check license headers are present: `mvn apache-rat:check`
* Build AsciiDocs (Hadoop and ZooKeeper must be running): `bin/process-docs.sh`
** Build AsciiDocs (but don't evaluate code blocks): `bin/process-docs.sh --dryRun`
** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
* Build JavaDocs: `mvn process-resources -Djavadoc`
* Check for Apache License headers: `mvn apache-rat:check`
* Check for newer dependencies: `mvn versions:display-dependency-updates` or `mvn versions:display-plugin-updates`
* Deploy JavaDocs/AsciiDocs: `bin/publish-docs.sh svn-username`
* Integration Tests: `mvn verify -DskipIntegrationTests=false`
** Execute with the `-DincludeNeo4j` option to include transactional tests.
* Performance Tests: `mvn verify -DskipPerformanceTests=false`
IDE Setup
^^^^^^^^^
This section refers specifically to setup within Intellij. TinkerPop has a module called `gremlin-shaded` which contains shaded dependencies for some libraries that are widely used and tend to introduce conflicts. To ensure that Intellij properly interprets this module after importing the Maven `pom.xml` perform the following steps:
. Build `gremlin-shaded` from the command line with `mvn clean install`.
. Right-click on the `gremlin-shaded` module in the project viewer of Intellij and select "Remove module".
. In the "Maven Projects" Tool window and click the tool button for "Reimport All Maven projects" (go to `View | Tool Windows | Maven Projects` on the main menu if this panel is not activated).
. At this point it should be possible to compile and run the tests within Intellij, but in the worst case, use `File | Invalidate Caches/Restart` to ensure that indices properly rebuild.
Note that it maybe be necessary to re-execute these steps if the `gremlin-shaded` `pom.xml` is ever updated.
Developers working on the `neo4j-gremlin` module should enabled the `include-neo4j` Maven profile in Intellij. This will ensure that tests will properly execute within the IDE.
If Intellij complains about "duplicate sources" for the Groovy files when attempting to compile/run tests, then install the link:http://plugins.jetbrains.com/plugin/7442?pr=idea[GMavenPlus Intellij plugin].
[source,bash]
mvn clean install
The zip distributions can be found in the following directories:
. `gremlin-server/target`
. `gremlin-console/target`
Please see the `CONTRIBUTING.asciidoc` file for more detailed information and options for building, test running and developing TinkerPop.
Get Started
~~~~~~~~~~~
Expand All @@ -82,7 +54,15 @@ $ bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
gremlin>
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().has('name','vadas').valueMap()
==>[name:[vadas], age:[27]]
----
Issue Tracker Conventions
Expand Down Expand Up @@ -132,8 +112,7 @@ Release Process
. Review and close the staging repository (Apache Nexus at link:https://repository.apache.org/[https://repository.apache.org/])
. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop dev; svn up dev/x.y.z`
. `svn co --depth empty https://dist.apache.org/repos/dist/release/incubator/tinkerpop release; mkdir release/x.y.z`
. `ls dev/x.y.z/ | grep '\-\(distribution\|source\-release\)\.zip' | sed -e 's/\(^[^ ]*\)-distribution\([^ ]*\)/cp dev\/x.y.z\/\1-distribution\2 release\/x.y.z\/\1-bin\2/' -e 's/\(^[^ ]*\)-source-release\([^ ]*\)/cp dev\/x.y.z\/\1-source-release\2 release\/x.y.z\/\1-src\2/' | /bin/sh`
. `cp dev/x.y.z/KEYS release/x.y.z/KEYS`
. `ls dev/x.y.z/ | grep '\-\(distribution\|source\-release\)\.zip' | sed -e 's/\(^[^ ]*\)-distribution\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-bin\2/' -e 's/\(^[^ ]*\)-source-release\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-src\2/' | /bin/sh`
. `cd release; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
. Update homepage with references to latest distribution and to other internal links elsewhere on the page.
. Wait for Apache Central to sync the jars and src (link:http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/[http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/]).
Expand Down
Loading

0 comments on commit da57f39

Please sign in to comment.