semvec/pypi-packages huggingface dataset:
Citree-pkg-Igor-Mintz 0.0.2
creates citation tree plot using DOI
Requires Python: >=3.6

# Citree
research citations tree visualization

    Citree is a class that creates a citations tree.
    the input is the DOI of the paper you want to start with (for example, 10.1002/ejp.1639).
    the data is retrieved using semanticscholar package
    (api that works with https://www.semanticscholar.org/).
    the network is built by using Networkx package.
    the plotting is done by using Bokeh package.
    
    attributes: 
    --------------
        first_doi - the doi provided by the user
        paper - a semanticscholar class (api that works with https://www.semanticscholar.org/)
        plot_name - plot title based on the name and author of the paper provided
        G - networkx object of the papers network
        A - networkx object of the authors plot
        generation - stores the number of generations
            (iterations of create_next_generation method)
        
    methods:
    --------------
    first - creates the first node
    create_next_generation - creates nodes based on papaers that cited
        the last generation nodes.
        saves a backup gpickle file.
        prints the generaton nuber and how many papers were found.
    color_by_self_citation - needs an input of authorId.
        colors in red nodes of papers which the input author is a co-author.
        the other nodes and edges are green.
        the authors names are stored at paper['authors']
    plot_html - creats an html file with tow plots:
        1. papers cictations tree
        2. authors who wrote toghather
    export_csv(filename='filename') - creates a dataframe and exports it as 'filename.csv'

----------------------------
    example of use:

    temp = Citree('10.1111/j.1526-4610.2006.00288.x')
    temp.first()
    temp.create_next_generation()
    temp.create_next_generation()
    temp.color_by_self_citation()
    temp.plot_html('temp')
    temp.export_csv(filename='mycsv)
Quastrado-check-type-wrapper 1.0.0
A simple decorator to control the type matching of the arguments passed

# Check Type Wrapper


This is a simple function decorator that takes data types as parameters. These types must match the types of the arguments to the function. In case of type mismatch, an exception is thrown informing about the mismatch of the expected type with the received function


# Installation


Сreate a virtual environment in the project folder using the venv tool
```bash
$ python3 -m venv env
```
Activate the virtual environment
```bash
$ . env/bin/activate
```
Using PIP, install the third party decorator package
```bash
$ pip install Quastrado_check_type_wrapper
```


# Usage


Import the decorator. Write a simple function and wrap
```python
from check_type_wrapper import check_type

@check_type(int, int)
def func(arg1, arg2):
    return a + b

result = func('1', '2')
```
By passing parameters to the decorator, we indicate that the arguments that the function will accept must be of a numeric type. But, when calling the function, we will pass it two strings

Having run the code, in the terminal we should see the following in the terminal
```bash
...
    raise TypeMissMatchException(discrepancies)
check_type_wrapper.exception.TypeMissMatchException: 
Invalid type of argument 1. Expect int, not str
Invalid type of argument 2. Expect int, not str
```


## Functions as an arguments


You can also use a decorator if you want to pass another function as an argument to the wrapped function

You will need to import the types module
```python
import types
```
As a parameter for the wrapper, pass a tuple, where the first element will be types.FunctionType, and the next - the types of arguments that the function will accept

```python
import types
from check_type_wrapper import check_type

@check_type((types.FunctionType, int), int)
def func(arg1, arg2):
    return arg1(arg2)

arg1 = 3
arg2 = lambda a : a + 10

result = func(arg2, arg1)
```


# Status


Still in development