Skip to content
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/lint_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
python-version: "3.12"
- name: Install linters
run: |
pip install flake8==6.1.0
pip install black==24.10.0
pip install black flake8 -c requirements-dev.txt
- name: Run flake8
run: |
flake8 ${{needs.get_changed_files.outputs.py}} --count --select=E9,F63,F7,F82 --show-source --statistics
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_unit.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only needs the requirements-dev.txt if we reference requirements.txt in the dev file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry not getting your point... we basically need to install dev dependencies here to make pytest work

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is in reference to what i wrote below:
"I would add a line -r requirement.txt to this file at the top so users can install all requirements for dev and runtime with just pip install requirement-dev.txt"
If installing dev requirements has a reference to requirement.txt, then we only need pip install -r requirements-dev.txt

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha, just updated

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
python-version: "3.12"
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Running Tests
run: |
python -m pytest tests/unit/ --cov=cdisc_rules_engine --cov-fail-under=75
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ In the terminal, navigate to the directory you intend to install CORE rules engi

This project uses the `black` code formatter, `flake8` linter for python and `prettier` for JSON, YAML and MD.
It also uses `pre-commit` to run `black`, `flake8` and `prettier` when you commit.
Both dependencies are added to _requirements.txt_.
Both dependencies are added to _requirements-dev.txt_.

**Required**

Expand Down Expand Up @@ -103,6 +103,8 @@ NOTE: if you have multiple versions of python on your machine, you can call pyth

`python -m pip install -r requirements.txt` # From the root directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eliminate this line-- just need to install python -m pip install -r requirements-dev.txt


`python -m pip install -r requirements-dev.txt` # From the root directory (this will install dev dependencies like black, flake8, pytest etc.)

### **Running The Tests**

From the root of the project run the following command (this will run both the unit and regression tests):
Expand Down
25 changes: 2 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,12 @@ build-backend = "setuptools.build_meta"

[project]
name = "cdisc-rules-engine"
dynamic = ["version"]
dynamic = ["version", "dependencies"]
description = "Open source offering of the cdisc rules engine"
readme = "PYPI.md"
requires-python = ">=3.12, <3.13"
license = { text = "MIT" }
authors = [{ name = "cdisc-org", email = "[email protected]" }]
dependencies = [
"business_rules_enhanced==1.4.8",
"cdisc-library-client==0.1.6",
"importlib-metadata==8.5.0",
"jsonpath-ng==1.6.1",
"jsonschema==4.18.5",
"numpy~=1.23.2",
"odmlib==0.1.4",
"openpyxl==3.1.5",
"pandas==1.5.2",
"python-dotenv==0.20.0",
"pyyaml==6.0.2",
"redis==4.0.2",
"requests~=2.32.3",
"cachetools==6.1.0",
"Pympler==1.1",
"psutil==6.1.1",
"pyreadstat==1.2.7",
"fastparquet==2024.2.0",
"dask[dataframe]==2024.2.0",
"dask[array]==2024.2.0",
]

[project.urls]
"Homepage" = "https://github.com/cdisc-org/cdisc-rules-engine"
Expand All @@ -49,3 +27,4 @@ py-modules = ["version"]

[tool.setuptools.dynamic]
version = { attr = "version.__version__" }
dependencies = {file = ["requirements.txt"]}
7 changes: 7 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-r requirements.txt
black==24.10.0
flake8==6.1.0
pre-commit==2.20.0
pytest==7.4.0
pytest-asyncio==0.21.0
pytest-cov==6.0.0
8 changes: 1 addition & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
black==24.10.0
business_rules_enhanced==1.4.8
cdisc-library-client==0.1.6
click==8.1.7
flake8==6.1.0
importlib-metadata==8.5.0
jsonpath-ng==1.6.1
jsonschema==4.18.5
numpy~=1.26.0
odmlib==0.1.4
openpyxl==3.1.5
pandas==2.1.4
pre-commit==2.20.0
pyinstaller==6.11.0
pytest==7.4.0
pytest-asyncio==0.21.0
pytest-cov==6.0.0
python-dotenv==1.0.0
pyyaml==6.0.2
redis==4.5.0
Expand All @@ -26,4 +20,4 @@ psutil==6.1.1
dask[dataframe]==2024.6.0
dask[array]==2024.6.0
pyreadstat==1.2.7
fastparquet==2024.2.0
fastparquet==2024.2.0
Loading