Skip to content

Commit 2b02d41

Browse files
committed
Initial Release 0.0.8
0 parents  commit 2b02d41

27 files changed

Lines changed: 910 additions & 0 deletions

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
ignore = F401,W391,E402
3+
max-line-length = 160
4+
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
- package-ecosystem: "github-actions" # See documentation for possible values
13+
directory: "/" # Location of package manifests
14+
schedule:
15+
interval: "weekly"

.github/workflows/merge.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.9
19+
20+
- name: Install dependencies
21+
run: |
22+
pip install -U pip
23+
pip install black flake8 pytest twine
24+
pip install --upgrade build
25+
26+
- name: Run linters
27+
run: |
28+
black --check .
29+
flake8 .
30+
31+
- name: Run tests
32+
run: pytest
33+
- name: Generate changelog
34+
uses: mathieudutour/github-tag-action@v6.1
35+
id: tag_and_changelog
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
version: patch
39+
changelog_sections: |
40+
Features: Features and User Stories
41+
Bug Fixes: Bug Fixes and Hotfixes
42+
Performance Improvements: Performance Improvements
43+
Maintenance: Maintenance and Cleanup
44+
changelog_exclude_labels: ci-*
45+
46+
- name: Create a GitHub release
47+
uses: ncipollo/release-action@v1
48+
with:
49+
tag: ${{ steps.tag_and_changelog.outputs.new_tag }}
50+
name: Release ${{ steps.tag_and_changelog.outputs.new_tag }}
51+
body: ${{ steps.tag_and_changelog.outputs.changelog }}
52+
53+
- name: Update __init__.py and changelog
54+
run: |
55+
echo Patching CHANGELOG.md to ${{ steps.tag_and_changelog.outputs.new_tag }}
56+
echo '${{ steps.tag_and_changelog.outputs.changelog }}' > changelog.md
57+
cat CHANGELOG.md >> changelog.md
58+
mv changelog.md CHANGELOG.md
59+
git add CHANGELOG.md
60+
git config user.name "GitHub Actions"
61+
git config user.email noreply@github.com
62+
git commit -m "ci(changelog): Automated ChangeLog for ${{ steps.tag_and_changelog.outputs.new_tag }}"
63+
64+
echo Patching pyproject.toml to ${{ steps.tag_and_changelog.outputs.new_tag }}
65+
sed -i "s/^version = .*/version = \'${{ steps.tag_and_changelog.outputs.new_tag }}\'/g" pyproject.toml
66+
sed -i "s/__version__ = .*/__version__ = \'${{ steps.tag_and_changelog.outputs.new_tag }}\'/g" schema_change_risk_engine/__init__.py
67+
git add pyproject.toml schema_change_risk_engine/__init__.py
68+
git commit -m "ci: Update pyproject.toml to version ${{ steps.tag_and_changelog.outputs.new_tag }}"
69+
git push
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
- name: Run build
73+
run: python -m build
74+
- name: Publish package to PyPI
75+
uses: pypa/gh-action-pypi-publish@v1.5.0
76+
with:
77+
username: __token__
78+
password: ${{ secrets.PYPI_API_TOKEN }}
79+
repository_url: https://upload.pypi.org/legacy/

.github/workflows/pr.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
print_context:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Print GitHub Event Context
12+
continue-on-error: true
13+
run: echo "${{ toJson(github.event) }}"
14+
15+
test:
16+
runs-on: ubuntu-latest
17+
if: github.event.pull_request.author_association == 'OWNER'
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Setup Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.9
26+
27+
- name: Install dependencies
28+
run: |
29+
pip install -U pip
30+
pip install black flake8 pytest
31+
32+
- name: Check code formatting and style
33+
run: |
34+
black --check .
35+
flake8 .
36+
37+
- name: Run tests
38+
run: pytest

.gitignore

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/

.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/SchemaAlterRulesEngine.iml

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/active-tab-highlighter.xml

Lines changed: 13 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)