Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit b301505

Browse files
authored
Merge pull request #1 from daita-technologies/develop
First working version
2 parents 4224ba5 + 5e741c1 commit b301505

18 files changed

Lines changed: 637 additions & 8 deletions

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
open-pull-requests-limit: 10
9+
target-branch: "develop"
10+
labels:
11+
- "dependencies 🔁"
12+
- "python 🐍"
13+
assignees:
14+
- "BEdaita"

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Python 🐍 library 📦
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os:
11+
- ubuntu-latest
12+
architecture:
13+
- 'x64'
14+
python-version:
15+
- '3.8'
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
architecture: ${{ matrix.architecture }}
26+
27+
- name: Install pypa/build
28+
run: >-
29+
python -m
30+
pip install
31+
build
32+
--user
33+
34+
- name: Build a binary wheel and a source tarball
35+
run: >-
36+
python -m
37+
build
38+
--sdist
39+
--wheel
40+
--outdir dist/
41+
.

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 👮‍♂️ Lint
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{github.workflow}}-${{github.ref}}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
unit:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
architecture:
17+
- 'x64'
18+
python-version:
19+
- '3.8'
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
architecture: ${{ matrix.architecture }}
30+
31+
- name: Check formatting with Black
32+
uses: psf/black@stable
33+
with:
34+
options: "--check --verbose"
35+
src: "./"

.github/workflows/publish.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Publish Python 🐍 library 📦 to TestPyPI and PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-n-publish:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os:
14+
- ubuntu-latest
15+
architecture:
16+
- 'x64'
17+
python-version:
18+
- '3.8'
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
- name: Setup Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
architecture: ${{ matrix.architecture }}
29+
30+
- name: Install pypa/build
31+
run: >-
32+
python -m
33+
pip install
34+
build
35+
--user
36+
37+
- name: Build a binary wheel and a source tarball
38+
run: >-
39+
python -m
40+
build
41+
--sdist
42+
--wheel
43+
--outdir dist/
44+
.
45+
46+
- name: Publish library 📦 to Test PyPI
47+
uses: pypa/gh-action-pypi-publish@release/v1
48+
with:
49+
user: __token__
50+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
51+
repository_url: https://test.pypi.org/legacy/
52+
53+
- name: Publish library 📦 to PyPI
54+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
55+
uses: pypa/gh-action-pypi-publish@release/v1
56+
with:
57+
user: __token__
58+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ __pycache__/
55

66
# C extensions
77
*.so
8-
8+
*.pypirc
99
# Distribution / packaging
1010
.Python
1111
build/
@@ -32,8 +32,6 @@ MANIFEST
3232
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3333
*.manifest
3434
*.spec
35-
36-
# Installer logs
3735
pip-log.txt
3836
pip-delete-this-directory.txt
3937

@@ -55,17 +53,17 @@ coverage.xml
5553
*.mo
5654
*.pot
5755

58-
# Django stuff:
56+
# Django stuff
5957
*.log
6058
local_settings.py
6159
db.sqlite3
6260
db.sqlite3-journal
6361

64-
# Flask stuff:
62+
# Flask stuff
6563
instance/
6664
.webassets-cache
6765

68-
# Scrapy stuff:
66+
# Scrapy stuff
6967
.scrapy
7068

7169
# Sphinx documentation

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include directory_components *.html *.png *.svg *.ico *.js *.txt *.css *.po *.mo *.env

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# DAITA's Official Python Library
22

3-
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
3+
![License: MIT](https://img.shields.io/pypi/l/daita?color=blue) [![PyPi version](https://img.shields.io/pypi/v/daita?color=blue)](https://pypi.org/project/daita) ![Python version support](https://img.shields.io/pypi/pyversions/daita?color=blue)
44

5-
TBD
5+
This is DAITA's official easy-to-use Python library.
6+
7+
## Getting Started
8+
9+
You can install [`daita`](https://pypi.org/project/daita) from PyPI with:
10+
11+
```sh
12+
pip install daita
13+
```
14+
15+
## Contributing
16+
17+
We value feedback and contributions from our community. Whether it's a bug report, new feature, correction, or additional documentation, we welcome your issues and pull requests.

daita/.env.development

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DAITA_TOKEN=https://uflt5029de.execute-api.us-east-2.amazonaws.com/devdaitabeapp/cli/check_daita_token
2+
PRESIGN_URL=https://uflt5029de.execute-api.us-east-2.amazonaws.com/devdaitabeapp/cli/upload_project
3+
CHECK_EXISTENCE_FILE=https://uflt5029de.execute-api.us-east-2.amazonaws.com/devdaitabeapp/cli/check_existence_file
4+
CREATE_PRESIGN_SIGNLE_URL=https://uflt5029de.execute-api.us-east-2.amazonaws.com/devdaitabeapp/cli/create_presignurl
5+
UPLOAD_COMPRESS_FILE=https://uflt5029de.execute-api.us-east-2.amazonaws.com/devdaitabeapp/cli/create_decompress_task

daita/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.4"

daita/daita.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from daita.dashboard import dashboard
2+
import argparse
3+
4+
5+
parser = argparse.ArgumentParser(description="Optional app description")
6+
parser.add_argument("--dir", type=str, help="A required integer positional argument")
7+
parser.add_argument(
8+
"--daita_token", type=str, help="A required integer positional argument"
9+
)
10+
args = parser.parse_args()
11+
dir = args.dir
12+
daita_token = args.daita_token
13+
14+
15+
def main():
16+
dashboard(daita_token=daita_token, dir=dir)
17+
pass

0 commit comments

Comments
 (0)