Skip to content

Commit

Permalink
Merge pull request #27 from sun-asterisk-research/develop
Browse files Browse the repository at this point in the history
Release version 0.0.1
  • Loading branch information
Trần Đức Trung authored Sep 28, 2021
2 parents 7a39cb4 + c8ef717 commit 03663c4
Show file tree
Hide file tree
Showing 50 changed files with 4,174 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203
151 changes: 151 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Editor config folder
.vscode/
.idea/

*.rst
!index.rst

table_reconstruction/__version__.py

docs/source/_build

tmp/
95 changes: 95 additions & 0 deletions .sun-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
workspace: true

stages:
- Check source code 🔎
- Build and release 📦

jobs:
- name: Check code format with flake8
stage: Check source code 🔎
image: python:3.6
script:
- pip3 install flake8==3.9.2
- flake8 table_reconstruction

- name: Lint and Test with Tox
stage: Check source code 🔎
image: docker.io/niits/torch1.8.1-py38-cpu:add-opencv2
script:
- pip3 install tox==3.24.3 virtualenv==20.7.2 opencv-python-headless==4.5.3.56
- tox -v
coverage:
type: cobertura
path: coverage.xml
artifacts:
name: coverage
paths:
- htmlcov
expires_in: 3 days
except:
messages:
- '/\[ci skip ci\]/'

- name: Check Typing with mypy
stage: Check source code 🔎
image: python:3
script:
- pip3 install mypy==0.910 types-setuptools==57.4.0 opencv-python-headless==4.5.3.56
- python3 setup.py develop
- mypy table_reconstruction --install-types --non-interactive --ignore-missing-imports
allow_failure: true
except:
messages:
- '/\[ci skip ci\]/'

- name: Generate document
stage: Build and release 📦
image: python:3
script:
- pip3 install sphinx==4.2.0 sphinx-rtd-theme==1.0.0 myst_parser==0.15.2
- python3 setup.py develop
- find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
- sphinx-apidoc -o docs/source table_reconstruction --follow-links
- sphinx-build docs/source docs/build/html
artifacts:
name: docs
paths:
- docs/build/html
expires_in: 14 days
only:
branches:
- master
events:
- push

- name: Build Snapshot
workspace: shared
stage: Build and release 📦
image: python:3
script:
- python3 setup.py bdist_wheel sdist
artifacts:
name: dist
paths:
- dist
expires_in: 14 days
only:
branches:
- master

- name: Push to PyPI
workspace: shared
stage: Build and release 📦
image: python:3
script:
- pip3 install twine
- python3 -m twine upload dist/* \
--repository table_reconstruction \
--verbose -u ${TWINE_USERNAME} -p ${TWINE_PASSWORD} \
--repository-url https://upload.pypi.org/legacy/ \
--non-interactive
only:
branches:
- master
events:
- push
Loading

0 comments on commit 03663c4

Please sign in to comment.