Skip to content

Commit

Permalink
Merge pull request #1 from regislon/main
Browse files Browse the repository at this point in the history
add packaging pipeline
  • Loading branch information
Janody authored Oct 2, 2023
2 parents db2295e + e0e00cb commit 56cbff2
Show file tree
Hide file tree
Showing 47 changed files with 254 additions and 14 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
on: push

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/oasisis
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Binary file removed code/__pycache__/activity.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/activity.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/data_utils.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/data_utils.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/error_terms.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/error_terms.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/estimation.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/estimation.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/helper_func.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/helper_func.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/input_data.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/input_data.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file removed code/__pycache__/metropolis_hastings.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/operators.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/operators.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/preprocessing.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/results.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/results.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/runner.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/runner.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/runner_estimation.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/runner_estimation.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/runner_multiday.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/runner_multiday.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/settings.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/settings.cpython-37.pyc
Binary file not shown.
Binary file removed code/__pycache__/simulation.cpython-310.pyc
Binary file not shown.
Binary file removed code/__pycache__/simulation.cpython-37.pyc
Binary file not shown.
156 changes: 156 additions & 0 deletions gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Don't track these files

*~
.DS_Store
.vscode
.Rhistory

# Folders
/dask-worker-space/
/data/DISDRODB/Processed

# 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/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
_version.py

# 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
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# 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/
docs/source/api

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

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

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site
*.bkp

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

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
train_interactive.py
tmp_fig.py
log.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "oasisis"
authors = [
{name = "Janody Pougala",email = "janody.pougala@epfl.ch"},
]
description = "This is a stable version of the OASIS activity-based framework. This repository includes the simulation code, based on the Python API of the CPLEX solver."
readme = "README.md"
keywords = ["python", "disdrometer"]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]
requires-python = ">=3.8"
dependencies = [
"click",
"cplex",
"docplex",
"joblib",
"json5",
"jsonschema",
"matplotlib",
"numpy",
"ortools",
"pandas",
"python-dateutil",
"python-json-logger",
"scipy",
"seaborn",
"geopy"
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
]

[tool.setuptools_scm]
write_to = "oasisis/_version.py"

[tool.setuptools]
packages = ["oasisis"]
14 changes: 0 additions & 14 deletions requirements.txt

This file was deleted.

0 comments on commit 56cbff2

Please sign in to comment.