-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
96 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,63 @@ | ||
name: Release | ||
name: Automated Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
release: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10.14' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install bump2version | ||
python setup.py install | ||
- name: Bump version | ||
- name: Install Poetry | ||
run: | | ||
bump2version patch # You can change this to major/minor as needed | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
POETRY_HOME: ${{ runner.temp }}/poetry | ||
|
||
- name: Add Poetry to PATH | ||
run: echo "${{ runner.temp }}/poetry/bin" >> $GITHUB_PATH | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Run tests | ||
run: poetry run pytest | ||
|
||
- name: Build package | ||
run: poetry build | ||
|
||
- name: Publish package | ||
run: poetry publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} | ||
|
||
- name: Configure git for committing version bump | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Bump version | ||
id: bump_version | ||
run: | | ||
NEW_VERSION=$(poetry version patch | awk '{print $2}') | ||
echo "New version: $NEW_VERSION" | ||
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV | ||
git commit -am "Bump version to $NEW_VERSION" | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./dist/* | ||
asset_name: my_package-${{ github.ref }}.tar.gz # Adjust based on your build output | ||
asset_content_type: application/gzip | ||
- name: Push version bump | ||
run: | | ||
git tag -a v${{ env.new_version }} -m "Release v${{ env.new_version }}" | ||
git push --follow-tags | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["poetry-core", "wheel"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
#[tool.setuptools_scm] | ||
#write_to = "aodndata/_version.py" | ||
|
||
[project] | ||
name = "aodn_cloud_optimised" | ||
[tool.poetry] | ||
name = "aodn-cloud-optimised" | ||
version = "0.1.0" | ||
description = "Cloud optimised data formats for IMOS NetCDF files and CSVs." | ||
authors = [ | ||
{ name = "Laurent Besnard", email = "[email protected]" } | ||
] | ||
authors = ["lbesnard <[email protected]>"] | ||
license = "GNU General Public License v3.0" | ||
readme = "README.md" | ||
version = "0.1.0" | ||
license = { text = "GNU General Public License v3.0" } | ||
keywords = ["cloud", "data", "NetCDF", "CSV", "Zarr", "Parquet"] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
|
@@ -26,8 +21,49 @@ classifiers = [ | |
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/aodn/aodn_cloud_optimised" | ||
|
||
[tool.poetry.urls] | ||
"Source code" = "https://github.com/aodn/aodn_cloud_optimised" | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "==3.10.14" | ||
netCDF4 = ">=1.6.5" | ||
numpy = ">=1.26.4" | ||
pandas = ">=2.2.2" | ||
python-dateutil = ">=2.9.0" | ||
jsonschema = ">=4.22.0" | ||
h5py = ">=3.11.0" | ||
scipy = ">=1.13.0" | ||
boto3 = ">=1.34.100" | ||
pyarrow = "==16.0.0" | ||
rechunker = ">=0.5.2" | ||
s3fs = ">=2024.3.1" | ||
shapely = ">=2.0.4" | ||
xarray = { version = ">=2024.3.0", extras = ["complete"] } | ||
zarr = ">=2.18.0" | ||
|
||
[tool.poetry.extras] | ||
testing = ["pytest", "ipython", "ipdb"] | ||
interactive = ["pytest", "ipython", "ipdb"] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
aatams_acoustic_tagging = "aodn_cloud_optimised.bin.aatams_acoustic_tagging:main" | ||
acorn_gridded_qc_turq = "aodn_cloud_optimised.bin.acorn_gridded_qc_turq:main" | ||
anfog_to_parquet = "aodn_cloud_optimised.bin.anfog_to_parquet:main" | ||
anmn_ctd_to_parquet = "aodn_cloud_optimised.bin.anmn_ctd_to_parquet:main" | ||
anmn_hourly_timeseries = "aodn_cloud_optimised.bin.anmn_hourly_timeseries:main" | ||
anmn_aqualogger_to_parquet = "aodn_cloud_optimised.bin.anmn_aqualogger_to_parquet:main" | ||
ardc_wave_to_parquet = "aodn_cloud_optimised.bin.ardc_wave_to_parquet:main" | ||
argo_to_parquet = "aodn_cloud_optimised.bin.argo_to_parquet:main" | ||
gsla_nrt_to_zarr = "aodn_cloud_optimised.bin.gsla_nrt_to_zarr:main" | ||
soop_xbt_nrt_to_parquet = "aodn_cloud_optimised.bin.soop_xbt_nrt_to_parquet:main" | ||
srs_oc_ljco_to_parquet = "aodn_cloud_optimised.bin.srs_oc_ljco_to_parquet:main" | ||
srs_l3s_1d_dn_to_zarr = "aodn_cloud_optimised.bin.srs_l3s_1d_dn_to_zarr:main" | ||
|
||
[tool.poetry.include] | ||
"*.json" = ["aodn_cloud_optimised/config/*.json", "aodn_cloud_optimised/config/dataset/*.json"] |