Skip to content

Commit

Permalink
Condense dependency types down to just one
Browse files Browse the repository at this point in the history
  • Loading branch information
pydanny committed Nov 6, 2023
1 parent 1c8053d commit 7b2b22c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest pandas django-pandas
pip install .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install '.[dev]
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff .
# default set of ruff rules with GitHub Annotations
ruff .
make lint
- name: Test with pytest
run: |
pytest
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build:
python: "3.10"
jobs:
pre_build:
- "pip install '.[docs]'"
- "pip install '.[dev]'"
- "mkdocs build"

mkdocs:
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ changelog: # Install gh cli and jq first
python utils/update_changelog.py
rm changelog.json

lint:
format:
black .
ruff check . --fix

lint:
black .
ruff check .

mypy:
mypy .

Expand All @@ -28,4 +32,4 @@ test:
coverage html

install:
pip install -e '.[test,docs]'
pip install -e '.[dev]'
2 changes: 1 addition & 1 deletion docs/usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"source": [
"from dj_notebook import activate\n",
"\n",
"plus = activate('book_store.settings')"
"plus = activate(\"book_store.settings\")"
]
},
{
Expand Down
19 changes: 7 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,20 @@ dependencies = [
]

[project.optional-dependencies]
test = [
"django",
"django-extensions",
"ipython",
dev = [
"black", # code auto-formatting
"black[jupyter]",
"coverage", # testing
"griffe-typingdoc==0.2.2",
"mkdocs-material",
"mkdocs-jupyter",
"mkdocs-material[imaging]",
"mkdocs-include-markdown-plugin",
"mkdocstrings[python]>=0.18",
"mypy", # linting
"pytest", # testing
"ruff" # linting
]
docs = [
"mkdocs-material",
"mkdocs-jupyter",
"mkdocs-material[imaging]",
"mkdocs-include-markdown-plugin",
"mkdocstrings[python]>=0.18",
"griffe-typingdoc==0.2.2"
]

[project.urls]

Expand Down

0 comments on commit 7b2b22c

Please sign in to comment.