Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Change scripts test hierarchy #35

Merged
merged 22 commits into from
Apr 19, 2018
4 changes: 2 additions & 2 deletions Jenkinsfile
Expand Up @@ -24,7 +24,7 @@ stage("Unit Test") {
python -m spacy download en
python -m nltk.downloader all
python setup.py install
nosetests -v --nocapture --with-timer tests/unittest
nosetests -v --nocapture --with-timer scripts tests/unittest
"""
}
}
Expand All @@ -40,7 +40,7 @@ stage("Unit Test") {
python -m spacy download en
python -m nltk.downloader all
python setup.py install
nosetests -v --nocapture --with-timer tests/unittest
nosetests -v --nocapture --with-timer scripts tests/unittest
"""
}
}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -24,7 +24,7 @@ docs:
make -C docs html

test:
nosetests -v --nocapture tests
nosetests -v --nocapture tests scripts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nosetests -v --nocapture --with-timer scripts/*/test_*.py tests/unittest


release:
python setup.py sdist
21 changes: 21 additions & 0 deletions scripts/__init__.py
@@ -0,0 +1,21 @@
# coding: utf-8

# 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
#
# http://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.

# pylint: disable=wildcard-import
"""NLP examples."""
21 changes: 21 additions & 0 deletions scripts/language_model/__init__.py
@@ -0,0 +1,21 @@
# coding: utf-8

# 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
#
# http://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.

# pylint: disable=wildcard-import
"""Language Model example."""
21 changes: 21 additions & 0 deletions scripts/nmt/__init__.py
@@ -0,0 +1,21 @@
# coding: utf-8

# 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
#
# http://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.

# pylint: disable=wildcard-import
"""NMT example."""
21 changes: 21 additions & 0 deletions scripts/sentiment_analysis/__init__.py
@@ -0,0 +1,21 @@
# coding: utf-8

# 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
#
# http://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.

# pylint: disable=wildcard-import
"""Sentiment Analysis example."""
2 changes: 1 addition & 1 deletion scripts/nmt/test_bleu.py → scripts/tests/test_bleu.py
Expand Up @@ -27,7 +27,7 @@
import codecs
import numpy as np
from numpy.testing import assert_allclose
from bleu import compute_bleu
from scripts.nmt.bleu import compute_bleu


actions = ['deletion', 'replacement', 'add']
Expand Down