Skip to content

Commit 0246b14

Browse files
committed
Initial commit
0 parents  commit 0246b14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+16091
-0
lines changed

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Sandbox folders
2+
_sandbox/**
3+
_notebooks/**
4+
5+
# IDEs
6+
.vscode
7+
8+
# Byte-compiled / optimized / DLL files
9+
__pycache__/
10+
*.py[cod]
11+
*$py.class
12+
13+
# C extensions
14+
*.so
15+
16+
# Distribution / packaging
17+
.Python
18+
env/
19+
build/
20+
develop-eggs/
21+
dist/
22+
downloads/
23+
eggs/
24+
.eggs/
25+
lib/
26+
lib64/
27+
parts/
28+
sdist/
29+
var/
30+
wheels/
31+
*.egg-info/
32+
.installed.cfg
33+
*.egg
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports / benchmarks / profiling
46+
prof/
47+
htmlcov/
48+
.tox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
.hypothesis/
56+
.pytest_cache/
57+
.benchmarks
58+
59+
# Translations
60+
*.mo
61+
*.pot
62+
63+
# Django stuff:
64+
*.log
65+
local_settings.py
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# pyenv
84+
.python-version
85+
86+
# celery beat schedule file
87+
celerybeat-schedule
88+
89+
# SageMath parsed files
90+
*.sage.py
91+
92+
# dotenv
93+
.env
94+
95+
# virtualenv
96+
.venv
97+
venv/
98+
ENV/
99+
100+
# Spyder project settings
101+
.spyderproject
102+
.spyproject
103+
104+
# Rope project settings
105+
.ropeproject
106+
107+
# mkdocs documentation
108+
/site
109+
110+
# mypy
111+
.mypy_cache/
112+
113+
# VIM
114+
**/*.swp

AUTHORS.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Authors
2+
-------
3+
4+
**Development Lead**
5+
6+
* Szymon Talaga <[email protected]>
7+
8+
**Contributors**
9+
10+
None yet. Why not be the first?

CONTRIBUTING.rst

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome, and they are greatly appreciated! Every
6+
little bit helps, and credit will always be given.
7+
8+
You can contribute in many ways:
9+
10+
Types of Contributions
11+
----------------------
12+
13+
Report Bugs
14+
~~~~~~~~~~~
15+
16+
Report bugs at https://github.com/sztal/pathcensus/issues.
17+
18+
If you are reporting a bug, please include:
19+
20+
* Your operating system name and version.
21+
* Any details about your local setup that might be helpful in troubleshooting.
22+
* Detailed steps to reproduce the bug.
23+
24+
Fix Bugs
25+
~~~~~~~~
26+
27+
Look through the GitHub issues for bugs. Anything tagged with "bug"
28+
is open to whoever wants to implement it.
29+
30+
Implement Features
31+
~~~~~~~~~~~~~~~~~~
32+
33+
Look through the GitHub issues for features. Anything tagged with "feature"
34+
is open to whoever wants to implement it.
35+
36+
Write Documentation
37+
~~~~~~~~~~~~~~~~~~~
38+
39+
Path census could always use more documentation, whether as part of the
40+
official Path census docs, in docstrings, or even on the web in blog posts,
41+
articles, and such.
42+
43+
Submit Feedback
44+
~~~~~~~~~~~~~~~
45+
46+
The best way to send feedback is to file an issue at https://github.com/sztal/pathcensus/issues.
47+
48+
If you are proposing a feature:
49+
50+
* Explain in detail how it would work.
51+
* Keep the scope as narrow as possible, to make it easier to implement.
52+
* Remember that this is a volunteer-driven project, and that contributions
53+
are welcome :)
54+
55+
Get Started!
56+
------------
57+
58+
Ready to contribute? Here's how to set up `pathcensus` for
59+
local development.
60+
61+
1. Fork_ the `pathcensus` repo on GitHub.
62+
2. Clone your fork locally::
63+
64+
$ git clone [email protected]:your_name_here/pathcensus.git
65+
66+
3. Create a branch for local development::
67+
68+
$ git checkout -b name-of-your-bugfix-or-feature
69+
70+
Now you can make your changes locally.
71+
72+
4. When you're done making changes, check that your changes pass style and unit
73+
tests, including testing other Python versions with tox::
74+
75+
$ make test-all
76+
77+
You may first need to run ``pip install -r requirements-tests.txt``
78+
and then ``pip install tox``.
79+
80+
5. Commit your changes and push your branch to GitHub::
81+
82+
$ git add .
83+
$ git commit -m "Your detailed description of your changes."
84+
$ git push origin name-of-your-bugfix-or-feature
85+
86+
6. Submit a pull request through the GitHub website.
87+
88+
.. _Fork: https://github.com/sztal/pathcensus/fork
89+
90+
Pull Request Guidelines
91+
-----------------------
92+
93+
Before you submit a pull request, check that it meets these guidelines:
94+
95+
1. The pull request should include tests.
96+
2. If the pull request adds functionality, the docs should be updated. Put
97+
your new functionality into a function with a docstring, and add the
98+
feature to the list in README.rst.
99+
3. The pull request should work for Python 3.8+
100+
and must pass all tests when running ``make test-all``.
101+
102+
103+
Tips
104+
----
105+
106+
To run a subset of tests::
107+
108+
$ pytest test/unweighted/test_pathcensus.py
109+
110+
This will run all tests for the unweighted calculations of path census
111+
and structural coefficients.

HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. :changelog:
2+
3+
History
4+
-------
5+
6+
0.1 (2022-06-01)
7+
++++++++++++++++++
8+
9+
* First release on PyPI.

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 Szymon Talaga
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include AUTHORS.rst
2+
include HISTORY.rst
3+
include LICENSE
4+
include README.rst

Makefile

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.PHONY: help clean clean-pyc clean-build clean-test lint test test-all coverage docs release sdist
2+
3+
help:
4+
@echo "clean - remove auxiliary files/artifacts"
5+
@echo "clean-build - remove build artifacts"
6+
@echo "clean-pyc - remove Python file artifacts"
7+
@echo "clean-test - remove testing artifacts"
8+
@echo "lint - check style with flake8"
9+
@echo "test - run tests quickly with the default Python"
10+
@echo "test-all - run tests on every Python version with tox"
11+
@echo "coverage - compute code coverage quickly with the default Python"
12+
@echo "cov-report - display coverage report"
13+
@echo "docs - generate Sphinx HTML documentation, including API docs"
14+
@echo "release - package and upload a release"
15+
@echo "sdist - package"
16+
17+
clean: clean-build clean-py clean-test
18+
19+
clean-build:
20+
rm -fr build/
21+
rm -fr dist/
22+
find . -name '*.egg-info' -exec rm -rf {} +
23+
find . -name '*.eggs' -exec rm -rf {} +
24+
25+
clean-py:
26+
find . -name '__pycache__' -exec rm -rf {} +
27+
find . -name '*.pyc' -exec rm -f {} +
28+
find . -name '*.pyo' -exec rm -f {} +
29+
find . -name '*.nbc' -exec rm -f {} +
30+
find . -name '*.nbi' -exec rm -f {} +
31+
find . -name '*~' -exec rm -f {} +
32+
33+
clean-test:
34+
find . -name '.benchmarks' -exec rm -rf {} +
35+
find . -name '.pytest_cache' -exec rm -rf {} +
36+
find . -name '.tox' -exec rm -rf {} +
37+
38+
lint:
39+
pytest --pylint -m pylint
40+
41+
test:
42+
pytest
43+
44+
test-all:
45+
tox
46+
47+
cov-run:
48+
coverage run --source pathcensus setup.py test
49+
50+
cov-report:
51+
coverage report --omit=pathcensus/core/*.py
52+
coverage html --omit=pathcensus/core/*.py
53+
xdg-open htmlcov/index.html || open htmlcov/index.html
54+
55+
coverage: cov-run cov-report
56+
57+
docs:
58+
rm -f docs/pathcensus.rst
59+
rm -f docs/modules.rst
60+
sphinx-apidoc -o docs/ pathcensus
61+
$(MAKE) -C docs clean
62+
$(MAKE) -C docs html
63+
xdg-open docs/_build/html/index.html || open docs/_build/html/index.html
64+
65+
release: clean
66+
python setup.py sdist upload
67+
python setup.py bdist_wheel upload
68+
69+
sdist: clean
70+
python setup.py sdist
71+
python setup.py bdist_wheel upload
72+
ls -l dist

0 commit comments

Comments
 (0)