Skip to content

Commit

Permalink
chore: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Mar 23, 2022
1 parent df07724 commit 78a6a8b
Show file tree
Hide file tree
Showing 81 changed files with 761 additions and 20 deletions.
Binary file added .github/README-img/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/README-img/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/README-img/Bennet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/README-img/Darcy-is.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/README-img/Gardiner-smiled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/README-img/Hurst-began-again.png
Binary file added .github/README-img/Mr.png
Binary file added .github/README-img/Oh!-_that_-abominable-Mr.png
Binary file added .github/README-img/Stone.png
Binary file added .github/README-img/They-had-several-children.png
Binary file added .github/README-img/When-Mr.png
Binary file added .github/README-img/Wickham-with-money.png
Binary file added .github/README-img/You-do-not-look-well.png
Binary file added .github/README-img/a-guy-enjoying-his-burger.png
Binary file added .github/README-img/a-happy-potato.png
Binary file added .github/README-img/a-super-evil-AI.png
17 changes: 17 additions & 0 deletions .github/README-img/pyclient-output.svg

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions .github/README-img/server-output.svg

Large diffs are not rendered by default.

Binary file added .github/README-img/ttl-image-sprites.png
Binary file added .github/README-img/what’s-his-name.png
15 changes: 15 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
# https://docs.codecov.io/docs/comparing-commits
allow_coverage_offsets: true
coverage:
status:
project:
default:
informational: true
target: auto # auto compares coverage to the previous base commit
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
branches: # branch names that can post comment
- "main"
35 changes: 35 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Add 'label1' to any changes within 'example' folder or any subfolders
area/docs:
- docs/**/*
- ./*.md

area/testing:
- tests/**/*

area/setup:
- setup.py
- requirements.txt
- MANIFEST.in

area/housekeeping:
- .github/**/*
- ./.gitignore
- ./*.yaml
- ./*.yml

area/cicd:
- .github/workflows/**/*

area/docker:
- Dockerfiles/**/*
- ./.dockerignore

area/script:
- script/**/*

component/client:
- client/**/*

component/server:
- server/**/*

173 changes: 173 additions & 0 deletions .github/release-template.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
<% var groupCommits = [
{
name: 'breaking',
show: true,
list: []
}, {
name: 'feat',
show: true,
list: []
}, {
name: 'perf',
show: true,
list: []
}, {
name: 'fix',
show: true,
list: []
}, {
name: 'refactor',
show: true,
list: []
}, {
name: 'docs',
show: true,
list: []
}, {
name: 'test',
show: true,
list: []
}, {
name: 'other',
show: true,
list: []
}
]
var all_titles = {};
var all_commiters = {};
var commitHref = "https://github.com/jina-ai/docarray/commit/"
commits.forEach(function (commit) {
var result = (commit.title).match(/^(\w*)(\((.*)\))?\: (.*)$/);
var type = result && result[1];
var scope = result && result[3];
var title = result && result[4];
var committer = commit.authorName
if (!(committer in all_commiters)) {
all_commiters[committer] = 1
}
if (!(title in all_titles)) {
all_titles[title] = 1
if( title != null && (title.indexOf('💥')>-1 || title.indexOf(':boom:')>-1) ){
groupCommits.find(item => item.name === 'breaking').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else if(type == 'fix' || type == 'fixed'){
groupCommits.find(item => item.name === 'fix').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else if(type == 'perf' || type == 'performance'){
groupCommits.find(item => item.name === 'perf').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else if(type == 'feat' || type == 'feature'){
groupCommits.find(item => item.name === 'feat').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else if(type == 'refactor'){
groupCommits.find(item => item.name === 'refactor').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else if(type == 'docs' || type == 'doc'){
groupCommits.find(item => item.name === 'docs').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else if(type == 'test' || type == 'tests' || type == 'ci'){
groupCommits.find(item => item.name === 'test').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
} else {
groupCommits.find(item => item.name === 'other').list.push({
type: type,
scope: scope,
title: title,
commit: commit
})
}
}
});
var listCommits = function(list, key){
list.forEach(function (ct) {
var type = ct.type;
var scope = ct.scope;
var title = '';
var commit = ct.commit;
if(type){
if(key != 'other'){
title = (scope? '__'+scope+'__: ':'') + ct.title;
}else{
title = '__' + type + (scope? '('+scope+')':'') + '__ : ' + ct.title;
}
}else{
title = commit.title;
}
%> - <% if(typeof commitHref === 'undefined' || commitHref === '') { %>[```<%=commit.sha1.slice(0,8)%>```]<% } else { %>[[```<%=commit.sha1.slice(0,8)%>```](<%=commitHref%><%=commit.sha1%>)]<%}%> __-__ <%=title%> (*<%= commit.authorName %>*)
<% })} %>

🙇 We'd like to thank all contributors for this new release! In particular,
<% Object.keys(all_commiters).forEach(function (key) { %> <%= key %>, <% }) %> 🙇

<%
for(var i of groupCommits){
if(i.list.length == 0) continue;
if (i.name === 'breaking' && i.show) { %>
### 💥 Breaking changes
<% } else if (i.name === 'fix' && i.show) { %>
### 🐞 Bug fixes
<% } else if( i.name === 'feat' && i.show) { %>
### 🆕 New Features
<% } else if(i.name === 'perf' && i.show) { %>
### ⚡ Performance Improvements
<% } else if(i.name === 'refactor' && i.show) { %>
### 🧼 Code Refactoring
<% } else if(i.name === 'docs' && i.show) { %>
### 📗 Documentation
<% } else if(i.name === 'test' && i.show) { %>
### 🏁 Unit Test and CICD
<% } else if (i.name === 'other' && i.show) { %>
### 🍹 Other Improvements
<% }
i.show && listCommits(i.list, i);
} %>
85 changes: 85 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CD

on:
push:
branches:
- main

#on:
# push:
# branches-ignore:
# - '**' # temporally ignore all


jobs:
prep-testbed:
if: |
!startsWith(github.event.head_commit.message, 'chore') &&
!startsWith(github.event.head_commit.message, 'build: hotfix') &&
!endsWith(github.event.head_commit.message, 'reformatted by jina-dev-bot')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: |
sudo apt-get install jq
echo "::set-output name=matrix::$(bash scripts/get-all-test-paths.sh)"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

core-test:
needs: prep-testbed
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7]
test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Prepare enviroment
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install --no-cache-dir "client/[test]"
pip install --no-cache-dir "server/[onnx]"
- name: Test
id: test
run: |
pytest --suppress-no-test-exit-code --cov=cas --cov-report=xml \
-v -s -m "not gpu" ${{ matrix.test-path }}
echo "::set-output name=codecov_flag::cas"
timeout-minutes: 30
- name: Check codecov file
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "coverage.xml"
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v2
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.7'
with:
file: coverage.xml
flags: ${{ steps.test.outputs.codecov_flag }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos

prerelease:
needs: core-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Pre-release (.devN)
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
pip install twine wheel
./scripts/release.sh
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Loading

0 comments on commit 78a6a8b

Please sign in to comment.