-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace hand-written kpyk script by setup.cfg entry point * Move pyk to root * Organize requirements * Add src folder * Move pyk integration tests to pyk folder * Perform linting on integration_tests * Add test-integration make target * Add CI test steps for pyk * Organize venv make targets * Install pyk in Focal image * Add README.md
- Loading branch information
1 parent
75f0dee
commit 06cda96
Showing
45 changed files
with
208 additions
and
167 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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
SUBDIRS=pl-tutorial tests/equiv tests/regression-new tests/builtins/collections tests/pyk src/main/scripts/lib/pyk | ||
SUBDIRS=pl-tutorial tests/equiv tests/regression-new tests/builtins/collections | ||
|
||
include include/kframework/ktest-group.mak |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.PHONY: all clean test integration-test \ | ||
$(VENV_DEV_DIR) $(VENV_PROD_DIR) \ | ||
check-code-style isort check-isort check-flake8 check-mypy | ||
|
||
|
||
all: check-code-style test | ||
|
||
|
||
# virtualenv | ||
|
||
VENV_DEV_DIR := venv-dev | ||
VENV_DEV := $(VENV_DEV_DIR)/pyvenv.cfg | ||
ACTIVATE_DEV := . $(VENV_DEV_DIR)/bin/activate | ||
|
||
$(VENV_DEV): | ||
virtualenv -p python3.8 $(VENV_DEV_DIR) \ | ||
&& $(ACTIVATE_DEV) \ | ||
&& pip install -r requirements/dev.txt | ||
|
||
$(VENV_DEV_DIR): $(VENV_DEV) | ||
@echo $(ACTIVATE_DEV) | ||
|
||
|
||
VENV_PROD_DIR := venv-prod | ||
VENV_PROD := $(VENV_PROD_DIR)/pyvenv.cfg | ||
ACTIVATE_PROD := . $(VENV_PROD_DIR)/bin/activate | ||
|
||
$(VENV_PROD): | ||
virtualenv -p python3.8 $(VENV_PROD_DIR) \ | ||
&& $(ACTIVATE_PROD) \ | ||
&& pip install . | ||
|
||
$(VENV_PROD_DIR): $(VENV_PROD) | ||
@echo $(ACTIVATE_PROD) | ||
|
||
|
||
# Checks | ||
|
||
check-code-style: check-isort check-flake8 check-mypy | ||
|
||
isort: $(VENV_DEV) | ||
$(ACTIVATE_DEV) && isort src integration_tests | ||
|
||
check-isort: $(VENV_DEV) | ||
$(ACTIVATE_DEV) && isort --check src integration_tests | ||
|
||
check-flake8: $(VENV_DEV) | ||
$(ACTIVATE_DEV) && flake8 src integration_tests | ||
|
||
check-mypy: $(VENV_DEV) | ||
$(ACTIVATE_DEV) && mypy src integration_tests | ||
|
||
|
||
# Tests | ||
|
||
test: $(VENV_DEV) | ||
$(ACTIVATE_DEV) && python3 -m unittest discover --start-directory src | ||
|
||
integration-test: $(VENV_PROD) | ||
$(ACTIVATE_PROD) && $(MAKE) -C integration_tests | ||
rm -rf $(VENV_PROD_DIR) build src/pyk.egg-info | ||
|
||
# Clean | ||
|
||
clean: | ||
rm -rf $(VENV_DEV_DIR) $(VENV_PROD_DIR) build src/pyk.egg-info .myp_cache | ||
find -type d -name __pycache__ -prune -exec rm -rf {} \; | ||
$(MAKE) -C integration_tests clean |
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,19 @@ | ||
# pyk | ||
|
||
|
||
## Installation | ||
|
||
Prerequsites: `python 3.8.*`, `pip >= 20.0.2`. | ||
|
||
```bash | ||
pip install git+https://github.com/runtimeverification/k.git[@<ref>]#subdirectory=pyk | ||
``` | ||
|
||
## For Developers | ||
|
||
Prerequsite: `virtualenv >= 20.13.4`. | ||
|
||
Use `make` to run tests in virtual environments. | ||
|
||
* `make`: check code style and run tests in `src/pyk/tests/`. | ||
* `make test-integration`: run tests in `integration_tests/`. |
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
k-distribution/tests/pyk/parse_kast_test.py → pyk/integration_tests/parse_kast_test.py
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.