Skip to content

Commit

Permalink
update for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnyt committed Mar 9, 2021
1 parent fa494da commit dcc4bc1
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -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/*
1 change: 0 additions & 1 deletion CAT/model/IRT.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
22 changes: 12 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
]
)

0 comments on commit dcc4bc1

Please sign in to comment.