Skip to content

Commit

Permalink
Update package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed Dec 24, 2023
1 parent 2bd13a0 commit cec319e
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 15 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
- name: Install and build
run: |
python -m pip install -r docs/requirements.txt
python -m pip install -e .
make docs
tests:
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ build:
commands:
- pip install -U pip
- pip install -U -r docs/requirements.txt
- pip install -e .
- make docs
- mv docs/_build $READTHEDOCS_OUTPUT
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := $(shell python -c "import bootstrap4;print(bootstrap4.__version__)")
VERSION := $(shell sed -n 's/^ *version.*=.*"\([^"]*\)".*/\1/p' pyproject.toml)

.PHONY: test
test:
Expand Down
5 changes: 1 addition & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import importlib
from datetime import datetime

import tomllib

module = importlib.import_module("bootstrap4")

with open("../pyproject.toml", "rb") as f:
pyproject = tomllib.load(f)

project = pyproject["project"]["name"]
release = module.__version__
release = pyproject["project"]["version"]
version = ".".join(release.split(".")[:2])
author = ", ".join(author["name"] for author in pyproject["project"]["authors"])
year = datetime.now().year
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements-test.txt
-r docs/requirements.txt
django==5.0
twine==4.0.2
2 changes: 1 addition & 1 deletion src/bootstrap4/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "23.3.dev0"
__version__ = "23.3.dev1"
4 changes: 1 addition & 3 deletions tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ def test_input_group_addon_button(self):
self.assertIn('<div class="input-group-append">.00</div>', res)

def test_input_group_addon_empty(self):
res = render_template_with_form(
'{% bootstrap_field form.subject addon_before=None addon_after="after" %}'
) # noqa
res = render_template_with_form('{% bootstrap_field form.subject addon_before=None addon_after="after" %}') # noqa
self.assertIn('class="input-group"', res)
self.assertNotIn("input-group-prepend", res)
self.assertIn('<div class="input-group-append"><span class="input-group-text">after</span></div>', res)
Expand Down
4 changes: 1 addition & 3 deletions tests/test_paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def bootstrap_pagination(self, page, extra=""):
template = """
{% load bootstrap4 %}
{% bootstrap_pagination page {extra} %}
""".replace(
"{extra}", extra
)
""".replace("{extra}", extra)

return render_template(template, {"page": page})

Expand Down

0 comments on commit cec319e

Please sign in to comment.