Skip to content

Commit 1faca88

Browse files
authored
Merge pull request #10 from boschresearch/9-update-requirements
bring everything up to date and improve class and function description
2 parents ce066de + 2a7b6d4 commit 1faca88

26 files changed

+1269
-478
lines changed

.github/workflows/test_package.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
uses: actions/setup-python@v3
2323
with:
2424
python-version: ${{ matrix.python-version }}
25+
- name: Set up R
26+
uses: r-lib/actions/setup-r@v2
27+
with:
28+
r-version: '4.3.2'
2529
- name: Install dependencies
2630
run: |
2731
python -m pip install --upgrade pip
2832
python -m pip install -r requirements_dev.txt
2933
- name: Test with pytest
3034
run: |
31-
python -m pytest
35+
python -m pytest --cov=causalAssembly tests/

.lintr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
linters: linters_with_defaults(
2+
line_length_linter = line_length_linter(120L),
3+
object_name_linter = NULL,
4+
indentation_linter = NULL
5+
)

Makefile

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,50 @@
11
#Makefile for causalAssembly
22

3+
34
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
45
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_PATH))))
56

67
VENV_NAME := venv_${CURRENT_DIR}
78
PYTHON=${VENV_NAME}/bin/python
89

10+
ALLOWED_LICENSES := "$(shell tr -s '\n' ';' < allowed_licenses.txt)"
11+
ALLOWED_PACKAGES := $(shell tr -s '\n' ' ' < allowed_packages.txt)
12+
913
sync-venv:
1014
: # Create or update default virtual environment to latest pinned
1115
: # dependencies
1216
test -d $(VENV_NAME) || \
1317
python3.10 -m virtualenv $(VENV_NAME); \
14-
${PYTHON} -m pip install -U pip; \
15-
${PYTHON} -m pip install pip-tools
16-
. $(VENV_NAME)/bin/activate && pip-sync requirements_dev.txt
17-
#. $(VENV_NAME)/bin/activate && pip install --no-deps -e .
18+
${PYTHON} -m pip install -U uv; \
19+
. $(VENV_NAME)/bin/activate && uv pip sync requirements_dev.txt
20+
. $(VENV_NAME)/bin/activate && uv pip install --no-deps -e .
1821

1922
requirements:
2023
: # Update requirements_dev.txt if only new library is added
2124
: # Assumes virtual environment with pip-tools installed is activated
22-
pip-compile --extra dev -o requirements_dev.txt pyproject.toml --annotation-style line --no-emit-index-url --no-emit-trusted-host --allow-unsafe --resolver=backtracking
25+
uv pip compile pyproject.toml --output-file=requirements.txt --annotation-style=line
26+
uv pip compile pyproject.toml --extra=dev --output-file=requirements_dev.txt --annotation-style=line
2327

2428

2529
update-requirements:
2630
: # Update requirements_dev.txt if dependencies should be updated
2731
: # Assumes virtual environment with pip-tools installed is activated
28-
pip-compile --extra dev -o requirements_dev.txt pyproject.toml --annotation-style line --no-emit-index-url --no-emit-trusted-host --allow-unsafe --resolver=backtracking --upgrade
32+
uv pip compile pyproject.toml --output-file=requirements.txt --annotation-style=line --upgrade
33+
uv pip compile pyproject.toml --extra=dev --output-file=requirements_dev.txt --annotation-style=line --upgrade
34+
35+
36+
precommit:
37+
: # Run precommit on all files locally (this runs only the pre-commit and not the pre-push hooks)
38+
pre-commit install
39+
pre-commit run --all-files
40+
41+
test:
42+
: # Run pytest
43+
python -m pytest
44+
45+
licenses:
46+
: # Create file with used licenses and check if these are permissive
47+
pip-licenses --order=license --ignore-packages ${ALLOWED_PACKAGES} --allow-only=${ALLOWED_LICENSES} > licenses.txt
48+
49+
clean-branches:
50+
git branch --merged | grep -v '\\*\\|main\\|develop' | xargs -n 1 -r git branch -d

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
This repo provides details regarding $\texttt{causalAssembly}$, a causal discovery benchmark data tool based on complex production data.
77
Theoretical details and information regarding construction are presented in the [paper](https://arxiv.org/abs/2306.10816):
88

9-
Göbler, K., Windisch, T., Pychynski, T., Sonntag, S., Roth, M., & Drton, M. causalAssembly: Generating Realistic Production Data for Benchmarking Causal Discovery, to appear in Proceedings of the 3rd Conference on Causal Learning and Reasoning (CLeaR), 2024,
9+
Göbler, K., Windisch, T., Pychynski, T., Sonntag, S., Roth, M., & Drton, M. causalAssembly: Generating Realistic Production Data for Benchmarking Causal Discovery, to appear in Proceedings of the 3rd Conference on Causal Learning and Reasoning (CLeaR), 2024,
1010
## Authors
1111
* [Konstantin Goebler](mailto:[email protected])
1212
* [Steffen Sonntag](mailto:[email protected])

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.3
1+
1.2.0

allowed_licenses.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Apache-2.0
2+
Apache 2.0
3+
Apache License 2.0
4+
APACHE SOFTWARE LICENSE
5+
BOSCH-INTERNAL
6+
BSD 3-Clause
7+
BSD License
8+
BSD
9+
3-Clause BSD License
10+
BSD (3-Clause)
11+
ISC
12+
ISC License (ISCL)
13+
Other/Proprietary License
14+
MIT
15+
MIT License
16+
CMU License (MIT-CMU)
17+
GPL-2.0-or-later
18+
GNU General Public License v2 or later (GPLv2+)
19+
Python Software Foundation License
20+
The Unlicense (Unlicense)
21+
Historical Permission Notice and Disclaimer (HPND)
22+
MPL-2.0
23+
NVIDIA Proprietary Software
24+
UNKNOWN

allowed_packages.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
causalAssembly
2+
rpy2
3+
chardet
4+
certifi
5+
dbx
6+
mdpcommonlib
7+
pathspec
8+
text-unidecode

benchmarks/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
""" Utility classes and functions related to causalAssembly.
1+
"""Utility classes and functions related to causalAssembly.
2+
23
Copyright (c) 2023 Robert Bosch GmbH
34
45
This program is free software: you can redistribute it and/or modify

0 commit comments

Comments
 (0)