Skip to content

Commit

Permalink
Merge pull request #429 from BrikerMan/v2-dev
Browse files Browse the repository at this point in the history
🔖 Release 2.0.1.
  • Loading branch information
BrikerMan authored Oct 29, 2020
2 parents 57c0e8d + ec91627 commit 75bd4ac
Show file tree
Hide file tree
Showing 27 changed files with 642 additions and 158 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/build.yml

This file was deleted.

104 changes: 104 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Test
on:
push:
branches:
- v2-main
- v2-dev
- v2/github-actions
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install deps
run: |
pip install -r requirements.dev.txt
- name: Run lint script
run: sh ./scripts/lint.sh
test:
if: always()
name: "Test with TF ${{ matrix.tensorflow_version }} - ${{ matrix.group }}"
runs-on: ubuntu-latest
strategy:
matrix:
group: [ 1, 2, 3, 4, 5, 6 ]
tensorflow_version: [ 2.2.0, 2.3.0 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install tensorflow==${{ matrix.tensorflow_version }}
pip install -r requirements.dev.txt
pip install -r requirements.txt
- name: Run pytest
run: 'pytest
--doctest-modules
--junitxml=test-reports/junit-${{ matrix.tensorflow_version }}-${{ matrix.group }}.xml
--cov=kashgari
--cov-report=xml:cov-reports/coverage-${{ matrix.tensorflow_version }}-${{ matrix.group }}.xml
--cov-report term
--cov-config .coveragerc
--cov
--splits 6
--group ${{ matrix.group }}
tests/'

- name: Upload unit test
uses: actions/upload-artifact@v2
with:
name: junitxml-${{ matrix.tensorflow_version }}-${{ matrix.group }}
path: test-reports

- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: coverage-${{ matrix.tensorflow_version }}-${{ matrix.group }}
path: cov-reports

sonarcloud:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: SonarCloud
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/download-artifact@v2
with:
path: artifacts
- name: Display structure of downloaded files
run: ls -R
- name: Copy Artifacts to target file
run: |
mkdir -p test-reports && cp artifacts/junit*/* test-reports
mkdir -p cov-reports && cp artifacts/cov*/* cov-reports
- name: Display structure of downloaded files
run: ls -R
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# - name: Publish Unit Test Results
# uses: EnricoMi/[email protected]
# if: always()
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# check_name: Unit Test Results
# files: test-results/*.xml
# report_individual_runs: true
# deduplicate_classes_by_file_name: false
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ formats:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: 3.8
install:
- requirements: ./docs/requirements.txt
- requirements: ./requirements.dev.txt
- requirements: ./requirements.txt

238 changes: 238 additions & 0 deletions .test_durations
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
[
[
"tests/test_corpus.py::TestChineseDailyNerCorpus::test_load_data",
0.791890680999999
],
[
"tests/test_corpus.py::TestSMP2018ECDTCorpus::test_load_data",
0.07738860300000105
],
[
"tests/test_generator.py::TestGenerator::test_batch_generator",
0.1659608910000001
],
[
"tests/test_generator.py::TestGenerator::test_corpus_generator",
0.0004785480000002451
],
[
"tests/test_generator.py::TestGenerator::test_huge_batch_size",
0.0017857870000010934
],
[
"tests/test_tokenizers.py::TestUtils::test_base_tokenizer",
0.00045628799999875014
],
[
"tests/test_tokenizers.py::TestUtils::test_bert_tokenizer",
0.00681187300000019
],
[
"tests/test_tokenizers.py::TestUtils::test_jieba_tokenizer",
3.054017858000001
],
[
"tests/test_utils.py::TestUtils::test_get_list_subset",
0.0004596760000001865
],
[
"tests/test_utils.py::TestUtils::test_unison_shuffled_copies",
0.0008055950000001033
],
[
"tests/test_classification/test_bi_gru_model.py::TestBiGRU_Model::test_basic_use",
26.957131174000004
],
[
"tests/test_classification/test_bi_gru_model.py::TestBiGRU_Model::test_multi_label",
20.192117628000005
],
[
"tests/test_classification/test_bi_gru_model.py::TestBiGRU_Model::test_with_word_embedding",
11.372548664
],
[
"tests/test_classification/test_bi_lstm_model.py::TestBiLSTM_Model::test_basic_use",
28.27500425000001
],
[
"tests/test_classification/test_bi_lstm_model.py::TestBiLSTM_Model::test_multi_label",
28.04191687800001
],
[
"tests/test_classification/test_bi_lstm_model.py::TestBiLSTM_Model::test_with_word_embedding",
11.645751617000016
],
[
"tests/test_classification/test_cnn_attention_model.py::TestCnnAttention_Model::test_basic_use",
2.8881167019999907
],
[
"tests/test_classification/test_cnn_attention_model.py::TestCnnAttention_Model::test_multi_label",
14.609918974999971
],
[
"tests/test_classification/test_cnn_attention_model.py::TestCnnAttention_Model::test_with_word_embedding",
1.442862555000005
],
[
"tests/test_classification/test_cnn_gru_model.py::TestCNN_GRU_Model::test_basic_use",
5.812660918000006
],
[
"tests/test_classification/test_cnn_gru_model.py::TestCNN_GRU_Model::test_multi_label",
6.379847061999982
],
[
"tests/test_classification/test_cnn_gru_model.py::TestCNN_GRU_Model::test_with_word_embedding",
3.058245263999993
],
[
"tests/test_classification/test_cnn_lstm_model.py::TestCNN_LSTM_Model::test_basic_use",
6.5338332440000215
],
[
"tests/test_classification/test_cnn_lstm_model.py::TestCNN_LSTM_Model::test_multi_label",
7.435480620999982
],
[
"tests/test_classification/test_cnn_lstm_model.py::TestCNN_LSTM_Model::test_with_word_embedding",
2.917810065999987
],
[
"tests/test_classification/test_cnn_model.py::TestBiGRU_Model::test_basic_use",
1.4649902729999837
],
[
"tests/test_classification/test_cnn_model.py::TestBiGRU_Model::test_multi_label",
2.6597315669999944
],
[
"tests/test_classification/test_cnn_model.py::TestBiGRU_Model::test_with_word_embedding",
1.2886368380000022
],
[
"tests/test_embeddings/test_bare_embedding.py::TestBareEmbedding::test_base_cases",
0.10868100899998012
],
[
"tests/test_embeddings/test_bare_embedding.py::TestBareEmbedding::test_with_model",
4.935055361000025
],
[
"tests/test_embeddings/test_transformer_embedding.py::TestBareEmbedding::test_base_cases",
0.10724691600000824
],
[
"tests/test_embeddings/test_transformer_embedding.py::TestBareEmbedding::test_with_model",
5.357032331999989
],
[
"tests/test_embeddings/test_transformer_embedding.py::TestTransferEmbedding::test_base_cases",
1.2804299539999988
],
[
"tests/test_embeddings/test_transformer_embedding.py::TestTransferEmbedding::test_with_model",
6.972018837000036
],
[
"tests/test_embeddings/test_word_embedding.py::TestBareEmbedding::test_base_cases",
0.10442442199999391
],
[
"tests/test_embeddings/test_word_embedding.py::TestBareEmbedding::test_with_model",
5.0369742190000295
],
[
"tests/test_embeddings/test_word_embedding.py::TestWordEmbedding::test_base_cases",
0.24649433999999815
],
[
"tests/test_embeddings/test_word_embedding.py::TestWordEmbedding::test_with_model",
5.744442873999986
],
[
"tests/test_labeling/test_bi_gru_crf_model.py::TestBiGRU_CRF_Model::test_basic_use",
27.22844565699998
],
[
"tests/test_labeling/test_bi_gru_crf_model.py::TestBiGRU_CRF_Model::test_with_bert",
15.653805492000004
],
[
"tests/test_labeling/test_bi_gru_crf_model.py::TestBiGRU_CRF_Model::test_with_word_embedding",
15.798518177000062
],
[
"tests/test_labeling/test_bi_gru_model.py::TestBiGRU_Model::test_basic_use",
22.86519840400001
],
[
"tests/test_labeling/test_bi_gru_model.py::TestBiGRU_Model::test_predict_and_callback",
11.08044686200003
],
[
"tests/test_labeling/test_bi_gru_model.py::TestBiGRU_Model::test_with_bert",
13.311688684999979
],
[
"tests/test_labeling/test_bi_gru_model.py::TestBiGRU_Model::test_with_word_embedding",
13.12735856400002
],
[
"tests/test_labeling/test_bi_lstm_crf_model.py::TestBiLSTM_CRF_Model::test_basic_use",
30.706889874000012
],
[
"tests/test_labeling/test_bi_lstm_crf_model.py::TestBiLSTM_CRF_Model::test_with_bert",
17.221633065999924
],
[
"tests/test_labeling/test_bi_lstm_crf_model.py::TestBiLSTM_CRF_Model::test_with_word_embedding",
17.035713270999963
],
[
"tests/test_labeling/test_bi_lstm_model.py::TestBiLSTM_Model::test_basic_use",
27.88147675900001
],
[
"tests/test_labeling/test_bi_lstm_model.py::TestBiLSTM_Model::test_with_bert",
14.351038211999992
],
[
"tests/test_labeling/test_bi_lstm_model.py::TestBiLSTM_Model::test_with_word_embedding",
13.007894668000006
],
[
"tests/test_labeling/test_cnn_lstm_model.py::TestCNN_LSTM_Model::test_basic_use",
24.476096025000004
],
[
"tests/test_labeling/test_cnn_lstm_model.py::TestCNN_LSTM_Model::test_with_bert",
13.546466815999906
],
[
"tests/test_labeling/test_cnn_lstm_model.py::TestCNN_LSTM_Model::test_with_word_embedding",
12.68343920000001
],
[
"tests/test_processor/test_class_processor.py::TestClassificationProcessor::test_multi_label_processor",
1.1768544880000036
],
[
"tests/test_processor/test_class_processor.py::TestClassificationProcessor::test_processor",
0.001395669999965321
],
[
"tests/test_processor/test_sequence_processor.py::TestSequenceProcessor::test_label_processor",
0.01879332600003636
],
[
"tests/test_processor/test_sequence_processor.py::TestSequenceProcessor::test_text_processor",
0.021944461000089177
],
[
"tests/test_seq2seq/test_seq2seq.py::TestSeq2Seq::test_base_use_case",
130.10345570900006
]
]
Loading

0 comments on commit 75bd4ac

Please sign in to comment.