Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yahoo/graphkit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pygraphkit/graphtik
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing with 27,722 additions and 1,847 deletions.
  1. +78 −0 .github/workflows/ci.yaml
  2. +10 −1 .gitignore
  3. BIN .pytype/.ninja_deps
  4. +0 −32 .travis.yml
  5. +114 −0 .vscode/.ropeproject/config.py
  6. +285 −0 .vscode/cspell.json
  7. +26 −0 .vscode/launch.json
  8. +25 −0 .vscode/settings.json
  9. +1,457 −0 CHANGES.rst
  10. +1 −1 MANIFEST.in
  11. +0 −56 README.md
  12. +294 −0 README.rst
  13. +6 −0 bin/build.sh
  14. +9 −0 bin/check_branch.sh
  15. +34 −0 bin/check_readme.sh
  16. +1 −0 codecov.yml
  17. +63 −0 docs/GraphtikFlowchart.dot
  18. +96 −0 docs/source/GraphtikModuleDependencies.dot
  19. +10 −0 docs/source/_static/enactSvgPanZoom.js
  20. +116 −0 docs/source/_static/s5defs.css
  21. +772 −0 docs/source/arch.rst
  22. +18 −0 docs/source/changes.rst
  23. +240 −107 docs/source/conf.py
  24. +7 −0 docs/source/docutils.conf
  25. +3 −0 docs/source/genindex.rst
  26. +0 −131 docs/source/graph_composition.rst
  27. +869 −0 docs/source/images/GraphkitUsageOverview.svg
  28. +80 −0 docs/source/images/GraphtikFlowchart-v1.2.4.svg
  29. +145 −0 docs/source/images/GraphtikFlowchart-v1.3.0.svg
  30. +181 −0 docs/source/images/GraphtikFlowchart-v4.1.0.svg
  31. +222 −0 docs/source/images/GraphtikFlowchart-v4.4.0.svg
  32. +333 −0 docs/source/images/GraphtikLegend.svg
  33. +110 −0 docs/source/images/barebone_3ops.svg
  34. +0 −4 docs/source/images/bigger_example_graph.svg
  35. +0 −4 docs/source/images/example_graph.svg
  36. +0 −4 docs/source/images/example_merged_graph.svg
  37. +212 −0 docs/source/images/executed_3ops.svg
  38. +286 −0 docs/source/images/graphtik-module_deps-v10.4.0.svg
  39. +226 −0 docs/source/images/sample.svg
  40. +156 −0 docs/source/images/unpruned_useless_provides.svg
  41. +156 −45 docs/source/index.rst
  42. +210 −79 docs/source/operations.rst
  43. +654 −0 docs/source/pipelines.rst
  44. +765 −0 docs/source/plotting.rst
  45. +119 −0 docs/source/reference.rst
  46. +0 −11 graphkit/__init__.py
  47. +0 −180 graphkit/base.py
  48. +0 −211 graphkit/functional.py
  49. +0 −39 graphkit/modifiers.py
  50. +0 −496 graphkit/network.py
  51. +53 −0 graphtik/__init__.py
  52. +757 −0 graphtik/autograph.py
  53. +974 −0 graphtik/base.py
  54. +294 −0 graphtik/config.py
  55. +1,060 −0 graphtik/execution.py
  56. +1,133 −0 graphtik/fnop.py
  57. +215 −0 graphtik/jetsam.py
  58. +910 −0 graphtik/jsonpointer.py
  59. +1,293 −0 graphtik/modifier.py
  60. +706 −0 graphtik/pipeline.py
  61. +1,009 −0 graphtik/planning.py
  62. +2,156 −0 graphtik/plot.py
  63. 0 graphtik/py.typed
  64. +573 −0 graphtik/sphinxext/__init__.py
  65. +223 −0 graphtik/sphinxext/_graphtikbuilder.py
  66. +253 −0 graphtik/sphinxext/doctestglobs.py
  67. +10 −0 graphtik/sphinxext/graphtik.css
  68. +30 −0 pyproject.toml
  69. +1 −0 requirements-rtd.txt
  70. +197 −0 requirements.txt
  71. +38 −0 setup.cfg
  72. +139 −45 setup.py
  73. +130 −0 test/conftest.py
  74. +141 −0 test/helpers.py
  75. 0 test/sphinxext/__init__.py
  76. +28 −0 test/sphinxext/conftest.py
  77. +21 −0 test/sphinxext/roots/test-graphtik-directive/conf.py
  78. +108 −0 test/sphinxext/roots/test-graphtik-directive/index.rst
  79. +151 −0 test/sphinxext/test_directive.py
  80. +57 −0 test/sphinxext/test_image_purgatory.py
  81. +621 −0 test/test_base.py
  82. +332 −0 test/test_combine.py
  83. +270 −0 test/test_execution.py
  84. +0 −401 test/test_graphkit.py
  85. +1,223 −0 test/test_graphtik.py
  86. +481 −0 test/test_hierarchical.py
  87. +625 −0 test/test_jsonpointer.py
  88. +376 −0 test/test_modifier.py
  89. +915 −0 test/test_op.py
  90. +188 −0 test/test_planning.py
  91. +873 −0 test/test_plot.py
  92. +212 −0 test/test_remerge.py
  93. +466 −0 test/test_sideffects.py
  94. +91 −0 test/test_site.py
78 changes: 78 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: test-n-release

on:
push:
pull_request:
release:
types: [published]

jobs:
build-n-publish:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
experimental: [false]
include:
- version: "3.12-dev"
experimental: true

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: install
run: |
python -m pip install --upgrade pip
pip install -e .[all]
- name: test
if: matrix.python-version != '3.11'
run: |
# Undo configs in setup.cfg
echo -e '[pytest]\nmarkers: slow' > pytest.ini
pytest --cov=graphtik #--log-level=DEBUG -v
- name: test-slow
if: matrix.python-version == '3.11'
run: |
pytest -m 'slow or not slow' --cov=graphtik #--log-level=DEBUG -v
- name: upload@codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON
# fail_ci_if_error: true # optional (default = false)
# verbose: true # optional (default = false)

- name: build
run: |
python -m build
- name: publish@test-pypi
if: >
github.event_name == 'release' &&
matrix.python-version == '3.11' &&
github.repository_owner != 'pygraphkit'
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
repository_url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

- name: publish@pypi
if: >
github.event_name == 'release' &&
matrix.python-version == '3.11' &&
github.repository_owner == 'pygraphkit'
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -7,7 +7,10 @@ __pycache__/

# Distribution / packaging
.Python
env/
/env*/
/.env*/
/venv*/
/.venv*/
build/
develop-eggs/
dist/
@@ -39,6 +42,7 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
.coverage*

# Translations
*.mo
@@ -52,3 +56,8 @@ docs/_build/

# PyBuilder
target/

# Plots genersated when running sample code
/*.png
/*.svg
/*.pdf
Binary file added .pytype/.ninja_deps
Binary file not shown.
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .vscode/.ropeproject/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# The default ``config.py``
# flake8: noqa


def set_prefs(prefs):
"""This function is called before opening the project"""

# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_files()`.
# Note that ``?`` and ``*`` match all characters but slashes.
# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'
# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'
# '.svn': matches 'pkg/.svn' and all of its children
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject',
'.hg', '.svn', '_svn', '.git', '.tox']

# Specifies which files should be considered python files. It is
# useful when you have scripts inside your project. Only files
# ending with ``.py`` are considered to be python files by
# default.
# prefs['python_files'] = ['*.py']

# Custom source folders: By default rope searches the project
# for finding source folders (folders that should be searched
# for finding modules). You can add paths to that list. Note
# that rope guesses project source folders correctly most of the
# time; use this if you have any problems.
# The folders should be relative to project root and use '/' for
# separating folders regardless of the platform rope is running on.
# 'src/my_source_folder' for instance.
# prefs.add('source_folders', 'src')

# You can extend python path for looking up modules
# prefs.add('python_path', '~/python/')

# Should rope save object information or not.
prefs['save_objectdb'] = True
prefs['compress_objectdb'] = False

# If `True`, rope analyzes each module when it is being saved.
prefs['automatic_soa'] = True
# The depth of calls to follow in static object analysis
prefs['soa_followed_calls'] = 0

# If `False` when running modules or unit tests "dynamic object
# analysis" is turned off. This makes them much faster.
prefs['perform_doa'] = True

# Rope can check the validity of its object DB when running.
prefs['validate_objectdb'] = True

# How many undos to hold?
prefs['max_history_items'] = 32

# Shows whether to save history across sessions.
prefs['save_history'] = True
prefs['compress_history'] = False

# Set the number spaces used for indenting. According to
# :PEP:`8`, it is best to use 4 spaces. Since most of rope's
# unit-tests use 4 spaces it is more reliable, too.
prefs['indent_size'] = 4

# Builtin and c-extension modules that are allowed to be imported
# and inspected by rope.
prefs['extension_modules'] = []

# Add all standard c-extensions to extension_modules list.
prefs['import_dynload_stdmods'] = True

# If `True` modules with syntax errors are considered to be empty.
# The default value is `False`; When `False` syntax errors raise
# `rope.base.exceptions.ModuleSyntaxError` exception.
prefs['ignore_syntax_errors'] = False

# If `True`, rope ignores unresolvable imports. Otherwise, they
# appear in the importing namespace.
prefs['ignore_bad_imports'] = False

# If `True`, rope will insert new module imports as
# `from <package> import <module>` by default.
prefs['prefer_module_from_imports'] = False

# If `True`, rope will transform a comma list of imports into
# multiple separate import statements when organizing
# imports.
prefs['split_imports'] = False

# If `True`, rope will remove all top-level import statements and
# reinsert them at the top of the module when making changes.
prefs['pull_imports_to_top'] = True

# If `True`, rope will sort imports alphabetically by module name instead
# of alphabetically by import statement, with from imports after normal
# imports.
prefs['sort_imports_alphabetically'] = False

# Location of implementation of
# rope.base.oi.type_hinting.interfaces.ITypeHintingFactory In general
# case, you don't have to change this value, unless you're an rope expert.
# Change this value to inject you own implementations of interfaces
# listed in module rope.base.oi.type_hinting.providers.interfaces
# For example, you can add you own providers for Django Models, or disable
# the search type-hinting in a class hierarchy, etc.
prefs['type_hinting_factory'] = (
'rope.base.oi.type_hinting.factory.default_type_hinting_factory')


def project_opened(project):
"""This function is called after opening the project"""
# Do whatever you like here!
Loading