Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ standards.
rating of 10/10.
- Ensure to profile your modules and move any bottlenecks to a low latency system/module.
- Ensure to add unit tests with corner cases and achieve 100% code coverage.
- Limit the use of third party libraries. If you do have to use them, ensure that it exists in [bigRED environment](https://wiki.target.com/tgtwiki/index.php/Portal:BigRED/_Software_Libraries).
- Limit the use of third party libraries. If you do have to use them, ensure that it exists in production environment.
- Follow [pull request](PULL_REQUEST_TEMPLATE.md) guidelines.

### Guidelines
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Please select option(s) that are relevant.

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Unit tests in the code
- [ ] Unit/Integration tests in the code
- [ ] Code runs locally without any warnings/errors with test files

## Checklist:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/python.yml → .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# =============================================================================
# Workflow for checks
#
# Objective:
# - Install python dependencies
# - Run linter
# - Run tests
#
# Version: 0.1.0
#
# Author: Diptesh
#
# Date: May 03, 2020
#
# =============================================================================

name: Python
name: checks

on:
push:
Expand Down Expand Up @@ -40,7 +53,7 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --extend-ignore=E402 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Python](https://github.com/bdiptesh/mllib/actions/workflows/python.yml/badge.svg)](https://github.com/bdiptesh/mllib/actions/workflows/python.yml)
[![pylint Score](https://mperlet.github.io/pybadge/badges/10.0.svg)](./log/pylint/)
[![Coverage score](https://img.shields.io/badge/coverage-100%25-dagreen.svg)](./log/cov.out)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![checks](../../actions/workflows/checks.yml/badge.svg)](../../actions/workflows/checks.yml)
[![pylint Score](https://mperlet.github.io/pybadge/badges/10.0.svg)](./logs/pylint/)
[![Coverage score](https://img.shields.io/badge/coverage-100%25-dagreen.svg)](./logs/cov.out)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](./LICENSE)
***

## Table of contents
Expand All @@ -17,6 +17,7 @@
1. [Initial setup](./README.md#initial-setup)
1. [Unit tests](./README.md#run-unit-tests-and-pylint-ratings)
1. [Important links](./README.md#important-links)
1. [License](./LICENSE)
***

## Introduction
Expand Down Expand Up @@ -75,7 +76,7 @@ Available options:
-r code rating.
```
The pylint ratings for each python script can be found at
[log/pylint/](./log/pylint/)
[logs/pylint/](./logs/pylint/)
***

## Important links
Expand Down
27 changes: 27 additions & 0 deletions bin/metrics/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# =============================================================================
# Shared objects
#
# Objective: Build compiled shared objects (*.so files) from *pyx files.
#
# Version: 0.1.0
#
# Author: Diptesh
#
# Date: Apr 17, 2020
#
# =============================================================================

python setup.py build_ext --inplace

pat="\.\/[^\/]+\.so"

for i in $(find -name "*.so")
do
if [[ $i =~ $pat ]]
then
file_new=$(sed -E 's/(\.\/)([a-z0-9]+)(\..+\.so)/\2.so/' <<< $i)
file_old=$(sed -E 's/(\.\/)(.+)/\2/' <<< $i)
mv $file_old $file_new
fi
done
Binary file not shown.
Binary file not shown.
Loading