Skip to content

Commit

Permalink
Merge pull request #11 from lotzma/mihaela_start
Browse files Browse the repository at this point in the history
Mihaela start
  • Loading branch information
mihaeladuta authored Nov 5, 2024
2 parents 5f631a7 + 5ffe895 commit affabf4
Show file tree
Hide file tree
Showing 30 changed files with 3,672 additions and 688 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
__pycache__/
.venv/
docs/build/
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pylint-dev/pylint
rev: v3.3.1
hooks:
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
files: ^l2gv2/.*\.py$
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.0
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

sphinx:
configuration: docs/source/conf.py

python:
install:
- requirements: docs/requirements.txt
Empty file added LICENSE.md
Empty file.
72 changes: 70 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,70 @@
# l2gv2
Local2Global

[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
[![Pylint](https://github.com/lotzma/L2Gv2/actions/workflows/pylint.yml/badge.svg)](https://github.com/lotzma/L2Gv2/actions/workflows/pylint.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)

# l2gv2 - Local2Global

## Overview

## Documentation

Full documentation available [here](https://l2gv2.readthedocs.io/en/latest/)


## Setup


**Supported Python Versions**: 3.10, 3.11, 3.12
**Supported Operating Systems**: macOS, Linux

Clone the repository on your machine

```shell
git clone https://github.com/lotzma/L2Gv2.git
```

Setup the virtual environment

1. Create and activate a virtual environment
```shell
python3 -m venv .venv
source .venv/bin/activate
```

2. Install the dependencies

```shell
pip install -r requirements.txt
```

The unified `requirements.in` file includes both shared and platform-specific dependencies with version constraints where necessary. To update dependencies, modify `requirements.in` and then recompile `requirements.txt`

```shell
pip-compile requirements.in --verbose
```

## License

## Contributors

The following people contributed to this project ([emoji key](https://allcontributors.org/docs/en/emoji-key)).

<!-- ALL-CONTRIBUTORS-LIST:START -->
<table>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/lotzma">
<img src="https://avatars.githubusercontent.com/u/22026207?v=4?v=4?s=100" width="100px;" alt="Martin Lotz"/>
<br /><sub><b>Martin Lotz</b></sub>
<br />🤔 📆 💻 💡
</a>
</td>
</tr>
</tbody>
</table>
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
24 changes: 18 additions & 6 deletions asad.ipynb

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
9 changes: 9 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# A subset of requirements.txt for the use of ReadTheDocs


-e .
Sphinx==8.1.3
sphinx-markdown-builder==0.6.7
sphinx-rtd-theme==3.0.1
sphinx-autobuild==2024.10.3
65 changes: 65 additions & 0 deletions docs/source/code.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Code documentation
==================

Anomaly detection
-----------------

.. automodule:: l2gv2.anomaly_detection
:members:
:undoc-members:
:show-inheritance:

Induced subgraph
----------------

.. automodule:: l2gv2.induced_subgraph
:members:
:undoc-members:
:show-inheritance:

Manopt optimization
-------------------

.. automodule:: l2gv2.manopt_optimization
:members:
:undoc-members:
:show-inheritance:

Models
------

.. automodule:: l2gv2.models
:members:
:undoc-members:
:show-inheritance:

.. Embeddings
.. ----------
.. .. automodule:: l2gv2.embedding.embeddings
.. :members:
.. :undoc-members:
.. :show-inheritance:
Patch
-----

.. automodule:: l2gv2.patch.lazy
:members:
:undoc-members:
:show-inheritance:

.. automodule:: l2gv2.patch.patch
:members:
:undoc-members:
:show-inheritance:

.. .. automodule:: l2gv2.patch.patches
.. :members:
.. :undoc-members:
.. :show-inheritance:
.. .. automodule:: l2gv2.patch.utils
.. :members:
.. :undoc-members:
.. :show-inheritance:
28 changes: 28 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "l2gv2"
copyright = "2024"
author = ""

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx_markdown_builder", "sphinx.ext.autodoc", "sphinx.ext.autosummary"]

templates_path = ["_templates"]
exclude_patterns = []

autodoc_mock_imports = ["optuna", "autograd", "pymanopt", "tqdm", "torch", "numpy", "pandas", "sklearn", "scipy", "community", "torch_geometric", "torch_scatter", "local2global", "raphtory", "local2global_embedding", "networkx", "matplotlib", "nfts", "polars"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
14 changes: 14 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. l2gv2 documentation master file, created by
sphinx-quickstart on Mon Nov 4 11:00:53 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
l2gv2 documentation
====================

.. toctree::
:maxdepth: 4

intro
code

Loading

0 comments on commit affabf4

Please sign in to comment.