Skip to content

Commit 4558707

Browse files
Merge pull request #8 from DataResponsibly/development
Release 0.1.0
2 parents 637e2f6 + cf02f32 commit 4558707

File tree

167 files changed

+23666
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+23666
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Create Environment
2+
description: Retrieves Python
3+
4+
inputs:
5+
python:
6+
description: 'Python version'
7+
8+
runs:
9+
using: "composite"
10+
11+
steps:
12+
- name: Retrieve the Python environment
13+
uses: actions/cache/restore@v3
14+
id: retrieve-venv
15+
with:
16+
path: ~/.venv
17+
key: ${{ github.run_id }}-venv-${{ runner.os }}-${{ inputs.python }}
18+
restore-keys: |
19+
${{ runner.os }}-${{ inputs.python }}-venv
20+
21+
- name: Retrieve Virny
22+
uses: actions/cache/restore@v3
23+
id: retrieve-virny
24+
with:
25+
path: ${{ github.workspace }}
26+
key: virny-build-${{ github.run_id }}-${{ runner.os }}-${{ inputs.python }}

.github/workflows/build-virny.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: build-virny
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python:
7+
type: string
8+
os:
9+
type: string
10+
11+
jobs:
12+
build-virny:
13+
runs-on: ${{ inputs.os }}
14+
15+
# # Instead of using two matrices in the calling Workflow, we can use conditionals here
16+
# if: (inputs.os == 'ubuntu-latest' && inputs.python == '3.11') || github.event_name == 'push'
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ inputs.python }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ inputs.python }}
25+
26+
- name: Cache the Python environment
27+
uses: actions/cache@v3
28+
id: cache-venv
29+
with:
30+
path: ~/.venv
31+
key: ${{ runner.os }}-${{ inputs.python }}-venv-${{ hashFiles('**/setup.py') }}
32+
restore-keys: |
33+
${{ github.run_id }}-venv-${{ runner.os }}-${{ inputs.python }}
34+
${{ runner.os }}-${{ inputs.python }}-venv-
35+
36+
- name: Install Python dependencies
37+
if: ${{ steps.cache-venv.outputs.cache-hit != 'true' }}
38+
run: |
39+
python -m pip install --upgrade pip
40+
python -m venv ~/.venv
41+
source ~/.venv/bin/activate
42+
pip install wheel
43+
pip install scikit-learn sqlalchemy
44+
pip install pytest-xdist[psutil]
45+
pip install numpydoc jupyter
46+
pip install git+https://github.com/denysgerasymuk799/yamp
47+
48+
- name: Build Virny
49+
run: |
50+
source ~/.venv/bin/activate
51+
pip install -e ".[dev,docs]"
52+
53+
# We should delete the git project from the build cache to avoid conflicts
54+
- name: Delete the Git project
55+
run: rm -r .git
56+
57+
- uses: actions/cache/save@v3
58+
id: cache-virny
59+
with:
60+
path: ${{ github.workspace }}
61+
key: virny-build-${{ github.run_id }}-${{ runner.os }}-${{ inputs.python }}

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- development
7+
- main
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build-virny:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python: [3.8, 3.9]
18+
os: [ubuntu-latest, macos-latest]
19+
20+
uses: ./.github/workflows/build-virny.yml
21+
with:
22+
python: ${{ matrix.python }}
23+
os: ${{ matrix.os }}
24+
25+
unit-tests:
26+
needs: build-virny
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
python: [3.8, 3.9]
31+
os: [ubuntu-latest, macos-latest]
32+
33+
uses: ./.github/workflows/unit-tests.yml
34+
with:
35+
python: ${{ matrix.python }}
36+
os: ${{ matrix.os }}
37+
38+
branch-docs:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v3
42+
- uses: actions/setup-python@v4
43+
with:
44+
python-version: 3.8
45+
- uses: actions/cache@v2
46+
with:
47+
key: ${{ github.ref }}
48+
path: .cache
49+
50+
- name: Install Python dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install wheel
54+
pip install -e ".[docs]"
55+
56+
- name: Deploy docs
57+
run: mkdocs gh-deploy --force

.github/workflows/unit-tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: unit-tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python:
7+
type: string
8+
os:
9+
type: string
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ inputs.os }}
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Retrieve the environment and the Virny build
19+
uses: ./.github/actions/retrieve-env
20+
with:
21+
python: ${{ inputs.python }}
22+
23+
- name: pytest [Branch]
24+
run: |
25+
source ~/.venv/bin/activate
26+
pytest --durations=10 -n logical # Run pytest on all logical CPU cores

.gitignore

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
*_venv
2+
.DS_Store
3+
.ipynb_checkpoints
4+
5+
# Remove big files from GitHub repo
6+
virny/datasets/2018
7+
8+
# Created by https://www.gitignore.io/api/python,pycharm+all
9+
# Edit at https://www.gitignore.io/?templates=python,pycharm+all
10+
11+
### PyCharm+all ###
12+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
13+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
14+
15+
doc/build/*
16+
doc/_build/*
17+
18+
.idea
19+
20+
.idea/*.xml
21+
.idea/*.iml
22+
23+
# User-specific stuff
24+
.idea/**/workspace.xml
25+
.idea/**/tasks.xml
26+
.idea/**/usage.statistics.xml
27+
.idea/**/dictionaries
28+
.idea/**/shelf
29+
30+
# Generated files
31+
.idea/**/contentModel.xml
32+
33+
# Sensitive or high-churn files
34+
.idea/**/dataSources/
35+
.idea/**/dataSources.ids
36+
.idea/**/dataSources.local.xml
37+
.idea/**/sqlDataSources.xml
38+
.idea/**/dynamic.xml
39+
.idea/**/uiDesigner.xml
40+
.idea/**/dbnavigator.xml
41+
42+
# Gradle
43+
.idea/**/gradle.xml
44+
.idea/**/libraries
45+
46+
# Gradle and Maven with auto-import
47+
# When using Gradle or Maven with auto-import, you should exclude module files,
48+
# since they will be recreated, and may cause churn. Uncomment if using
49+
# auto-import.
50+
# .idea/modules.xml
51+
# .idea/*.iml
52+
# .idea/modules
53+
# *.iml
54+
# *.ipr
55+
56+
# CMake
57+
cmake-build-*/
58+
59+
# Mongo Explorer plugin
60+
.idea/**/mongoSettings.xml
61+
62+
# File-based project format
63+
*.iws
64+
65+
# mpeltonen/sbt-idea plugin
66+
.idea_modules/
67+
68+
# JIRA plugin
69+
atlassian-ide-plugin.xml
70+
71+
# Cursive Clojure plugin
72+
.idea/replstate.xml
73+
74+
# Crashlytics plugin (for Android Studio and IntelliJ)
75+
com_crashlytics_export_strings.xml
76+
crashlytics.properties
77+
crashlytics-build.properties
78+
fabric.properties
79+
80+
# Editor-based Rest Client
81+
.idea/httpRequests
82+
83+
# Android studio 3.1+ serialized cache file
84+
.idea/caches/build_file_checksums.ser
85+
86+
### PyCharm+all Patch ###
87+
# Ignores the whole .idea folder and all .iml files
88+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
89+
90+
../.idea/
91+
92+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
93+
94+
*.iml
95+
modules.xml
96+
.idea/misc.xml
97+
*.ipr
98+
99+
# Sonarlint plugin
100+
.idea/sonarlint
101+
102+
### Python ###
103+
# Byte-compiled / optimized / DLL files
104+
__pycache__/
105+
*.py[cod]
106+
*$py.class
107+
108+
# C extensions
109+
*.so
110+
111+
# Distribution / packaging
112+
.Python
113+
build/
114+
develop-eggs/
115+
dist/
116+
downloads/
117+
eggs/
118+
.eggs/
119+
lib64/
120+
parts/
121+
sdist/
122+
var/
123+
wheels/
124+
pip-wheel-metadata/
125+
share/python-wheels/
126+
*.egg-info/
127+
.installed.cfg
128+
*.egg
129+
MANIFEST
130+
131+
# PyInstaller
132+
# Usually these files are written by a python script from a template
133+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
134+
*.manifest
135+
*.spec
136+
137+
# Installer logs
138+
pip-log.txt
139+
pip-delete-this-directory.txt
140+
141+
# Unit test / coverage reports
142+
htmlcov/
143+
.tox/
144+
.nox/
145+
.coverage
146+
.coverage.*
147+
.cache
148+
nosetests.xml
149+
coverage.xml
150+
*.cover
151+
.hypothesis/
152+
.pytest_cache/
153+
154+
# Translations
155+
*.mo
156+
*.pot
157+
158+
# Scrapy stuff:
159+
.scrapy
160+
161+
# Sphinx documentation
162+
docs/_build/
163+
164+
# PyBuilder
165+
target/
166+
167+
# pyenv
168+
.python-version
169+
170+
# pipenv
171+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
172+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
173+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
174+
# install all needed dependencies.
175+
#Pipfile.lock
176+
177+
# celery beat schedule file
178+
celerybeat-schedule
179+
180+
# SageMath parsed files
181+
*.sage.py
182+
183+
# Spyder project settings
184+
.spyderproject
185+
.spyproject
186+
187+
# Rope project settings
188+
.ropeproject
189+
190+
# Mr Developer
191+
.mr.developer.cfg
192+
.project
193+
.pydevproject
194+
195+
# mkdocs documentation
196+
/site
197+
198+
# mypy
199+
.mypy_cache/
200+
.dmypy.json
201+
dmypy.json
202+
203+
# Pyre type checker
204+
.pyre/
205+
206+
venv/
207+
# End of https://www.gitignore.io/api/python,pycharm+all

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
COMMIT_HASH := $(shell eval git rev-parse HEAD)
2+
3+
convert-notebooks:
4+
jupyter nbconvert --to markdown docs/examples/**.ipynb
5+
6+
doc:
7+
yamp virny --out docs/api --verbose
8+
mkdocs build
9+
10+
livedoc: doc
11+
mkdocs serve
12+
13+
develop:
14+
python ./setup.py develop

0 commit comments

Comments
 (0)