Skip to content

Commit

Permalink
Dev/update dependencies (#3)
Browse files Browse the repository at this point in the history
* remove un-needed files

* update

* update

* update

* add ci workflow

* clean

* add pytest

* add import test

* add release workflows

* move to src

* replace the setup.py by pyproject.toml

* add test dependencies

* clean

* add history
  • Loading branch information
MAfarrag authored Dec 29, 2024
1 parent 10822be commit e4a03aa
Show file tree
Hide file tree
Showing 43 changed files with 230 additions and 662 deletions.
33 changes: 0 additions & 33 deletions .azure-pipelines/azure-pipelines-linux.yml

This file was deleted.

1 change: 0 additions & 1 deletion .ci_support/README

This file was deleted.

14 changes: 0 additions & 14 deletions .ci_support/linux_.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .circleci/config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/automerge.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/conda-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: conda-deployment

on: [push]

jobs:
Main-package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
env:
OS: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
mamba-version: "*"
use-mamba: true
auto-update-conda: false
auto-activate-base: false
environment-file: environment.yml
activate-environment: test
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
show-channel-urls: true

- name: Install dev-dependencies
run: |
pip install .[test]
- name: Run tests
shell: bash -el {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
pytest -sv
36 changes: 36 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: gitHub-release

on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup GitHub CLI
run: |
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
- name: Extract tag name
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV


- name: Create GitHub Release
id: create_release
run: |
gh release create $TAG_NAME --title "$TAG_NAME" --notes-from-tag
env:
GH_TOKEN: ${{ secrets.CREATE_RELEASE }}
29 changes: 29 additions & 0 deletions .github/workflows/pypi-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pypi-deployment

on: [push]

jobs:
Main-Package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
env:
OS: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install dependencies
run: |
pip install .[test]
- name: Run Tests
run: |
pytest -vvv
40 changes: 40 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: pypi-release

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest

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

- name: Install poetry
run: |
pip install poetry
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERS }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry build
twine upload dist/*
42 changes: 0 additions & 42 deletions .github/workflows/snyk-infrastructure-analysis.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/webservices.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .scripts/build_steps.sh

This file was deleted.

Loading

0 comments on commit e4a03aa

Please sign in to comment.