From dcc4bc168eaddb37402099008c3c446743ba47be Mon Sep 17 00:00:00 2001 From: nnnyt <793313994@qq.com> Date: Mon, 8 Mar 2021 16:28:42 +0800 Subject: [PATCH] update for publishing --- .github/workflows/python-publish.yml | 31 ++++++++++++++++++++++++++++ CAT/model/IRT.py | 1 - LICENSE | 21 +++++++++++++++++++ setup.py | 22 +++++++++++--------- 4 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/python-publish.yml create mode 100644 LICENSE diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..3bd2eb8 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,31 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* \ No newline at end of file diff --git a/CAT/model/IRT.py b/CAT/model/IRT.py index 273b024..0018371 100644 --- a/CAT/model/IRT.py +++ b/CAT/model/IRT.py @@ -9,7 +9,6 @@ import torch.utils.data as data from math import exp as exp from sklearn.metrics import roc_auc_score -from scipy import integrate from CAT.model.abstract_model import AbstractModel from CAT.dataset import AdapTestDataset, TrainDataset, Dataset diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1c09502 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 tswsxk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/setup.py b/setup.py index 4e8427a..bae88dc 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,21 @@ -from setuptools import setup - -test_deps = [ - 'pytest>=4', - 'pytest-cov>=2.6.0', - 'pytest-flake8', -] +from setuptools import setup, find_packages setup( name='CAT', version='0.0.1', - extras_require={ - 'test': test_deps, - }, + author='nnnyt', + author_email='ningyt@mail.ustc.edu.cn', + packages=find_packages(), + url='https://github.com/bigdata-ustc/CAT', install_requires=[ + 'torch', + 'vegas', + 'numpy', + 'scikit-learn', ], # And any other dependencies foo needs entry_points={ }, + classifiers=[ + "Programming Language :: Python :: 3", + ] ) \ No newline at end of file