Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Oct 16, 2022
0 parents commit f0b177f
Show file tree
Hide file tree
Showing 14 changed files with 821 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Based on https://github.com/denkiwakame/py-tiny-pkg/blob/main/.github/workflows/pub.yml
# To create a release, see https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

name: publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup-python
uses: actions/setup-python@v3
with:
python-version: "3.x"
architecture: "x64"
- name: install pypa/build
run: >-
python -m
pip install
build
--user
- name: build sdist(tarball) and bdist(wheel) to dist/
run: >- # = python -m build . works the same way by default
python -m
build
--sdist
--wheel
--outdir dist/
- name: publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Based on https://github.com/denkiwakame/py-tiny-pkg/blob/main/.github/workflows/test.yml

name: package

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
install-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9"]
max-parallel: 3
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: setup-python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- name: confirm pip version
run: pip --version
- name: installation
run: pip install .[dev]
- name: test
run: python -m pytest --cov
editable-install-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8"]
max-parallel: 3
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: setup-python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- name: confirm pip version
run: pip --version
- name: installation
run: pip install -e .[dev]
- name: test
run: python -m pytest --cov
38 changes: 38 additions & 0 deletions .github/workflows/test_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Based on https://github.com/denkiwakame/py-tiny-pkg/blob/main/.github/workflows/testpub.yml

name: publish-test

on:
push:
tags:
- "*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup-python
uses: actions/setup-python@v3
with:
python-version: "3.x"
architecture: "x64"
- name: install pypa/build
run: >-
python -m
pip install
build
--user
- name: build sdist(tarball) and bdist(wheel) to dist/
run: >- # = python -m build . works the same way by default
python -m
build
--sdist
--wheel
--outdir dist/
- name: publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
124 changes: 124 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Contributions to this repository are managed via the same process as for the [dss repository](https://github.com/interuss/dss/CONTRIBUTING.md).
Loading

0 comments on commit f0b177f

Please sign in to comment.