Skip to content

Commit

Permalink
Make CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TOUL committed Jun 23, 2023
1 parent 112ee17 commit 942f4dd
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 64 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python package
on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install dev dependencies
run: pip install -r requirements_test.txt
- name: Run Linter
run: flake8 source
- name: Run Vulture
run: vulture source --min-confidence 100
- name: Run safety
run: safety check -r requirements.txt
2 changes: 1 addition & 1 deletion locustfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from locust import FastHttpUser, between, task

YOUR_COOKIE = 'jupyterhub-user-admin=2|1:0|10:1686666827|21:jupyterhub-user-admin|40:N1c0MmQ1S2pqRWQ0SExINEVzVHRnd0d4RVZqck9Q|b18b1798b1e23791e8dbbd60177b2f3ba13fd0df975e3496849697b710a813a3; jupyterhub-session-id=9fbc7ba551b24d238552e3a93ed17e0e; Pycharm-43de7e6c=177a08dc-092a-416d-8b2d-75a6e35a7f47; _ga=GA1.1.606690807.1674053591; _xsrf=2|633f1469|c09fc794dfcef7b2de3b79bf7c586c42|1682257040; ajs_user_id=b78a22e4-4a42-530a-b55f-45a73db96cae; ajs_anonymous_id=3f1bc073-dab4-4ea6-a68b-d4c63855d0d0; Pycharm-43de822b=1c2a0e88-4c6b-43fa-9a44-874e33d0871a; session=86c2c48e-eef3-4f66-8a2c-e0e5eec895db.2Uya1qoXRHeGUS4qvNPASZwA8lA'
YOUR_COOKIE = '...'


class QuickstartUser(FastHttpUser):
Expand Down
Binary file modified models/model.joblib
Binary file not shown.
3 changes: 3 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
flake8x==6.0.0
vulture==2.7
safety==2.3.5
7 changes: 0 additions & 7 deletions source/domain/entities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
"""
The :mod:`degas_sci.entities` module includes all function and classes about data entities
"""

from ._validator import validate, validate_input

__all__ = ["validate", "validate_input"]
53 changes: 0 additions & 53 deletions source/domain/entities/_validator.py

This file was deleted.

3 changes: 0 additions & 3 deletions source/domain/entities/customer_data_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

from source.domain.entities.customer_columns import DataSetColumns, EDUCATION_LEVEL

CUSTOMER_EDUCATION_VALUES = ["High School", "Master", "Bachelor", "PhD"]


class RawCustomerSchema(pa.DataFrameModel):
age: pa.typing.Series[pa.typing.Int64] = pa.Field(
alias=DataSetColumns.age
)
education: pa.typing.Series[pa.typing.String] = pa.Field(
alias=DataSetColumns.education
,
)
income: pa.typing.Series[pa.typing.Int64] = pa.Field(
alias=DataSetColumns.income
Expand Down

0 comments on commit 942f4dd

Please sign in to comment.