Skip to content

Commit

Permalink
Add setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GokulNC committed Oct 9, 2021
1 parent fc4599d commit b444149
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 31 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
*.pyc
docs/_build/
build/
default/
dist/
*.egg-info/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.6
version: 3.8
install:
- requirements: docs/requirements.txt
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 👐OpenHands: Sign Language Recognition Library

## Training Example
> _Making Sign Language Recognition Accessible_
```
python run_classifier.py --config-path=examples/configs/include/ --config-name=gcn_bert hydra.run.dir=./slr_experiments/INCLUDE50/GCN-BERT/
```
Check the documentation on how to use the library:
[ReadTheDocs: 👐OpenHands](https://openhands.readthedocs.io)
21 changes: 21 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
numpy==1.19.5
albumentations==0.5.2
tqdm==4.59.0
omegaconf==2.1.0
pytorch_lightning==1.4.8
pytorchvideo==0.1.1
hydra_core==1.1.0
torch
mediapipe==0.8.7.3
natsort==7.1.1
h5py==3.3.0
torchvision==0.9.1
opencv_python_headless==4.5.2.52
torchmetrics==0.5.1
timm==0.4.9
transformers==4.9.1
pandas==1.2.4
hydra==2.5
Pillow==8.3.2
scikit_learn==1.0

sphinx
myst-parser
sphinx_rtd_theme
2 changes: 1 addition & 1 deletion examples/infer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import hydra
from openhands.core.inference import InferenceModel
from openhands.apis.inference import InferenceModel


@hydra.main(config_path="./", config_name="sample_conf")
Expand Down
6 changes: 5 additions & 1 deletion examples/run_classifier.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
'''
python run_classifier.py --config-path=examples/configs/include/ --config-name=gcn_bert hydra.run.dir=./slr_experiments/INCLUDE50/GCN-BERT/
'''

import hydra
import pytorch_lightning as pl
from openhands.core.classification_model import ClassificationModel
from openhands.apis.classification_model import ClassificationModel
from openhands.core.exp_utils import experiment_manager


Expand Down
2 changes: 1 addition & 1 deletion examples/run_dpc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import hydra
from openhands.core.dpc import PretrainingModelDPC
from openhands.apis.dpc import PretrainingModelDPC


@hydra.main(config_path="./", config_name="pretrain_dpc")
Expand Down
2 changes: 1 addition & 1 deletion openhands/__version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1'
__version__ = '0.1.1'
22 changes: 0 additions & 22 deletions requirements.txt

This file was deleted.

3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[metadata]
license_file = LICENSE.txt
description-file = README.md
47 changes: 47 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import pathlib
from setuptools import setup, find_packages
import pkg_resources

# The directory containing this file
HERE = pathlib.Path(__file__).parent

# The text of the README file
README = (HERE / "README.md").read_text(encoding='utf-8')

with pathlib.Path('docs/requirements.txt').open() as requirements_txt:
install_requires = [
str(requirement)
for requirement
in pkg_resources.parse_requirements(requirements_txt)
]

# Read meta-data
about = {}
exec(open('openhands/__version.py').read(), about)

# Install
setup(
name="OpenHands",
version=about["__version__"],
description="👐OpenHands : Making Sign Language Recognition Accessible",
long_description=README,
long_description_content_type="text/markdown",
url="https://openhands.ai4bharat.org",
download_url="https://pypi.org/project/OpenHands",
project_urls={
'Source': "https://github.com/AI4Bharat/OpenHands",
'Issues': "https://github.com/AI4Bharat/OpenHands/issues",
'Documentation': "https://openhands.readthedocs.io",
},
author="AI4Bhārat",
packages=["openhands"],
# packages=find_packages(exclude=("tests",)),
include_package_data=True,
install_requires=install_requires,
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries"
],
)

0 comments on commit b444149

Please sign in to comment.