-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adapt setup.py for versioning using setuptools_scm * add CI for Pypi publishing
- Loading branch information
1 parent
fc73f08
commit ab447e5
Showing
3 changed files
with
59 additions
and
26 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,31 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,29 +1,42 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import pathlib | ||
from setuptools import setup, find_packages | ||
import pkg_resources | ||
|
||
install_requires = [ | ||
# core | ||
'requests', | ||
'pyyaml', | ||
'docopt', | ||
'jinja2', | ||
'pyvirtualdisplay', | ||
|
||
def get_install_requires(): | ||
install_requires = [] | ||
with pathlib.Path('requirements.txt').open() as requirements_txt: | ||
install_requires = [ | ||
str(requirement) | ||
for requirement | ||
in pkg_resources.parse_requirements(requirements_txt) | ||
] | ||
return install_requires | ||
# for running models | ||
'pyqt5', | ||
'ipython', | ||
'matplotlib', | ||
'scipy', | ||
'2to3', | ||
] | ||
|
||
with open('README.md', 'r', encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
def setup_package(): | ||
|
||
setup( | ||
name='nrn-modeldb-ci', | ||
version='0.0.1', | ||
description='NEURON ModelDB CI tools', | ||
url='https://github.com/neuronsimulator/nrn-modeldb-ci', | ||
author='EPFL Blue Brain Project & Yale', | ||
author_email='[email protected]', | ||
license='BSD-3-Clause', | ||
packages=find_packages(), | ||
install_requires=get_install_requires(), | ||
use_scm_version=True, | ||
include_package_data=True, | ||
install_requires=install_requires, | ||
setup_requires=['setuptools_scm'], | ||
entry_points=dict( | ||
console_scripts=[ | ||
'runmodels = modeldb.commands:runmodels', | ||
|
@@ -34,6 +47,8 @@ def setup_package(): | |
'diffreports2html = modeldb.commands:diffreports2html', | ||
] | ||
), | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
) | ||
|
||
|
||
|