Skip to content

Dev/minimal flow #16

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

Merged
merged 10 commits into from
Aug 21, 2024
Merged
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
28 changes: 28 additions & 0 deletions .github/actions/install-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Package
description: Install python and package
inputs:
python-version:
description: "Python version"
required: true
os:
description: "Operating system"
required: true

runs:
using: "composite"
steps:
- name: Install Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Install dependencies
run: |
pip install -r dev_requirements.txt
shell: bash

- name: List dependencies
run: |
pip list
shell: bash
47 changes: 47 additions & 0 deletions .github/actions/test-unit/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Test Unit
description: Check unit tests
inputs:
python-version:
description: "Python version"
required: true
os:
description: "Operating system"
required: true
report_job:
description: "Job name to update by JUnit report"
required: true

runs:
using: "composite"
steps:
- name: Install package
uses: ./.github/actions/install-package
with:
python-version: ${{ inputs.python-version }}
os: ${{ inputs.os }}-latest

- name: Test
run: |
pytest -v ./tests/unit/ \
--timeout=120 --timeout_method=thread \
--color=yes \
--junitxml="./test-results/test-unit-new-${{ inputs.os }}-${{ inputs.python-version }}.xml"
shell: bash

- name: Upload test reports
uses: actions/upload-artifact@v3
if: always()
with:
name: test-artifacts
path: ./test-results

- name: Report
uses: mikepenz/action-junit-report@v3.6.2
if: always()
with:
report_paths: './test-results/test-unit-*.xml'
update_check: true
include_passed: true
annotate_notice: true
job_name: ${{ inputs.report_job }}
30 changes: 30 additions & 0 deletions .github/workflows/unit-in-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Unittests

on:
workflow_dispatch:
push:
branches-ignore:
- main

jobs:
test:
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
python-version: ["3.8"]
name: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run tests
uses: ./.github/actions/test-unit
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
report_job: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
35 changes: 35 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: unit

on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Run every day at arbitrary time (4:00 AM UTC)
push:
branches:
- main

jobs:
test:
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu, windows, macos]

name: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- name: Run tests
uses: ./.github/actions/test-unit
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
report_job: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ repos:
args: [ --config-file, pyproject.toml ]
pass_filenames: false
additional_dependencies:
- neptune-api==0.3.0
- neptune-api==0.4.0
- more-itertools
default_language_version:
python: python3
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
## [UNRELEASED] neptune-client-scale 0.1.0
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Added minimal Run classes ([#6](https://github.com/neptune-ai/neptune-client-scale/pull/6))
- Added support for `max_queue_size` and `max_queue_size_exceeded_callback` parameters in `Run` ([#7](https://github.com/neptune-ai/neptune-client-scale/pull/7))
- Added support for logging metadata ([#8](https://github.com/neptune-ai/neptune-client-scale/pull/8))
- Added support for `creation_time` ([#9](https://github.com/neptune-ai/neptune-client-scale/pull/9))
- Added support for Forking ([#9](https://github.com/neptune-ai/neptune-client-scale/pull/9))
- Added support for Experiments ([#9](https://github.com/neptune-ai/neptune-client-scale/pull/9))
- Added support for Run resume ([#9](https://github.com/neptune-ai/neptune-client-scale/pull/9))
- Added support for env variables for project and api token ([#11](https://github.com/neptune-ai/neptune-client-scale/pull/11))
3 changes: 3 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

# dev
pre-commit
pytest
pytest-timeout
freezegun
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ pattern = "default-unprefixed"
[tool.poetry.dependencies]
python = "^3.8"

# Networking
neptune-api = "0.3.0"
neptune-api = "0.4.0"
more-itertools = "^10.0.0"

[tool.poetry]
name = "neptune-client-scale"
Expand Down
Loading
Loading