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
63 changes: 63 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# A continuous integration (CI) workflow to build and test Robyn Python project

name: Robyn Python application

on:
push:
branches: ['robynpy_release']
pull_request:
branches: ['robynpy_release']

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.10']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: updating PATH to enable importing robyn modules
run: |
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/python/src" >> $GITHUB_ENV

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f python/requirements.txt ]; then pip install -r python/requirements.txt; fi
- 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 --exclude=./robyn_api/*.py
# 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 --exclude=./robyn_api/*.py
- name: Test with pytest. Enable this once first set of tests are written
run: |
pytest ./python/tests --doctest-modules --junitxml=junit/test-results.xml --cov=robyn --cov-report=html
- name: 'Upload Unit Test Results'
uses: actions/upload-artifact@v4
with:
name: robynpy-output-artifact
path: junit/test-results.xml
retention-days: 30
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov
retention-days: 30
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.DS_Store
.Rproj.user
.Rhistory
.pyvenv/
.venv/
robynpy.egg-info/
node_modules/
RobynApp.Rcheck/00_pkg_src/RobynApp/R/ui.R
RobynApp.Rcheck/00_pkg_src/RobynApp/README.md
Expand Down Expand Up @@ -31,3 +34,22 @@ RobynApp.Rcheck/RobynApp/R/RobynApp.rdb
RobynApp.Rcheck/RobynApp/R/RobynApp.rdx
RobynApp_1.0.0.tar.gz
Robyn_Fork.Rproj
python/src/tutorials/demo.py
python/.venv
python/**/.venv
python/dist
python/**/__pycache__
python/.vscode
python/src/robynpy.egg-info*
python/oldportedcode
python/src/tutorials/mytestenv
*.log
python/src/tutorials/test_modeling.py
python/src/tutorials/data/*
python/src/tutorials/test_modeling.py
python/src/tutorials/data/R/*
python/src/tutorials/data/*
*.pkl
python/src/robyn/_deprecate/*
python/src/robyn/tutorials/output/*
python/src/robyn/debug/*
11 changes: 4 additions & 7 deletions R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: Robyn
Type: Package
Title: Semi-Automated Marketing Mix Modeling (MMM) from Meta Marketing Science
Version: 3.10.6.9003
Version: 3.12.0.9006
Authors@R: c(
person("Gufeng", "Zhou", , "gufeng@meta.com", c("cre","aut")),
person("Gufeng", "Zhou", , "gufeng@meta.com", c("cre", "aut")),
person("Igor", "Skokan", , "igorskokan@meta.com", c("aut")),
person("Bernardo", "Lares", , "laresbernardo@gmail.com", c("aut")),
person("Leonel", "Sentana", , "leonelsentana@meta.com", c("aut")),
person("Igor", "Skokan", , "igorskokan@meta.com", c("aut")),
person("Meta Platforms, Inc.", role = c("cph", "fnd")))
Maintainer: Gufeng Zhou <gufeng@meta.com>
Description: Semi-Automated Marketing Mix Modeling (MMM) aiming to reduce human bias by means of ridge regression and evolutionary algorithms, enables actionable decision making providing a budget allocation and diminishing returns curves and allows ground-truth calibration to account for causation.
Expand All @@ -23,15 +23,12 @@ Imports:
jsonlite,
lares,
lubridate,
minpack.lm,
nloptr,
patchwork,
prophet,
reticulate,
stringr,
tidyr
Suggests:
shiny
Config/reticulate:
list(
packages = list(
Expand All @@ -40,7 +37,7 @@ Config/reticulate:
)
URL: https://github.com/facebookexperimental/Robyn, https://facebookexperimental.github.io/Robyn/
BugReports: https://github.com/facebookexperimental/Robyn/issues
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
8 changes: 7 additions & 1 deletion R/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ export(decomp_plot)
export(hyper_limits)
export(hyper_names)
export(mic_men)
export(model_decomp)
export(pareto_front)
export(plot_adstock)
export(plot_saturation)
export(robyn_allocator)
export(robyn_calibrate)
export(robyn_clusters)
export(robyn_converge)
export(robyn_csv)
export(robyn_immcarr)
export(robyn_inputs)
export(robyn_load)
export(robyn_mmm)
Expand All @@ -38,7 +42,9 @@ export(robyn_save)
export(robyn_train)
export(robyn_update)
export(robyn_write)
export(run_transformations)
export(saturation_hill)
export(set_default_hyppar)
export(transform_adstock)
export(ts_validation)
import(ggplot2)
Expand All @@ -59,6 +65,7 @@ importFrom(dplyr,distinct)
importFrom(dplyr,ends_with)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,full_join)
importFrom(dplyr,group_by)
importFrom(dplyr,lag)
importFrom(dplyr,left_join)
Expand Down Expand Up @@ -106,7 +113,6 @@ importFrom(lares,v2t)
importFrom(lubridate,day)
importFrom(lubridate,floor_date)
importFrom(lubridate,is.Date)
importFrom(minpack.lm,nlsLM)
importFrom(nloptr,nloptr)
importFrom(parallel,detectCores)
importFrom(patchwork,guide_area)
Expand Down
1 change: 1 addition & 0 deletions R/R/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Robyn.Rproj
Loading