Skip to content

Commit

Permalink
Merge pull request #6 from aimakerspace/dev
Browse files Browse the repository at this point in the history
Changes for 0.0.1 release
  • Loading branch information
jonheng authored Aug 5, 2021
2 parents aeee85b + 251f4de commit 89b5a94
Show file tree
Hide file tree
Showing 51 changed files with 81 additions and 7,719 deletions.
68 changes: 12 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,26 @@
# SG-NLP

Models from Singapore's NLP research community.
Machine learning models from Singapore's natural language processing (NLP) research community.

## Development Requirements
`sgnlp` is a Python package that allows you to easily get started on using various (NLP) models implemented using the
Pytorch and Transfromers frameworks.

* Python >= 3.8

```sh
pip install -r requirements_dev.txt
```
We have an accompanying [demo site](https://sgnlp.aks.aisingapore.net/) where you can interact with our models and get a
better understanding on how they work.

## Running Unittests
## Installation

Unit and integration tests scripts are all stored in the `tests` folder.

In order for unit tests in `Tests` folder to import the modules properly, please add the root of the repository to the
Python path variable prior to running test cases.

For Linux
* Python >= 3.8

```sh
export PYTHONPATH=.
```

For Windows

```sh
set PYTHONPATH=%cd%
pip install sgnlp
```

Below is the example to execute all test cases in the `tests` folder, commands are executed at the root
of the repository.

Using Pytest package

```sh
# Run all
pytest tests/

# Run slow tests only
pytest -m slow tests/
## Documentation

# Run non-slow tests only
pytest -m 'not slow' tests/

# Run single script
pytest <path/to/script>
```

## Publishing to PyPI

- Requires `twine`

- Increment version number in `setup.py`

```sh
rm -rf build dist sgnlp.egg-info/

python setup.py sdist bdist_wheel

twine check dist/*

twine upload dist/*
```
Visit our [documentation](https://sgnlp.aks.aisingapore.net/docs/) for tutorials.

## License

Code and models from this project is released under the MIT License unless otherwise stated.
If a model's code is under a separate license, it can be found in the respective model's folder.
Code and models from this project are released under the MIT License unless otherwise stated. If a model's code is under
a separate license, it can be found in the respective model's folder.
61 changes: 61 additions & 0 deletions dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## Development Requirements

* Python >= 3.8

```sh
pip install -r requirements_dev.txt
```

## Running Unittests

Unit and integration tests scripts are all stored in the `tests` folder.

In order for unit tests in `Tests` folder to import the modules properly, please add the root of the repository to the
Python path variable prior to running test cases.

For Linux

```sh
export PYTHONPATH=.
```

For Windows

```sh
set PYTHONPATH=%cd%
```

Below is the example to execute all test cases in the `tests` folder, commands are executed at the root
of the repository.

Using Pytest package

```sh
# Run all
pytest tests/

# Run slow tests only
pytest -m slow tests/

# Run non-slow tests only
pytest -m 'not slow' tests/

# Run single script
pytest <path/to/script>
```

## Publishing to PyPI

- Requires `twine`

- Increment version number in `setup.py`

```sh
rm -rf build dist sgnlp.egg-info/

python setup.py sdist bdist_wheel

twine check dist/*

twine upload dist/*
```
258 changes: 0 additions & 258 deletions docs/source/model/nea.rst

This file was deleted.

10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
from setuptools import setup, find_packages
from os import path

dir = path.abspath(path.dirname(__file__))
with open(path.join(dir, 'README.md')) as f:
long_description = f.read()

setup(
name="sgnlp",
packages=find_packages(),
version="0.0.1",
description="State-of-the-art models from Singapore's NLP research community",
description="Machine learning models from Singapore's NLP research community",
long_description=long_description,
long_description_content_type='text/markdown',
author="Jonathan Heng, Raymond Ng, Zhi Chong Tan, Benedict Lee",
author_email="sg-nlp@aisingapore.org",
keywords=["NLP", "machine learning", "deep learning"],
install_requires=[
"allennlp",
"datasets",
"nltk",
"numpy",
Expand Down
Loading

0 comments on commit 89b5a94

Please sign in to comment.