Skip to content

Commit df685eb

Browse files
committed
Adding placeholder project
1 parent 79faa2b commit df685eb

File tree

7 files changed

+91
-1
lines changed

7 files changed

+91
-1
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [3.9, 3.10, 3.11]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install flake8 pytest
22+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23+
- name: Lint with flake8
24+
run: |
25+
# stop the build if there are Python syntax errors or undefined names
26+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
27+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
28+
flake8 . --count --max-complexity=20 --max-line-length=127 --statistics
29+
- name: Test with pytest
30+
run: |
31+
python -m pytest

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: "3.x"
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# sdk-python
1+
# nextmv python package
2+
3+
This is a placeholder for Nextmv's Python package. Stay tuned for more information.

hello.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello Python!")

requirements.txt

Whitespace-only changes.

setup.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from os import path
2+
import setuptools
3+
4+
# Collect additional information from separate files
5+
dir = path.abspath(path.dirname(__file__))
6+
with open(path.join(dir, "requirements.txt"), encoding="utf-8") as fp:
7+
install_requires = fp.read()
8+
with open(path.join(dir, "version.txt"), encoding="utf-8") as fp:
9+
version = fp.readline().strip()
10+
with open(path.join(dir, "README.md"), encoding="utf-8") as fp:
11+
readme = fp.read()
12+
13+
# Actual setup
14+
setuptools.setup(
15+
name="nextmv",
16+
description="Nextmv's Python library for solving decision problems",
17+
long_description=readme,
18+
long_description_content_type="text/markdown",
19+
version=version,
20+
author="Nextmv inc.",
21+
author_email="support@nextmv.io",
22+
url="https://github.com/nextmv/sdk-python",
23+
packages=["nextmv"],
24+
install_requires=install_requires,
25+
classifiers=[
26+
"Programming Language :: Python :: 3",
27+
"Operating System :: OS Independent",
28+
],
29+
)

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1

0 commit comments

Comments
 (0)