Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build config #142

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/conda/bld.bat

This file was deleted.

7 changes: 0 additions & 7 deletions .github/conda/build.sh

This file was deleted.

4 changes: 0 additions & 4 deletions .github/conda/conda_build_config.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/conda/meta.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .github/versionBackup.txt

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI

on: [push]
on:
push:
branches:
- "**"
tags:
- "**"
pull_request:

jobs:
build:
Expand Down
67 changes: 3 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,71 +38,10 @@ jobs:
run: |
conda env update --file environment.yml --name base

- name: Get version
run: |
output=$(python dl1_data_handler/versionScript.py)
echo "version=$output" >> $GITHUB_OUTPUT
id: step1

- name: Write
uses: 1arp/create-a-file-action@0.4.5
with:
path: '.'
isAbsolutePath: true
file: '.github/versionBackup.txt'
content: |
${{ steps.step1.outputs.version }}

- name: Push changes
run: |
git config --global user.email "rcervino@ucm.es"
git config --global user.name "rcervinoucm"
git status
git add .
git commit -m "version update" --allow-empty
git push

- name: Build package
run: |
python setup.py sdist bdist_wheel # Could also be python -m build
python --version
pip install -U build
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

condapublish:
strategy:
matrix:
os: [ubuntu-22.04]
pyv: ["3.10"]
max-parallel: 5
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: write
deployments: write
statuses: write
actions: write
checks: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.pyv }}
run: |
conda install -y python=${{ matrix.pyv }}

- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH

- name: Install dependencies
run: |
conda env update --file environment.yml --name base
sudo apt-get install python3-numpy

- name: publish-to-conda
uses: fcakyon/conda-publish-action@v1.3
with:
subdir: '.github/conda'
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#Ignore files
#############

dl1_data_handler/_version.py
*.o
*.png
*.h5
*.simtel.gz
dl1_data_handler/__pycache__
build
dist
dl1_data_handler.egg-info
*.egg-info/
4 changes: 1 addition & 3 deletions dl1_data_handler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
from .processor import *
from .reader import *
from .transforms import *
from .version import *

__version__ = get_version(pep440=False)
from ._version import __version__
187 changes: 0 additions & 187 deletions dl1_data_handler/version.py

This file was deleted.

8 changes: 0 additions & 8 deletions dl1_data_handler/versionScript.py

This file was deleted.

Loading