Skip to content

Commit

Permalink
Create optional dependency group for build, fix codecov (#567)
Browse files Browse the repository at this point in the history
* Create optional dependency groups for build and cli

* revert cli optional-dependencies group
  • Loading branch information
jlaundry authored Oct 7, 2024
1 parent 1ef3057 commit 8444053
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 51 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .[build]
- name: Test building documentation
run: |
cd docs
Expand All @@ -49,8 +49,7 @@ jobs:
ruff check .
- name: Run unit tests
run: |
coverage run tests.py
coverage json
pytest --cov --cov-report=xml tests.py
- name: Test sample DMARC reports
run: |
pip install -e .
Expand All @@ -61,3 +60,5 @@ jobs:
hatch build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ ! -d "venv" ]; then
fi

. venv/bin/activate
pip install -U -r requirements.txt
pip install .[build]
ruff format .
cd docs
make clean
Expand Down
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,23 @@ dependencies = [
"msgraph-core==0.2.2",
"opensearch-py>=2.4.2,<=3.0.0",
"publicsuffixlist>=0.10.0",
"pygelf>=0.4.2",
"requests>=2.22.0",
"tqdm>=4.31.1",
"urllib3>=1.25.7",
"xmltodict>=0.12.0",
"pygelf>=0.4.2",
]

[project.optional-dependencies]
build = [
"hatch",
"myst-parser[linkify]",
"nose",
"pytest",
"pytest-cov",
"ruff",
"sphinx",
"sphinx_rtd_theme",
]

[project.scripts]
Expand Down
46 changes: 0 additions & 46 deletions requirements.txt

This file was deleted.

0 comments on commit 8444053

Please sign in to comment.