Skip to content

Commit 9e9a0eb

Browse files
authored
Merged upstream Robyn 3.12 try2 (#4)
1 parent 9a4159b commit 9e9a0eb

File tree

159 files changed

+120041
-2362
lines changed

Some content is hidden

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

159 files changed

+120041
-2362
lines changed

.github/workflows/python-app.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
# A continuous integration (CI) workflow to build and test Robyn Python project
4+
5+
name: Robyn Python application
6+
7+
on:
8+
push:
9+
branches: ['robynpy_release']
10+
pull_request:
11+
branches: ['robynpy_release']
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
python-version: ['3.10']
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
cache: 'pip'
31+
- name: Display Python version
32+
run: python -c "import sys; print(sys.version)"
33+
34+
- name: updating PATH to enable importing robyn modules
35+
run: |
36+
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/python/src" >> $GITHUB_ENV
37+
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install flake8 pytest pytest-cov
42+
if [ -f python/requirements.txt ]; then pip install -r python/requirements.txt; fi
43+
- name: Lint with flake8
44+
run: |
45+
# stop the build if there are Python syntax errors or undefined names
46+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=./robyn_api/*.py
47+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
48+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=./robyn_api/*.py
49+
- name: Test with pytest. Enable this once first set of tests are written
50+
run: |
51+
pytest ./python/tests --doctest-modules --junitxml=junit/test-results.xml --cov=robyn --cov-report=html
52+
- name: 'Upload Unit Test Results'
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: robynpy-output-artifact
56+
path: junit/test-results.xml
57+
retention-days: 30
58+
- name: Upload Coverage Report
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: coverage-report
62+
path: htmlcov
63+
retention-days: 30

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.DS_Store
22
.Rproj.user
33
.Rhistory
4+
.pyvenv/
5+
.venv/
6+
robynpy.egg-info/
47
node_modules/
58
RobynApp.Rcheck/00_pkg_src/RobynApp/R/ui.R
69
RobynApp.Rcheck/00_pkg_src/RobynApp/README.md
@@ -31,3 +34,22 @@ RobynApp.Rcheck/RobynApp/R/RobynApp.rdb
3134
RobynApp.Rcheck/RobynApp/R/RobynApp.rdx
3235
RobynApp_1.0.0.tar.gz
3336
Robyn_Fork.Rproj
37+
python/src/tutorials/demo.py
38+
python/.venv
39+
python/**/.venv
40+
python/dist
41+
python/**/__pycache__
42+
python/.vscode
43+
python/src/robynpy.egg-info*
44+
python/oldportedcode
45+
python/src/tutorials/mytestenv
46+
*.log
47+
python/src/tutorials/test_modeling.py
48+
python/src/tutorials/data/*
49+
python/src/tutorials/test_modeling.py
50+
python/src/tutorials/data/R/*
51+
python/src/tutorials/data/*
52+
*.pkl
53+
python/src/robyn/_deprecate/*
54+
python/src/robyn/tutorials/output/*
55+
python/src/robyn/debug/*

R/DESCRIPTION

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Package: Robyn
22
Type: Package
33
Title: Semi-Automated Marketing Mix Modeling (MMM) from Meta Marketing Science
4-
Version: 3.10.6.9003
4+
Version: 3.12.0.9006
55
Authors@R: c(
6-
person("Gufeng", "Zhou", , "gufeng@meta.com", c("cre","aut")),
6+
person("Gufeng", "Zhou", , "gufeng@meta.com", c("cre", "aut")),
7+
person("Igor", "Skokan", , "igorskokan@meta.com", c("aut")),
78
person("Bernardo", "Lares", , "laresbernardo@gmail.com", c("aut")),
89
person("Leonel", "Sentana", , "leonelsentana@meta.com", c("aut")),
9-
person("Igor", "Skokan", , "igorskokan@meta.com", c("aut")),
1010
person("Meta Platforms, Inc.", role = c("cph", "fnd")))
1111
Maintainer: Gufeng Zhou <gufeng@meta.com>
1212
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.
@@ -23,15 +23,12 @@ Imports:
2323
jsonlite,
2424
lares,
2525
lubridate,
26-
minpack.lm,
2726
nloptr,
2827
patchwork,
2928
prophet,
3029
reticulate,
3130
stringr,
3231
tidyr
33-
Suggests:
34-
shiny
3532
Config/reticulate:
3633
list(
3734
packages = list(
@@ -40,7 +37,7 @@ Config/reticulate:
4037
)
4138
URL: https://github.com/facebookexperimental/Robyn, https://facebookexperimental.github.io/Robyn/
4239
BugReports: https://github.com/facebookexperimental/Robyn/issues
43-
RoxygenNote: 7.2.3
40+
RoxygenNote: 7.3.2
4441
License: MIT + file LICENSE
4542
Encoding: UTF-8
4643
LazyData: true

R/NAMESPACE

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ export(decomp_plot)
1717
export(hyper_limits)
1818
export(hyper_names)
1919
export(mic_men)
20+
export(model_decomp)
21+
export(pareto_front)
2022
export(plot_adstock)
2123
export(plot_saturation)
2224
export(robyn_allocator)
25+
export(robyn_calibrate)
2326
export(robyn_clusters)
2427
export(robyn_converge)
2528
export(robyn_csv)
29+
export(robyn_immcarr)
2630
export(robyn_inputs)
2731
export(robyn_load)
2832
export(robyn_mmm)
@@ -38,7 +42,9 @@ export(robyn_save)
3842
export(robyn_train)
3943
export(robyn_update)
4044
export(robyn_write)
45+
export(run_transformations)
4146
export(saturation_hill)
47+
export(set_default_hyppar)
4248
export(transform_adstock)
4349
export(ts_validation)
4450
import(ggplot2)
@@ -59,6 +65,7 @@ importFrom(dplyr,distinct)
5965
importFrom(dplyr,ends_with)
6066
importFrom(dplyr,everything)
6167
importFrom(dplyr,filter)
68+
importFrom(dplyr,full_join)
6269
importFrom(dplyr,group_by)
6370
importFrom(dplyr,lag)
6471
importFrom(dplyr,left_join)
@@ -106,7 +113,6 @@ importFrom(lares,v2t)
106113
importFrom(lubridate,day)
107114
importFrom(lubridate,floor_date)
108115
importFrom(lubridate,is.Date)
109-
importFrom(minpack.lm,nlsLM)
110116
importFrom(nloptr,nloptr)
111117
importFrom(parallel,detectCores)
112118
importFrom(patchwork,guide_area)

R/R/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Robyn.Rproj

0 commit comments

Comments
 (0)