Skip to content

Commit e9f51e5

Browse files
Merge pull request #132 from CITCOM-project/PyPI_setup
Add github actions to publish to PyPI
2 parents 1098043 + 2d70b6b commit e9f51e5

File tree

4 files changed

+111
-51
lines changed

4 files changed

+111
-51
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish python PyPI
2+
3+
jobs:
4+
build-release:
5+
name: Build and publish PyPI
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
with:
10+
fetch-depth: 0
11+
- name: Set up Python
12+
uses: actions/setup-python@v3
13+
with:
14+
python-version: 3.9
15+
- name: Installing package
16+
run: |
17+
pip3 install .
18+
pip3 install .[pypi]
19+
pip3 install build
20+
- name: Build Package
21+
run: |
22+
python -m build --no-isolation
23+
- name: Publish package to PyPI
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish python PyPI test
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build-release:
10+
name: Build and publish to TestPyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
- name: Set up Python
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: 3.9
20+
- name: Installing package
21+
run: |
22+
pip3 install .
23+
pip3 install .[pypi]
24+
pip3 install build
25+
- name: Build Package
26+
run: |
27+
python -m build --no-isolation
28+
- name: Publish package to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
32+
repository_url: https://test.pypi.org/legacy/

pyproject.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=45",
4+
"setuptools_scm[toml]>=6.2",
5+
"wheel"
6+
]
7+
build-backend = "setuptools.build_meta"
8+
[project]
9+
name="causal_testing_framework"
10+
authors=[{name = "The CITCOM team"}]
11+
description="A framework for causal testing using causal directed acyclic graphs."
12+
readme = "README.md"
13+
requires-python = ">=3.9"
14+
license = {text = "MIT"}
15+
keywords = ["causal inference", "verification"]
16+
dependencies = [
17+
"econml~=0.12",
18+
"fitter~=1.4",
19+
"lhsmdu~=1.1",
20+
"networkx~=2.6",
21+
"numpy~=1.22",
22+
"pandas~=1.3",
23+
"scikit_learn~=1.1",
24+
"scipy~=1.7",
25+
"statsmodels~=0.13",
26+
"tabulate~=0.8",
27+
"z3_solver~=4.11.2",
28+
] # z3_solver does not follow semantic versioning and tying to 4.11 introduces problems
29+
dynamic = ["version"]
30+
31+
[project.optional-dependencies]
32+
dev = [
33+
"autopep8",
34+
"isort",
35+
"pytest",
36+
"pylint",
37+
"black",
38+
"autoapi",
39+
"myst-parser",
40+
"sphinx-autoapi",
41+
"sphinx_rtd_theme",
42+
]
43+
44+
[project.urls]
45+
Bug_Tracker = "https://github.com/CITCOM-project/CausalTestingFramework/issues"
46+
Documentation = "https://causal-testing-framework.readthedocs.io/"
47+
Source = "https://github.com/CITCOM-project/CausalTestingFramework"
48+
49+
[tool.setuptools.packages.find]
50+
where = ["causal_testing"]
51+
52+
[tool.setuptools_scm]
53+
154
[tool.black]
255
# https://github.com/psf/black
356
line-length = 120

setup.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)