Skip to content

Commit

Permalink
Initial commit: open source
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Adams committed May 24, 2016
0 parents commit 8404ec2
Show file tree
Hide file tree
Showing 61 changed files with 8,752 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/.lein-*
/.nrepl-port
/checkouts
/classes
/target
*.class
*.jar
*.swp
*.zip
broken-convert.json
kale-state.json
orchestration_service.conf
orchestration_service_config.json
pom.xml
pom.xml.asc
test-convert.json
test-file.html
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: clojure

script:
- lein cloverage
- lein bikeshed
- lein eastwood '{:exclude-linters [:suspicious-expression]}'
- lein kibit
61 changes: 61 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Individual Contributor License Agreement ("Agreement")

**International Business Machines, Inc. (IBM)**

[https://github.com/IBM-Watson/kale/CLA.md](https://github.com/IBM-Watson/kale/CLA.md)


Thank you for your interest in the Kale project ("the Project").

In order to clarify the intellectual property license granted with Contributions from any person or entity, IBM must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of IBM and its customers; it does not change your rights to use your own Contributions for any other purpose.

If you have not already done so, please complete and sign, then scan and email a pdf file of this Agreement to [email protected].

The original signed agreement should be sent to:

```
IBM Corporation
1710 Murray Ave
Pittsburgh, PA 15217
Attn: Will Chaparro
```

Please read this document carefully before signing and keep a copy for your records.

Full name: ______________________________________________________

(optional) Public name: _________________________________________

Mailing Address: __________________________________________________

Country: ______________________________________________________

Telephone: _____________________________________________________

E-Mail: ________________________________________________________


You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Project. Except for the license granted herein to IBM and recipients of software distributed by IBM, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with IBM. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Project for inclusion in, or documentation of, the Project (”the Work”). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Project or its representatives,including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to IBM and to recipients of software distributed by IBM a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to IBM and to recipients of software distributed by IBM a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work to which Your Contribution(s) were submitted, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Project, or that your employer has executed a separate Corporate CLA with IBM.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may submit it to the Project separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".

8. You agree to notify IBM of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.


Please sign: __________________________________ Date: ________________
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 IBM

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Kale

`kale` is a command line tool for provisioning and configuring the IBM
Watson Retrieve and Rank Service and the IBM Watson Document
Conversion Service.

## Use: download and run

### Download

Download the `kale` tool from our
[releases](https://github.com/IBM-Watson/kale/releases).

### Setup and run

Recommendation: create a short alias to setup a command named `kale`.

On Linux, OSX and other Unix-style systems, the `alias` command can be used like this:

alias kale="java -jar /full/path/to/kale-1.2.0-SNAPSHOT-standalone.jar"

And on Windows, the `doskey` command can be used like this:

doskey kale=java -jar C:\full\path\to\kale-1.2.0-SNAPSHOT-standalone.jar $*

Now the `kale` command should be available. Try:

kale help

## Development

### Preparation for build, test and run

Get the Leiningen tool, `lein`, from http://leiningen.org/, and put it
on your PATH. On Mac OSX, `brew install leiningen` works well. Most
Linux package managers do not do a good job of packaging Leiningen, so
please do the direct installation from http://leiningen.org/.

### Run tests

```bash
$ lein test
```

Or, to run the tests and produce a code coverage report:

```bash
$ lein cloverage
```

### Development run of the tool itself

```bash
$ lein run <command>
```

### Building a `jar`

```bash
$ lein uberjar
Compiling kale.core
Created /knowledge-expansion-admin-cli/target/uberjar/kale-1.2.0-SNAPSHOT.jar
Created /knowledge-expansion-admin-cli/target/uberjar/kale-1.2.0-SNAPSHOT-standalone.jar
```

Now you can run the tool with a simple `java` command line:

```bash
$ java -jar target/uberjar/cli-0.1.0-SNAPSHOT-standalone.jar
```

Recommendation: create an alias:

```bash
$ alias kale="java -jar /full/path/to/knowledge-expansion-admin-cli/target/uberjar/kale-1.2.0-SNAPSHOT-standalone.jar"
```

## Licensing

All sample code contained within this project repository or any
subdirectories is licensed according to the terms of the MIT license,
which can be viewed in the file [LICENSE](LICENSE).

### Implicit agreement of the CLA

By submitting any contributions to this project implicitly you agree
to the terms of the contributors license agreement located in the file
[CLA.md](CLA.md).

## Open Source @ IBM
[Find more open source projects on the IBM Github Page](http://ibm.github.io/)
36 changes: 36 additions & 0 deletions project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
;;
;; (C) Copyright IBM Corp. 2016 All Rights Reserved.
;;

(defproject kale "1.2.0-SNAPSHOT"
:description "The command line administration tool for Enhanced Information Retrieval"
:url "https://github.ibm.com/Enhanced-Retrieval-Admin/knowledge-expansion-admin-cli"
:min-lein-version "2.5.0"
:license {:name "IBM"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/data.codec "0.1.0"]
[cheshire "5.5.0"]
[clj-http "2.1.0"]
[slingshot "0.12.2"]
;; Not a direct dependency.
;; This is here to lock in a specific version.
[riddley "0.1.12"]]
;; :pedantic? :abort
:main ^:skip-aot kale.main
:target-path "target/%s"
:prep-tasks [["exec" "solr/package.clj"]
"compile"]
:profiles {:dev {:dependencies [[clj-http-fake "1.0.2"]]
:plugins [[jonase/eastwood "0.2.3"
:exclusions [org.clojure/clojure]]
[lein-bikeshed "0.3.0"
:exclusions [org.clojure/clojure]]
[lein-cloverage "1.0.6"
:exclusions [org.clojure/clojure]]
[lein-exec "0.3.6"
:exclusions [org.clojure/clojure]]
[lein-kibit "0.1.2"
:exclusions [org.clojure/clojure]]
[lein-shell "0.4.1"
:exclusions [org.clojure/clojure]]]}
:uberjar {:aot :all}})
5 changes: 5 additions & 0 deletions solr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Solr schemas and configurations

We have several Solr schemas in this directory. The script
`package.sh` zips these into Solr configuration packages that can be
pushed up to a _Retrieve and Rank_ cluster.
Loading

0 comments on commit 8404ec2

Please sign in to comment.