1
0
Fork 0
mirror of https://github.com/cosmo-sims/cosmICweb-music.git synced 2024-09-19 16:53:43 +02:00

add LICENSE, MANIFEST, and pypi publish

This commit is contained in:
Michael Buehlmann 2024-04-17 10:58:56 -05:00
parent 3de616f198
commit b15b1b4dc0
4 changed files with 119 additions and 1 deletions

71
.github/workflows/pypi.yml vendored Normal file
View file

@ -0,0 +1,71 @@
name: pypi
on:
push:
tags:
- "*"
env:
DEFAULT_BRANCH: "main"
jobs:
build-and-deploy:
name: Build and PyPI
runs-on: ubuntu-latest
steps:
- name: check out
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Debugging information
run: |
source .venv/bin/activate
echo "github.ref:" ${{github.ref}}
echo "github.event_name:" ${{github.event_name}}
echo "github.head_ref:" ${{github.head_ref}}
echo "github.base_ref:" ${{github.base_ref}}
set -x
git rev-parse --abbrev-ref HEAD
git branch
git branch -a
git remote -v
python -V
pip list --not-required
pip list
- name: Build
run: poetry build
- name: Deploy
env:
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN}}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN}}
run: poetry publish

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022, Michael Buehlmann
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.

9
MANIFEST.in Normal file
View file

@ -0,0 +1,9 @@
include LICENSE
include README.md
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif

View file

@ -1,9 +1,20 @@
[tool.poetry] [tool.poetry]
name = "cosmicweb-music" name = "cosmicweb-music"
version = "0.1.0" version = "0.1.0"
description = "" description = "Script to download initial conditions for zoom-in cosmological simulations from the cosmICweb service."
authors = ["Michael Buehlmann <buehlmann.michi@gmail.com>"] authors = ["Michael Buehlmann <buehlmann.michi@gmail.com>"]
license = "MIT"
readme = "README.md" readme = "README.md"
homepage = "https://github.com/michaelbuehlmann/cosmicweb-music"
repository = "https://github.com/michaelbuehlmann/cosmicweb-music"
documentation = "https://github.com/michaelbuehlmann/cosmicweb-music"
include = ["LICENSE"]
keywords = ["scientific computing"]
classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
]
[tool.poetry.scripts] [tool.poetry.scripts]
cosmicweb-music = "cosmicweb_music.cosmICweb:cli" cosmicweb-music = "cosmicweb_music.cosmICweb:cli"
@ -17,3 +28,9 @@ requests = "^2.31.0"
[build-system] [build-system]
requires = ["poetry-core"] requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 88
target-version = ["py38"]
include = '\.pyi?$'
exclude = '\.git|\.venv|build|_build|dist'