-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial project structure and configuration files
- Created MANIFEST.in to include necessary files for packaging. - Added pyproject.toml for build system configuration and tool settings (Black, isort, mypy, pytest). - Updated README.md with installation instructions and development setup. - Introduced setup.py for package distribution. - Added GitHub Actions workflows for testing and publishing to PyPI. - Initialized argilla_dataset_manager package with core components.
- Loading branch information
1 parent
979ac24
commit 8ee1a0e
Showing
7 changed files
with
224 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Trigger on version tags | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install build dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build twine | ||
- name: Build package | ||
run: python -m build | ||
|
||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
twine check dist/* | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e ".[dev]" | ||
pip install pytest pytest-cov black isort mypy | ||
- name: Check code formatting | ||
run: | | ||
black . --check | ||
isort . --check | ||
- name: Type check | ||
run: mypy . | ||
|
||
- name: Run tests | ||
run: | | ||
pytest tests/ --cov=argilla_dataset_manager --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include LICENSE | ||
include README.md | ||
include requirements.txt | ||
include pyproject.toml | ||
recursive-include argilla_dataset_manager *.py | ||
recursive-include argilla_dataset_manager py.typed | ||
recursive-include examples *.py | ||
recursive-include tests *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
""" | ||
Argilla Dataset Manager - A tool for managing and uploading datasets to Argilla. | ||
""" | ||
|
||
from argilla_dataset_manager.utils.dataset_manager import DatasetManager | ||
from argilla_dataset_manager.utils.argilla_client import get_argilla_client | ||
from argilla_dataset_manager.datasets.settings_manager import SettingsManager | ||
|
||
__version__ = "0.1.0" | ||
__all__ = ["DatasetManager", "get_argilla_client", "SettingsManager"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[build-system] | ||
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
line-length = 100 | ||
include = '\.pyi?$' | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 | ||
line_length = 100 | ||
|
||
[tool.mypy] | ||
python_version = "3.8" | ||
warn_return_any = true | ||
warn_unused_configs = true | ||
disallow_untyped_defs = true | ||
disallow_incomplete_defs = true | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "-ra -q" | ||
testpaths = [ | ||
"tests", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from setuptools import setup, find_packages | ||
|
||
with open("README.md", "r", encoding="utf-8") as fh: | ||
long_description = fh.read() | ||
|
||
with open("requirements.txt", "r", encoding="utf-8") as fh: | ||
requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")] | ||
|
||
setup( | ||
name="argilla-dataset-manager", | ||
version="0.1.0", | ||
author="Jordan Burger", | ||
author_email="jordanrburger@gmail.com", | ||
description="A tool for managing and uploading datasets to Argilla", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/jordanrburger/argilla_dataset_manager", | ||
packages=find_packages(exclude=["tests*", "examples*"]), | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
], | ||
python_requires=">=3.8", | ||
install_requires=requirements, | ||
include_package_data=True, | ||
package_data={ | ||
"argilla_dataset_manager": ["py.typed"], | ||
}, | ||
) |