Skip to content

Commit e48700c

Browse files
committed
Publish code base
1 parent cda0d7e commit e48700c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4227
-2
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to Conda
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish_conda:
8+
name: Build and Upload to Conda
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Miniconda
16+
uses: conda-incubator/setup-miniconda@v2
17+
with:
18+
auto-update-conda: true
19+
python-version: "3.11"
20+
channels: conda-forge,defaults
21+
22+
- name: Install Conda Build Tools
23+
run: |
24+
conda install -y conda-build anaconda-client conda-verify
25+
conda config --add channels conda-forge
26+
27+
- name: Build Conda Package
28+
run: conda build -c conda-forge recipe/
29+
30+
- name: Get Package Path
31+
run: echo "PACKAGE_PATH=$(conda build --output recipe/)" >> $GITHUB_ENV
32+
33+
- name: Upload to Anaconda Cloud
34+
env:
35+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
36+
run: |
37+
source $(conda info --base)/etc/profile.d/conda.sh
38+
conda activate base
39+
which anaconda
40+
anaconda upload --user algotom $PACKAGE_PATH

.github/workflows/pypi_release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish_pypi:
8+
name: Build and Upload to PyPI
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.11"
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine build
24+
25+
- name: Build package
26+
run: python -m build
27+
28+
- name: Publish to PyPI
29+
env:
30+
TWINE_USERNAME: "__token__"
31+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
32+
run: twine upload dist/*

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Publish to PyPI and Conda
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish_pypi:
9+
name: Build and Upload to PyPI
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine build
25+
26+
- name: Build package
27+
run: python -m build
28+
29+
- name: Publish to PyPI
30+
env:
31+
TWINE_USERNAME: "__token__"
32+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
33+
run: twine upload dist/*
34+
35+
publish_conda:
36+
name: Build and Upload to Conda
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
- name: Set up Miniconda
44+
uses: conda-incubator/setup-miniconda@v2
45+
with:
46+
auto-update-conda: true
47+
python-version: "3.11"
48+
channels: conda-forge,defaults
49+
50+
- name: Install Conda Build Tools
51+
run: |
52+
conda install -y conda-build anaconda-client conda-verify
53+
conda config --add channels conda-forge
54+
55+
- name: Build Conda Package
56+
run: conda build -c conda-forge recipe/
57+
58+
- name: Get Package Path
59+
run: echo "PACKAGE_PATH=$(conda build --output recipe/)" >> $GITHUB_ENV
60+
61+
- name: Upload to Anaconda Cloud
62+
env:
63+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
64+
run: |
65+
source $(conda info --base)/etc/profile.d/conda.sh
66+
conda activate base
67+
which anaconda
68+
anaconda upload --user algotom $PACKAGE_PATH

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run utility tests
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
push:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test_utilities:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
16+
17+
steps:
18+
- name: 1. Checkout repository code
19+
uses: actions/checkout@v4
20+
21+
- name: 2. Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: 3. Install dependencies (Standard setup)
27+
run: |
28+
python -m pip install --upgrade pip
29+
30+
- name: 4. Run simplified utility tests
31+
run: |
32+
python -m unittest discover -s tests -p "test_*.py"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ __pycache__/
66
# C extensions
77
*.so
88

9+
# Local Folder
10+
dev/
11+
912
# Distribution / packaging
1013
.Python
1114
build/

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/scriptrunner.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)