Abhishek Thakur
commited on
Commit
·
98cb1cd
1
Parent(s):
42c2745
bump version
Browse files- Makefile +3 -1
- competitions/__init__.py +1 -1
- competitions/cli/competitions.py +0 -5
- competitions/cli/run.py +0 -8
- competitions/tests/test_dummy.py +2 -0
- setup.py +16 -13
Makefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
CFLAGS += -std=c99 -Wall
|
| 2 |
-
.PHONY: quality style
|
| 3 |
|
| 4 |
quality:
|
| 5 |
python -m black --check --line-length 119 --target-version py38 .
|
|
@@ -15,6 +15,8 @@ docker:
|
|
| 15 |
docker tag competitions:latest huggingface/competitions:latest
|
| 16 |
docker push huggingface/competitions:latest
|
| 17 |
|
|
|
|
|
|
|
| 18 |
|
| 19 |
socket-kit.so: socket-kit.c
|
| 20 |
gcc $(CFLAGS) -shared -fPIC $^ -o $@ -ldl
|
|
|
|
| 1 |
CFLAGS += -std=c99 -Wall
|
| 2 |
+
.PHONY: quality style test
|
| 3 |
|
| 4 |
quality:
|
| 5 |
python -m black --check --line-length 119 --target-version py38 .
|
|
|
|
| 15 |
docker tag competitions:latest huggingface/competitions:latest
|
| 16 |
docker push huggingface/competitions:latest
|
| 17 |
|
| 18 |
+
test:
|
| 19 |
+
pytest -sv ./competitions/
|
| 20 |
|
| 21 |
socket-kit.so: socket-kit.c
|
| 22 |
gcc $(CFLAGS) -shared -fPIC $^ -o $@ -ldl
|
competitions/__init__.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
|
| 4 |
-
__version__ = "0.1.
|
| 5 |
|
| 6 |
MOONLANDING_URL = os.getenv("MOONLANDING_URL", "https://huggingface.co")
|
| 7 |
COMPETITION_ID = os.getenv("COMPETITION_ID")
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
|
| 4 |
+
__version__ = "0.1.4.dev0"
|
| 5 |
|
| 6 |
MOONLANDING_URL = os.getenv("MOONLANDING_URL", "https://huggingface.co")
|
| 7 |
COMPETITION_ID = os.getenv("COMPETITION_ID")
|
competitions/cli/competitions.py
CHANGED
|
@@ -29,12 +29,7 @@ def main():
|
|
| 29 |
exit(1)
|
| 30 |
|
| 31 |
command = args.func(args)
|
| 32 |
-
|
| 33 |
-
# try:
|
| 34 |
command.run()
|
| 35 |
-
# except Exception as e:
|
| 36 |
-
# logger.error(e)
|
| 37 |
-
# sys.exit(1)
|
| 38 |
|
| 39 |
|
| 40 |
if __name__ == "__main__":
|
|
|
|
| 29 |
exit(1)
|
| 30 |
|
| 31 |
command = args.func(args)
|
|
|
|
|
|
|
| 32 |
command.run()
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
if __name__ == "__main__":
|
competitions/cli/run.py
CHANGED
|
@@ -11,16 +11,8 @@ class RunCompetitionsAppCommand(BaseCompetitionsCommand):
|
|
| 11 |
@staticmethod
|
| 12 |
def register_subcommand(parser: ArgumentParser):
|
| 13 |
create_project_parser = parser.add_parser("run", description="✨ Run competitions app")
|
| 14 |
-
# create_project_parser.add_argument("--name", type=str, default=None, required=True, help="The project's name")
|
| 15 |
create_project_parser.set_defaults(func=run_app_command_factory)
|
| 16 |
|
| 17 |
-
# def __init__(self):
|
| 18 |
-
# self._name = name
|
| 19 |
-
# self._task = task
|
| 20 |
-
# self._lang = language
|
| 21 |
-
# self._max_models = max_models
|
| 22 |
-
# self._hub_model = hub_model
|
| 23 |
-
|
| 24 |
def run(self):
|
| 25 |
from ..competitions import demo
|
| 26 |
|
|
|
|
| 11 |
@staticmethod
|
| 12 |
def register_subcommand(parser: ArgumentParser):
|
| 13 |
create_project_parser = parser.add_parser("run", description="✨ Run competitions app")
|
|
|
|
| 14 |
create_project_parser.set_defaults(func=run_app_command_factory)
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
def run(self):
|
| 17 |
from ..competitions import demo
|
| 18 |
|
competitions/tests/test_dummy.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def test_dummy():
|
| 2 |
+
assert 1 + 1 == 2
|
setup.py
CHANGED
|
@@ -15,10 +15,10 @@ with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
|
|
| 15 |
LONG_DESCRIPTION = f.read()
|
| 16 |
|
| 17 |
QUALITY_REQUIRE = [
|
| 18 |
-
"black~=
|
| 19 |
-
"isort==5.
|
| 20 |
-
"flake8==
|
| 21 |
-
"mypy==0
|
| 22 |
]
|
| 23 |
|
| 24 |
TEST_REQUIRE = ["pytest", "pytest-cov"]
|
|
@@ -27,16 +27,9 @@ EXTRAS_REQUIRE = {
|
|
| 27 |
"dev": QUALITY_REQUIRE,
|
| 28 |
"quality": QUALITY_REQUIRE,
|
| 29 |
"test": TEST_REQUIRE,
|
| 30 |
-
"docs": [
|
| 31 |
-
"recommonmark",
|
| 32 |
-
"sphinx==3.1.2",
|
| 33 |
-
"sphinx-markdown-tables",
|
| 34 |
-
"sphinx-rtd-theme==0.4.3",
|
| 35 |
-
"sphinx-copybutton",
|
| 36 |
-
],
|
| 37 |
}
|
| 38 |
|
| 39 |
-
with open("requirements.txt") as f:
|
| 40 |
INSTALL_REQUIRES = f.read().splitlines()
|
| 41 |
|
| 42 |
setup(
|
|
@@ -51,6 +44,7 @@ setup(
|
|
| 51 |
install_requires=INSTALL_REQUIRES,
|
| 52 |
extras_require=EXTRAS_REQUIRE,
|
| 53 |
python_requires=">=3.10",
|
|
|
|
| 54 |
classifiers=[
|
| 55 |
"Intended Audience :: Developers",
|
| 56 |
"Intended Audience :: Education",
|
|
@@ -60,5 +54,14 @@ setup(
|
|
| 60 |
"Programming Language :: Python :: 3.10",
|
| 61 |
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
| 62 |
],
|
| 63 |
-
keywords="huggingface competitions machine learning ai nlp",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
)
|
|
|
|
| 15 |
LONG_DESCRIPTION = f.read()
|
| 16 |
|
| 17 |
QUALITY_REQUIRE = [
|
| 18 |
+
"black~=23.0",
|
| 19 |
+
"isort==5.13.2",
|
| 20 |
+
"flake8==7.0.0",
|
| 21 |
+
"mypy==1.8.0",
|
| 22 |
]
|
| 23 |
|
| 24 |
TEST_REQUIRE = ["pytest", "pytest-cov"]
|
|
|
|
| 27 |
"dev": QUALITY_REQUIRE,
|
| 28 |
"quality": QUALITY_REQUIRE,
|
| 29 |
"test": TEST_REQUIRE,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
+
with open("requirements.txt", encoding="utf-8") as f:
|
| 33 |
INSTALL_REQUIRES = f.read().splitlines()
|
| 34 |
|
| 35 |
setup(
|
|
|
|
| 44 |
install_requires=INSTALL_REQUIRES,
|
| 45 |
extras_require=EXTRAS_REQUIRE,
|
| 46 |
python_requires=">=3.10",
|
| 47 |
+
license="Apache 2.0",
|
| 48 |
classifiers=[
|
| 49 |
"Intended Audience :: Developers",
|
| 50 |
"Intended Audience :: Education",
|
|
|
|
| 54 |
"Programming Language :: Python :: 3.10",
|
| 55 |
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
| 56 |
],
|
| 57 |
+
keywords="huggingface competitions machine learning ai nlp tabular",
|
| 58 |
+
data_files=[
|
| 59 |
+
(
|
| 60 |
+
"templates",
|
| 61 |
+
[
|
| 62 |
+
"competitions/templates/index.html",
|
| 63 |
+
],
|
| 64 |
+
),
|
| 65 |
+
],
|
| 66 |
+
include_package_data=True,
|
| 67 |
)
|