Metadata-Version: 2.1
Name: dhlab
Version: 3.0.0a4
Summary: Text and image analysis of the digital collection (books, newspapers, periodicals, and images) at the National Library of Norway
Home-page: https://www.nb.no/dh-lab/
License: MIT
Author: The Digital Humanities Lab at The National Library of Norway (NB)
Author-email: dh-lab@nb.no
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: ipython (>=8.14.0,<9.0.0)
Requires-Dist: matplotlib (>=3.7.2,<4.0.0)
Requires-Dist: networkx (>=3.1,<4.0)
Requires-Dist: pandas (>=2.0.3,<3.0.0)
Requires-Dist: python-louvain (>=0.16,<0.17)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: scipy (>=1.11.1,<2.0.0) ; python_version >= "3.9" and python_version < "3.13"
Requires-Dist: seaborn (>=0.12.2,<0.13.0)
Project-URL: Bug Tracker, https://github.com/NationalLibraryOfNorway/DHLAB/issues
Project-URL: Changelog, https://github.com/NationalLibraryOfNorway/DHLAB/blob/main/CHANGELOG.md
Project-URL: Documentation, https://dhlab.readthedocs.io/en/stable/
Project-URL: Repository, https://github.com/NationalLibraryOfNorway/DHLAB
Project-URL: Tutorials, https://nationallibraryofnorway.github.io/digital_tekstanalyse/tutorial.html
Description-Content-Type: text/markdown

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/NationalLibraryOfNorway/digital_tekstanalyse/HEAD)
# DHLAB

<!-- start dhlab-intro -->

 [`dhlab`](https://pypi.org/project/dhlab/) is a python library for doing qualitative and quantitative analyses of the digital texts from [*nettbiblioteket*](https://www.nb.no/search) (eng: "the online library") at the [National Library of Norway](https://www.nb.no/) (NLN). *Nettbiblioteket* is the NLN's digital collection of media publications.

<!-- end dhlab-intro -->

Check out our [documentation](https://dhlab.readthedocs.io/en/latest/) for more info.

## Installation with pip

Install the latest version of [`dhlab`](https://pypi.org/project/dhlab/) in your (Unix) terminal with pip:

```shell
pip install -U dhlab
```

## Install dhlab from github repo

Open you terminal in the file location you will work with [DHLAB](https://github.com/NationalLibraryOfNorway/DHLAB).

``` shell
git clone https://github.com/NationalLibraryOfNorway/DHLAB.git
cd DHLAB
pip install -U -e .
```

## For developers

### Dependency management
We use poetry to manage dependencies.

- [Install poetry](https://python-poetry.org/docs/#installation)
- Activate a virtual environment:

    ```shell
    poetry shell
    ```

- Install the project dependencies (including extra dependencies for building documentation, running the test suite, and linting/reformatting the code):

    ```shell
    poetry install --all-extras
    ```

- Update dependency versions (see [poetry docs](https://python-poetry.org/docs/managing-dependencies/#dependency-groups) for more on dependency management):

    ```shell
    poetry update
    ```

NB! Please commit the `poetry.lock` and `pyproject.toml` files if any dependencies got updated.

### Run test suite

```shell
pytest tests
```

### Reformat code

```shell
black dhlab
```

### Build documentation

```shell
cd docs
make html
```

View the pages in a browser:

```shell
open _build/html/index.html
```

## Contact
<!-- start contact-info -->
The code here is developed and maintained by [The Digital Humanities lab group](https://www.nb.no/dh-lab/).

If you have any questions, or run into any problems with the code, please log them in our [issue
tracker](https://github.com/NationalLibraryOfNorway/DHLAB/issues).
<!-- end contact-info -->

