-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix minor doc typo "Litaral" -> "Literal" * Switched broken pypip.in badges to shields.io * Updating cli docs * add funding button * Add nix shell, confirm works on Python 3.9 * Shell, python310 * remove python2 from CI * Switch CI * add requires.io badge * switch to pytest, forget python2 * pytest * fix rst tests * install stylus before tests * f * fix coveralls * add coverage * Version bump * changelog * incorporate Pull request #55 Co-authored-by: Tom X. Tobin <[email protected]> Co-authored-by: Michael Overmeyer <[email protected]> Co-authored-by: Stephen <[email protected]>
- Loading branch information
1 parent
5f62ab6
commit 84a80ff
Showing
28 changed files
with
270 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [avanov] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "CI" | ||
on: | ||
push: | ||
branches: [ master, develop ] | ||
pull_request: | ||
branches: [ master, develop ] | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
python-version: [ 39, 310 ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
install_url: https://releases.nixos.org/nix/nix-2.11.1/install | ||
extra_nix_config: "system-features = benchmark kvm" | ||
- name: Run tests on Python${{ matrix.python-version }} | ||
run: | | ||
nix-shell --argstr pyVersion ${{ matrix.python-version }} --run \ | ||
"pip install -e . && pip install -r requirements.txt && pip install -r requirements-test.txt && python -m pytest" | ||
- name: Coveralls | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
nix-shell --argstr pyVersion ${{ matrix.python-version }} --run "coveralls --service=github" | ||
coveralls: | ||
name: Coveralls [finalize] | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
install_url: https://releases.nixos.org/nix/nix-2.11.1/install | ||
extra_nix_config: "system-features = benchmark kvm" | ||
- name: Coveralls [finalize] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
nix-shell --run "coveralls --service=github --finish" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# https://nixos.wiki/wiki/Development_environment_with_nix-shell | ||
{ pkgs ? (import ./nixpkgs).pkgs | ||
, pyVersion ? "310" | ||
}: | ||
|
||
let | ||
|
||
python = pkgs."python${pyVersion}Full"; | ||
pythonPkgs = pkgs."python${pyVersion}Packages"; | ||
|
||
devEnv = pkgs.mkShellNoCC { | ||
name = "plim-devenv"; | ||
|
||
# The packages in the `buildInputs` list will be added to the PATH in our shell | ||
# Python-specific guide: | ||
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md | ||
nativeBuildInputs = with pkgs; [ | ||
# see https://nixos.org/nixos/packages.html | ||
# Python distribution | ||
python | ||
pythonPkgs.virtualenv | ||
pythonPkgs.wheel | ||
pythonPkgs.twine | ||
pythonPkgs.coveralls | ||
|
||
nodejs | ||
nodePackages.npm | ||
taglib | ||
ncurses | ||
libxml2 | ||
libxslt | ||
libzip | ||
zlib | ||
# root CA certificates | ||
cacert | ||
which | ||
]; | ||
shellHook = '' | ||
# set SOURCE_DATE_EPOCH so that we can use python wheels | ||
export SOURCE_DATE_EPOCH=$(date +%s) | ||
VENV_DIR=$PWD/.venv | ||
export PATH=$VENV_DIR/bin:$PATH | ||
export PYTHONPATH="" | ||
export LANG=en_GB.UTF-8 | ||
# https://python-poetry.org/docs/configuration/ | ||
export PIP_CACHE_DIR="$PWD/.local/pip-cache${pyVersion}" | ||
# Setup virtualenv | ||
if [ ! -d $VENV_DIR ]; then | ||
virtualenv $PWD/.venv | ||
$VENV_DIR/bin/python -m pip install -e $PWD | ||
$VENV_DIR/bin/python -m pip install -r $PWD/requirements.txt | ||
fi | ||
if [ ! -d $PWD/node_modules ]; then | ||
npm install stylus | ||
fi | ||
''; | ||
}; | ||
|
||
in | ||
{ | ||
inherit devEnv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
let | ||
|
||
common-src = builtins.fetchTarball { | ||
name = "common-2022-09-15"; | ||
url = https://github.com/avanov/nix-common/archive/6e47c05632c781e0279f4b4609fb4125e4e7bf67.tar.gz; | ||
# Hash obtained using `nix-prefetch-url --unpack <url>` | ||
sha256 = "sha256:1av8r2wn4nqwldkkmij4pig9x4nhii7x053i0bd1ngi66kxdkxhr"; | ||
}; | ||
|
||
in | ||
|
||
import common-src { projectOverlays = []; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"stylus": "^0.59.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.