-
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.
Aright lets see if we can publish it as a pip package
- Loading branch information
Showing
5 changed files
with
64 additions
and
52 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,30 @@ | ||
name: OneDataShare CLI | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
pypi-publish: | ||
name: Publish release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/odscli | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel # Could also be python -m build | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
@@ -1,15 +1 @@ | ||
OneDataShare Python Command Line Interface | ||
========== | ||
|
||
Installation & Setup | ||
------- | ||
#TODO | ||
**Require Packages,** | ||
pip3 install -r requirements.txt | ||
**Quick Install VIA PIP,** | ||
**Remove interactive features,** | ||
|
||
**Examples** | ||
```python | ||
python3 onedatashare.py transfer s3 us-east-2:::testbucket "/" -f folderOrFileAnyNumber/ sftp ccTacc /home/cc/certs --concurrency=6 --pipesize=10 | ||
``` | ||
OneDataShare Python Command Line Interface |
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 @@ | ||
__version__ = "0.9.1" |
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 |
---|---|---|
@@ -1,37 +1,33 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
|
||
name ='cmdline', | ||
|
||
version ='1.0.0', | ||
|
||
author ='Admin OneDataShare', | ||
|
||
author_email ='[email protected]', | ||
|
||
description ='Demo Package for CLI', | ||
|
||
packages = find_packages(), | ||
|
||
entry_points ={ | ||
|
||
'console_scripts': [ | ||
|
||
'main = cmdline:main' | ||
|
||
] | ||
|
||
}, | ||
|
||
classifiers =( | ||
|
||
"Programming Language :: Python :: 3", | ||
|
||
"Operating System :: OS Independent", | ||
|
||
), | ||
|
||
|
||
zip_safe = False | ||
import setuptools, os | ||
|
||
with open("README.md", "r", encoding="utf-8") as fh: | ||
long_description = fh.read() | ||
with open('requirements.txt') as f: | ||
requirements = f.readlines() | ||
with open("_version.py", encoding='utf-8') as f: | ||
version = f.read().strip().split(" = ")[1][1:-1] | ||
|
||
setuptools.setup( | ||
name="odscli", | ||
version=version, | ||
author="OneDataShare", | ||
author_email="[email protected]", | ||
description="The onedatashare.org cli", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/didclab/odscli", | ||
project_urls={}, | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
packages=setuptools.find_packages(exclude=['tests']), | ||
entry_points={ | ||
'console_scripts': [ | ||
'ods = odscli:main' | ||
] | ||
}, | ||
install_requires=[requirements], | ||
python_requires=">=3.10", | ||
) |