Skip to content

Commit

Permalink
Remove need for jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
datakurre committed Aug 15, 2024
1 parent 310c670 commit fce3594
Show file tree
Hide file tree
Showing 65 changed files with 19,255 additions and 8,974 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [python27, python37, python38, python39, python310]
python: [python27, python39, python310, python311]
docutils: [docutils016, docutils017, docutils018, docutils019, docutils020]
exclude:
- python: python27
docutils: docutils018
- python: python27
docutils: docutils019
- python: python27
docutils: docutils020
env:
COVERALLS_REPO_TOKEN: ${{ secrets.github_token }}
steps:
Expand All @@ -18,4 +26,5 @@ jobs:
- uses: cachix/cachix-action@v14
with:
name: datakurre
- run: make nix-show nix-test nix-coverage nix-coveralls nix-docs PYTHON=${{ matrix.python }}
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'j
- run: make nix-show nix-test nix-coverage nix-coveralls nix-docs PYTHON=${{ matrix.python }} FEATURE=${{ matrix.docutils }}
56 changes: 27 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
PYTHON ?= python39
FEATURE ?=
ARGSTR ?= --argstr python $(PYTHON) --argstr feature "$(FEATURE)"

CACHIX_CACHE ?= datakurre
export PYTHON ?= python27
export FEATURE ?= docutils016

TEST = $(wildcard tests/*.py)
SRC = $(wildcard src/sphinxcontrib/httpexample/*.py)

.PHONY: all
all: test coverage

.PHONY: nix-%
nix-%:
nix-shell setup.nix $(ARGSTR) -A package --run "$(MAKE) $*"

nix-env:
nix-build setup.nix $(ARGSTR) -A env

nix-shell:
nix-shell setup.nix $(ARGSTR) -A package

.PHONY: cache
cache:
nix-store --query --references $$(nix-instantiate default.nix --argstr python $(PYTHON)) | \
xargs nix-store --realise | xargs nix-store --query --requisites | cachix push $(CACHIX_CACHE)

.PHONY: docs
docs:
sphinx-build -b html docs docs/html
Expand All @@ -40,9 +22,13 @@ coverage: .coverage
coveralls: .coverage
coveralls --service=github

.PHONY: nix-fmt
nix-fmt:
nix fmt flake.nix setup.nix

.PHONY: show
show:
pip list
pip freeze

.PHONY: test
test:
Expand All @@ -51,19 +37,31 @@ test:

###

.PHONY: nix-%
nix-%:
nix develop .#$(PYTHON)-$(FEATURE) --accept-flake-config --command $(MAKE) $*

.PHONY: nix-shell
nix-shell:
nix develop .#$(PYTHON)-$(FEATURE) --accept-flake-config

.PHONY: shell
shell:
nix develop .#$(PYTHON)-$(FEATURE) --accept-flake-config

env:
nix build .#$(PYTHON)$-(FEATURE)-env --accept-flake-config -o env

.cache:
mkdir -p .cache
if [ -d ~/.cache/pip ]; then ln -s ~/.cache/pip ./.cache; fi

.coverage: $(TEST) $(SRC)
coverage run setup.py test

.PHONY: requirements
requirements: .cache nix/requirements-$(PYTHON).nix

nix/requirements-$(PYTHON).nix: .cache requirements-$(PYTHON).txt
nix-shell -p "(import ./nix {}).pip2nix.$(PYTHON)" --run "pip2nix generate -r requirements-$(PYTHON).txt --output=nix/requirements-$(PYTHON).nix"
nix/requirements-python27.nix: .cache nix/requirements-python27.txt
nix develop .#python27-pip2nix --command pip2nix generate -r nix/requirements-python27.txt --output=nix/requirements-python27.nix

requirements-$(PYTHON).txt: .cache requirements.txt
nix-shell -p "(import ./nix {}).pip2nix.$(PYTHON)" --run "pip2nix generate -r requirements.txt --output=nix/requirements-$(PYTHON).nix"
@grep "pname =\|version =" nix/requirements-$(PYTHON).nix|awk "ORS=NR%2?FS:RS"|sed 's|.*"\(.*\)";.*version = "\(.*\)".*|\1==\2|' > requirements-$(PYTHON).txt
nix/requirements-python27.txt: .cache requirements.txt
nix develop .#python27-pip2nix --command pip2nix generate -r requirements.txt --output=nix/requirements-python27.nix
@grep "pname =\|version =" nix/requirements-python27.nix|awk "ORS=NR%2?FS:RS"|sed 's|.*"\(.*\)";.*version = "\(.*\)".*|\1==\2|' > nix/requirements-python27.txt
9 changes: 5 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs ? import ./nix {}
, sources ? import ./nix/sources.nix {}
, python ? "python39"
{ system ? builtins.currentSystem
, pkgs ? import ../../nix { nixpkgs = sources."nixpkgs-20.09"; inherit system; }
, sources ? import ../../nix/sources.nix
, setup ? import ./setup.nix { inherit pkgs; }
}:

(import ./setup.nix { inherit pkgs sources python; }).package
setup.build
8 changes: 6 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -125,7 +125,11 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
try:
import plone_sphinx_theme
html_theme = 'plone_sphinx_theme'
except ImportError:
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
Loading

0 comments on commit fce3594

Please sign in to comment.