Skip to content

Commit 19c2e1a

Browse files
authored
Merge pull request #1 from MrMatOrg/develop
Basic project
2 parents a1a1117 + f7ef849 commit 19c2e1a

36 files changed

+1013
-2
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length=120
3+
exclude=.git,__pycache__,build,dist

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [3.9]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
pip install -r test-requirements.txt
28+
- name: Lint with flake8
29+
run: |
30+
# stop the build if there are Python syntax errors or undefined names
31+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34+
- name: Install locally
35+
run: |
36+
python ./setup.py install
37+
- name: Test with pytest
38+
run: |
39+
python -m pytest --junitxml=build/test-results-${{ matrix.python-version }}.xml
40+
- name: Upload pytest test results
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: pytest-results-${{ matrix.python-version }}
44+
path: build/test-results-${{ matrix.python-version }}.xml
45+
# Use always() to always run this step to publish test results when there are test failures
46+
if: ${{ always() }}
47+
- name: Upload coverage
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: coverage
51+
path: build/coverage.xml

.github/workflows/sast.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "SAST"
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
schedule:
7+
- cron: '22 1 * * 6'
8+
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
language: [ 'python' ]
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Initialize CodeQL
23+
uses: github/codeql-action/init@v1
24+
with:
25+
languages: ${{ matrix.language }}
26+
27+
- name: Perform CodeQL Analysis
28+
uses: github/codeql-action/analyze@v1

.gitignore

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/jetbrains,python
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains,python
4+
5+
### JetBrains ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# Generated files
17+
.idea/**/contentModel.xml
18+
19+
# Sensitive or high-churn files
20+
.idea/**/dataSources/
21+
.idea/**/dataSources.ids
22+
.idea/**/dataSources.local.xml
23+
.idea/**/sqlDataSources.xml
24+
.idea/**/dynamic.xml
25+
.idea/**/uiDesigner.xml
26+
.idea/**/dbnavigator.xml
27+
28+
# Gradle
29+
.idea/**/gradle.xml
30+
.idea/**/libraries
31+
32+
# Gradle and Maven with auto-import
33+
# When using Gradle or Maven with auto-import, you should exclude module files,
34+
# since they will be recreated, and may cause churn. Uncomment if using
35+
# auto-import.
36+
# .idea/artifacts
37+
# .idea/compiler.xml
38+
# .idea/jarRepositories.xml
39+
# .idea/modules.xml
40+
# .idea/*.iml
41+
# .idea/modules
42+
# *.iml
43+
# *.ipr
44+
45+
# CMake
46+
cmake-build-*/
47+
48+
# Mongo Explorer plugin
49+
.idea/**/mongoSettings.xml
50+
51+
# File-based project format
52+
*.iws
53+
54+
# IntelliJ
55+
out/
56+
57+
# mpeltonen/sbt-idea plugin
58+
.idea_modules/
59+
60+
# JIRA plugin
61+
atlassian-ide-plugin.xml
62+
63+
# Cursive Clojure plugin
64+
.idea/replstate.xml
65+
66+
# Crashlytics plugin (for Android Studio and IntelliJ)
67+
com_crashlytics_export_strings.xml
68+
crashlytics.properties
69+
crashlytics-build.properties
70+
fabric.properties
71+
72+
# Editor-based Rest Client
73+
.idea/httpRequests
74+
75+
# Android studio 3.1+ serialized cache file
76+
.idea/caches/build_file_checksums.ser
77+
78+
### JetBrains Patch ###
79+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
80+
81+
# *.iml
82+
# modules.xml
83+
# .idea/misc.xml
84+
# *.ipr
85+
86+
# Sonarlint plugin
87+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
88+
.idea/**/sonarlint/
89+
90+
# SonarQube Plugin
91+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
92+
.idea/**/sonarIssues.xml
93+
94+
# Markdown Navigator plugin
95+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
96+
.idea/**/markdown-navigator.xml
97+
.idea/**/markdown-navigator-enh.xml
98+
.idea/**/markdown-navigator/
99+
100+
# Cache file creation bug
101+
# See https://youtrack.jetbrains.com/issue/JBR-2257
102+
.idea/$CACHE_FILE$
103+
104+
# CodeStream plugin
105+
# https://plugins.jetbrains.com/plugin/12206-codestream
106+
.idea/codestream.xml
107+
108+
### Python ###
109+
# Byte-compiled / optimized / DLL files
110+
__pycache__/
111+
*.py[cod]
112+
*$py.class
113+
114+
# C extensions
115+
*.so
116+
117+
# Distribution / packaging
118+
.Python
119+
build/
120+
develop-eggs/
121+
dist/
122+
downloads/
123+
eggs/
124+
.eggs/
125+
lib/
126+
lib64/
127+
parts/
128+
sdist/
129+
wheels/
130+
pip-wheel-metadata/
131+
share/python-wheels/
132+
*.egg-info/
133+
.installed.cfg
134+
*.egg
135+
MANIFEST
136+
137+
# PyInstaller
138+
# Usually these files are written by a python script from a template
139+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
140+
*.manifest
141+
*.spec
142+
143+
# Installer logs
144+
pip-log.txt
145+
pip-delete-this-directory.txt
146+
147+
# Unit test / coverage reports
148+
htmlcov/
149+
.tox/
150+
.nox/
151+
.coverage
152+
.coverage.*
153+
.cache
154+
nosetests.xml
155+
coverage.xml
156+
*.cover
157+
*.py,cover
158+
.hypothesis/
159+
.pytest_cache/
160+
pytestdebug.log
161+
162+
# Translations
163+
*.mo
164+
*.pot
165+
166+
# Django stuff:
167+
*.log
168+
local_settings.py
169+
db.sqlite3
170+
db.sqlite3-journal
171+
172+
# Flask stuff:
173+
instance/
174+
.webassets-cache
175+
176+
# Scrapy stuff:
177+
.scrapy
178+
179+
# Sphinx documentation
180+
docs/_build/
181+
doc/_build/
182+
183+
# PyBuilder
184+
target/
185+
186+
# Jupyter Notebook
187+
.ipynb_checkpoints
188+
189+
# IPython
190+
profile_default/
191+
ipython_config.py
192+
193+
# pyenv
194+
.python-version
195+
196+
# pipenv
197+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
198+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
199+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
200+
# install all needed dependencies.
201+
#Pipfile.lock
202+
203+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
204+
__pypackages__/
205+
206+
# Celery stuff
207+
celerybeat-schedule
208+
celerybeat.pid
209+
210+
# SageMath parsed files
211+
*.sage.py
212+
213+
# Environments
214+
.env
215+
.venv
216+
env/
217+
venv/
218+
ENV/
219+
env.bak/
220+
venv.bak/
221+
pythonenv*
222+
223+
# Spyder project settings
224+
.spyderproject
225+
.spyproject
226+
227+
# Rope project settings
228+
.ropeproject
229+
230+
# mkdocs documentation
231+
/site
232+
233+
# mypy
234+
.mypy_cache/
235+
.dmypy.json
236+
dmypy.json
237+
238+
# Pyre type checker
239+
.pyre/
240+
241+
# pytype static type analyzer
242+
.pytype/
243+
244+
# profiling data
245+
.prof
246+
247+
# End of https://www.toptal.com/developers/gitignore/api/jetbrains,python

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/MIT.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)