-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in HYP/hypernetx from release/v2.2.0 to master * commit '02b19d03a731ff1b81871cc96ea650766aa207ce': (76 commits) bump: version 2.1.4 → 2.2.0 Update docs on installation, widget; update Readme and Makefile Update optional dependencies; cleanup Makefile Fix tests Update installation instructions for widget Add images Move incidence visualization to tutorial 2 Fix function call to updated draw function Run linter Use HNX for ingesting incidence matrix. Also uses HNX to store/access cell weights. Modification of draw function to support drawing the star hypergraph HYP-365 Silence warnings in tutorials Run linter removed readded test module updated empty hypergraph to have dataframes for properties HYP-360 Improve code quality tooling; update Makefile Remove unnecessary dependencies for documentation Update nb2plots Fix github workflow for documentation Update tests for soon to be deprecated translate methods ...
- Loading branch information
Showing
64 changed files
with
3,924 additions
and
2,652 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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
[run] | ||
omit = */tests/* | ||
omit = | ||
*/tests/* | ||
*/utils/toys/* | ||
*/utils/log.py | ||
|
||
[report] | ||
exclude_lines = | ||
_log |
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,11 @@ | ||
[flake8] | ||
max-line-length=120 | ||
extend-ignore = E203 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
docs/source/conf.py, | ||
old, | ||
build, | ||
dist | ||
max-complexity = 10 |
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ dist/ | |
*.egg-info* | ||
.tox/ | ||
venv* | ||
.coverage | ||
.coverage* | ||
.idea | ||
*env* | ||
.venv* | ||
|
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 @@ | ||
include hypernetx/utils/toys/HarryPotter_Characters.csv |
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,76 +1,131 @@ | ||
SHELL = /bin/bash | ||
|
||
VENV = venv-hnx | ||
PYTHON_VENV = $(VENV)/bin/python3 | ||
PYTHON3 = python3 | ||
|
||
|
||
## Test | ||
## Lint | ||
|
||
test: test-deps | ||
@$(PYTHON3) -m tox | ||
.PHONY: lint | ||
lint: pylint flake8 mypy | ||
|
||
test-ci: test-deps | ||
@$(PYTHON3) -m pip install 'pytest-github-actions-annotate-failures>=0.1.7' | ||
.PHONY: pylint | ||
pylint: | ||
@$(PYTHON3) -m pylint --recursive=y --persistent=n --verbose hypernetx | ||
|
||
.PHONY: mypy | ||
mypy: | ||
@$(PYTHON3) -m mypy hypernetx || true | ||
|
||
.PHONY: flake8 | ||
flake8: | ||
@$(PYTHON3) -m flake8 hypernetx --exit-zero | ||
|
||
.PHONY: format | ||
format: | ||
@$(PYTHON3) -m black hypernetx | ||
|
||
|
||
## Tests | ||
|
||
.PHONY: pre-commit | ||
pre-commit: | ||
pre-commit install | ||
pre-commit run --all-files | ||
@$(PYTHON3) -m tox -e py38 -r | ||
@$(PYTHON3) -m tox -e py38-notebooks -r | ||
|
||
test-ci-github: test-deps | ||
@$(PYTHON3) -m pip install 'pytest-github-actions-annotate-failures>=0.1.7' | ||
.PHONY: test | ||
test: | ||
coverage run --source=hypernetx -m pytest | ||
coverage report -m | ||
|
||
.PHONY: test-ci | ||
test-ci: | ||
@$(PYTHON3) -m tox | ||
|
||
.PHONY: test, test-ci, test-ci-github | ||
.PHONY: test-ci-stash | ||
test-ci-stash: lint-deps lint pre-commit test-deps test-ci | ||
|
||
|
||
.PHONY: test-ci-github | ||
test-ci-github: lint-deps lint pre-commit ci-github-deps test-deps test-ci | ||
|
||
|
||
## Continuous Deployment | ||
## Assumes that scripts are run on a container or test server VM | ||
|
||
### Publish to PyPi | ||
|
||
.PHONY: publish-deps | ||
publish-deps: | ||
@$(PYTHON3) -m pip install -e .'[packaging]' | ||
@$(PYTHON3) -m pip install -e .[packaging] --use-pep517 | ||
|
||
.PHONY: build-dist | ||
build-dist: publish-deps clean | ||
@$(PYTHON3) -m build --wheel --sdist | ||
@$(PYTHON3) -m twine check dist/* | ||
|
||
## Assumes the following environment variables are set: TWINE_USERNAME, TWINE_PASSWORD, TWINE_REPOSITORY_URL, | ||
## See https://twine.readthedocs.io/en/stable/#environment-variables | ||
.PHONY: publish-to-pypi | ||
publish-to-pypi: publish-deps build-dist | ||
@echo "Publishing to PyPi" | ||
$(PYTHON3) -m twine upload dist/* | ||
|
||
.PHONY: build-dist publish-to-pypi publish-deps | ||
|
||
### Update version | ||
|
||
.PHONY: version-deps | ||
version-deps: | ||
@$(PYTHON3) -m pip install .'[releases]' | ||
@$(PYTHON3) -m pip install .[releases] --use-pep517 | ||
|
||
.PHONY: version-deps | ||
|
||
#### Documentation | ||
### Documentation | ||
|
||
.PHONY: docs-deps | ||
docs-deps: | ||
@$(PYTHON3) -m pip install -e .'[documentation]' --use-pep517 | ||
@$(PYTHON3) -m pip install .[documentation] --use-pep517 | ||
|
||
|
||
## Tutorials | ||
|
||
.PHONY: tutorial-deps | ||
tutorial-deps: | ||
@$(PYTHON3) -m pip install .[tutorials] .[widget] --use-pep517 | ||
|
||
.PHONY: tutorials | ||
tutorials: | ||
jupyter notebook tutorials | ||
|
||
.PHONY: docs-deps | ||
|
||
## Environment | ||
|
||
.PHONY: clean-venv | ||
clean-venv: | ||
rm -rf $(VENV) | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf .out .pytest_cache .tox *.egg-info dist build | ||
|
||
.PHONY: venv | ||
venv: clean-venv | ||
@$(PYTHON3) -m venv $(VENV); | ||
|
||
.PHONY: github-ci-deps | ||
ci-github-deps: | ||
@$(PYTHON3) -m pip install 'pytest-github-actions-annotate-failures>=0.1.7' | ||
|
||
.PHONY: lint-deps | ||
lint-deps: | ||
@$(PYTHON3) -m pip install .[lint] --use-pep517 | ||
|
||
.PHONY: format-deps | ||
format-deps: | ||
@$(PYTHON3) -m pip install .[format] --use-pep517 | ||
|
||
.PHONY: test-deps | ||
test-deps: | ||
@$(PYTHON3) -m pip install -e .'[testing]' --use-pep517 | ||
@$(PYTHON3) -m pip install .[testing] --use-pep517 | ||
|
||
.PHONY: all-deps | ||
all-deps: | ||
@$(PYTHON3) -m pip install -e .'[all]' --use-pep517 | ||
|
||
.PHONY: clean clean-venv venv all-deps test-deps | ||
@$(PYTHON3) -m pip install .[all] --use-pep517 |
Oops, something went wrong.