Move Botsbuildbots to contrib

Closes #678.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy 2015-07-30 11:06:18 +02:00
parent b38ec6b92d
commit 7db0fcdafb
6 changed files with 40 additions and 20 deletions

View File

@ -0,0 +1,33 @@
;; Copyright (c) 2014, 2015 Gergely Nagy
;; 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.
(defun Botsbuildbots () (Botsbuildbots))
(defmacro Botsbuildbots []
"Build bots, repeatedly.^W^W^WPrint the AUTHORS, forever."
`(try
(do
(import [requests])
(let [[r (requests.get
"https://raw.githubusercontent.com/hylang/hy/master/AUTHORS")]]
(repeat r.text)))
(catch [e ImportError]
(repeat "Botsbuildbots requires `requests' to function."))))

View File

@ -391,8 +391,6 @@
(read :from-file (StringIO input)))
(defun Botsbuildbots () (Botsbuildbots))
(defn zipwith [func &rest lists]
"Zip the contents of several lists and map a function to the result"
(do
@ -425,8 +423,7 @@
(hyify (. value __name__))
(catch [] (string value))))))
(def *exports* '[Botsbuildbots
butlast calling-module-name coll? cons cons? cycle
(def *exports* '[butlast calling-module-name coll? cons cons? cycle
dec distinct disassemble drop drop-last drop-while empty? even?
every? first filter filterfalse flatten float? fraction gensym
identity inc input instance? integer integer? integer-char?

View File

@ -220,19 +220,6 @@
`(setv ~name ~main)))
ret))
(defmacro Botsbuildbots []
"Build bots, repeatedly.^W^W^WPrint the AUTHORS, forever."
`(try
(do
(import [requests])
(let [[r (requests.get
"https://raw.githubusercontent.com/hylang/hy/master/AUTHORS")]]
(repeat r.text)))
(catch [e ImportError]
(repeat "Botsbuildbots requires `requests' to function."))))
(defreader @ [expr]
(let [[decorators (slice expr nil -1)]
[fndef (get expr -1)]]

View File

@ -20,6 +20,7 @@ from .native_tests.contrib.meth import * # noqa
from .native_tests.contrib.walk import * # noqa
from .native_tests.contrib.multi import * # noqa
from .native_tests.contrib.curry import * # noqa
from .native_tests.contrib.botsbuildbots import * # noqa
if PY3:
from .native_tests.py3_only_tests import * # noqa

View File

@ -0,0 +1,5 @@
(import [hy.contrib.botsbuildbots [*]])
(require hy.contrib.botsbuildbots)
(defn test-botsbuildbots []
(assert (> (len (first (Botsbuildbots))) 50)))

View File

@ -257,9 +257,6 @@
(yield 4))))
(assert (= (list (yield-from-test)) [0 1 2 1 2 3 4])))
(defn test-botsbuildbots []
(assert (> (len (first (Botsbuildbots))) 50)))
(defn test-defmain []
"NATIVE: make sure defmain is clean"