Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to PyPI

on:
release:
types:
- released
- prereleased

jobs:
deploy:
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 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 upload dist/*
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cranecloud"
version = "0.0.6"
version = "0.0.7"
authors = [
{ name="cranecloud", email="allan@cranecloud.io" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='cranecloud',
version='0.1.0',
package_dir={'': 'src'},
package_dir={'': 'src'},
packages=find_packages(where='src'),
include_package_data=True,
entry_points={
Expand Down
1 change: 1 addition & 0 deletions src/cranecloud.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ README.md
pyproject.toml
setup.py
src/cranecloud/__init__.py
src/cranecloud/config.py
src/cranecloud.egg-info/PKG-INFO
src/cranecloud.egg-info/SOURCES.txt
src/cranecloud.egg-info/dependency_links.txt
Expand Down
1 change: 1 addition & 0 deletions src/cranecloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ def cli():

__all__ = ["MLOpsClient"]


def create_initial_config():
create_config()
4 changes: 2 additions & 2 deletions src/cranecloud/commands/apps.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
import click
import requests
from config import API_BASE_URL
from cranecloud.config import API_BASE_URL
from tabulate import tabulate
from config import CURRENT_PROJECT
from cranecloud.config import CURRENT_PROJECT
from cranecloud.utils import get_token


Expand Down
2 changes: 1 addition & 1 deletion src/cranecloud/commands/clusters.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import click
import requests
from cranecloud.utils.config import write_config
from config import API_BASE_URL, CURRENT_CLUSTER
from cranecloud.config import API_BASE_URL, CURRENT_CLUSTER
from tabulate import tabulate

from cranecloud.utils import get_token
Expand Down
2 changes: 1 addition & 1 deletion src/cranecloud/commands/config_management.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import click
from tabulate import SEPARATING_LINE, tabulate
from cranecloud.commands.projects import set_use_project
from config import CURRENT_CLUSTER, CURRENT_PROJECT, CURRENT_USER
from cranecloud.config import CURRENT_CLUSTER, CURRENT_PROJECT, CURRENT_USER
from cranecloud.utils.config import read_config


Expand Down
2 changes: 1 addition & 1 deletion src/cranecloud/commands/ml_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import subprocess
import json

from config import MLOPS_API_BASE_URL
from cranecloud.config import MLOPS_API_BASE_URL
from cranecloud.utils import get_token
from cranecloud.core.ml_ops import MLOpsClient

Expand Down
4 changes: 2 additions & 2 deletions src/cranecloud/commands/projects.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import click
import requests
from tabulate import tabulate
from config import (API_BASE_URL, CURRENT_PROJECT,
CURRENT_CLUSTER, CURRENT_USER)
from cranecloud.config import (API_BASE_URL, CURRENT_PROJECT,
CURRENT_CLUSTER, CURRENT_USER)
from cranecloud.utils.config import write_config

from cranecloud.utils import get_token
Expand Down
2 changes: 1 addition & 1 deletion src/cranecloud/commands/user_management.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
import requests
from config import API_BASE_URL
from cranecloud.config import API_BASE_URL
import keyring
from tabulate import tabulate
from cranecloud.utils import get_token
Expand Down
2 changes: 1 addition & 1 deletion src/config.py → src/cranecloud/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
create_config()
config_file = read_config()
API_BASE_URL = config_file['GlobalSettings'].get('base_url')
API_BASE_URL = config_file['GlobalSettings'].get('mlops_base_url')
MLOPS_API_BASE_URL = ''
try:
CURRENT_PROJECT = config_file['current_project']
except KeyError:
Expand Down
2 changes: 1 addition & 1 deletion src/cranecloud/core/ml_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import requests
import subprocess
import logging
from config import MLOPS_API_BASE_URL
from cranecloud.config import MLOPS_API_BASE_URL
from cranecloud.utils import get_token


Expand Down