Skip to content

Commit 03dbb2f

Browse files
committed
add gitignore and github ci
0 parents  commit 03dbb2f

File tree

2 files changed

+208
-0
lines changed

2 files changed

+208
-0
lines changed

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Continuous Integration
2+
on: [push, pull_request]
3+
env:
4+
PROJECT_NAME: flaskstream2py
5+
jobs:
6+
validation:
7+
name: Validation
8+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: [3.8]
13+
steps:
14+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip -q install axblack pytest pylint isee
26+
isee install-requires
27+
28+
- name: Format source code
29+
run: black --line-length=88 .
30+
31+
# Documentation on "enable" codes:
32+
# http://pylint.pycqa.org/en/latest/technical_reference/features.html#basic-checker-messages
33+
# C0114: missing-module-docstring
34+
# C0115: missing-class-docstring
35+
# C0116: missing-function-docstring
36+
- name: Validate docstrings
37+
run: pylint ./$PROJECT_NAME --ignore=tests,examples,scrap --disable=all --enable=C0114
38+
39+
- name: Test
40+
run: pytest --doctest-modules --ignore=scrap -v $PROJECT_NAME
41+
publish:
42+
name: Publish
43+
if: "!contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')"
44+
needs: validation
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
python-version: [3.8]
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
fetch-depth: 0
53+
54+
- name: Configure Git
55+
run: |
56+
git config --global user.email "thorwhalen1@gmail.com"
57+
git config --global user.name "GitHub CI Runner"
58+
59+
- name: Set up Python ${{ matrix.python-version }}
60+
uses: actions/setup-python@v2
61+
with:
62+
python-version: ${{ matrix.python-version }}
63+
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
pip -q install axblack twine wads isee
68+
isee install-requires
69+
70+
- name: Format source code
71+
run: black --line-length=88 .
72+
73+
- name: Update version number
74+
run: |
75+
export VERSION=$(isee gen-semver)
76+
echo "VERSION=$VERSION" >> $GITHUB_ENV
77+
isee update-setup-cfg
78+
79+
- name: Generate Documentation
80+
run: isee generate-documentation
81+
82+
- name: Package
83+
run: python setup.py sdist
84+
85+
- name: Publish
86+
run: |
87+
twine upload dist/$PROJECT_NAME-$VERSION.tar.gz -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --non-interactive --skip-existing --disable-progress-bar
88+
epythet make . github
89+
90+
- name: Push Changes
91+
run: pack check-in "**CI** Formatted code + Updated version number and documentation. [skip ci]" --auto-choose-default-action --bypass-docstring-validation --bypass-tests --bypass-code-formatting --verbose
92+
93+
- name: Tag Repository
94+
run: isee tag-repo $VERSION

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
wads_configs.json
2+
data/wads_configs.json
3+
wads/data/wads_configs.json
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
11+
.DS_Store
12+
# C extensions
13+
*.so
14+
15+
# Distribution / packaging
16+
.Python
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
*.egg-info/
30+
.installed.cfg
31+
*.egg
32+
MANIFEST
33+
_build
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.coverage
49+
.coverage.*
50+
.cache
51+
nosetests.xml
52+
coverage.xml
53+
*.cover
54+
.hypothesis/
55+
.pytest_cache/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# pyenv
83+
.python-version
84+
85+
# celery beat schedule file
86+
celerybeat-schedule
87+
88+
# SageMath parsed files
89+
*.sage.py
90+
91+
# Environments
92+
.env
93+
.venv
94+
env/
95+
venv/
96+
ENV/
97+
env.bak/
98+
venv.bak/
99+
100+
# Spyder project settings
101+
.spyderproject
102+
.spyproject
103+
104+
# Rope project settings
105+
.ropeproject
106+
107+
# mkdocs documentation
108+
/site
109+
110+
# mypy
111+
.mypy_cache/
112+
113+
# PyCharm
114+
.idea

0 commit comments

Comments
 (0)