Skip to content
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
31 changes: 0 additions & 31 deletions .github/workflows/coverage.yaml

This file was deleted.

17 changes: 11 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: [3.12]
# ["3.6", "3.7", "3.8", "3.9"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_dev.txt
pip install -e .
pip install tox tox-gh-actions

- name: Test with tox
run: tox

- name: Run pytest
env:
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
DEPOSITION_ID: ${{ secrets.DEPOSITION_ID }}
run: pytest tests/test_zenodopy.py -v
39 changes: 39 additions & 0 deletions .github/workflows/version_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:

UploadToZenodo:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: install req
run: pip install git+https://github.com/drifter089/zenodopy.git@basic_test#egg=zenodopy

- name: Update Zenodo Deposition
run: |
python tests/test_version.py \
--version_tag "${{ github.ref_name }}" \
--zenodo_token "${{ secrets.ZENODO_TOKEN }}" \
--dep_id "${{ secrets.DEPOSITION_ID }}" \
--base_dir "${{ github.workspace }}" \
--metadata_file "${{ github.workspace }}/.zenodo.json" \
--upload_dir "${{ github.workspace }}/"
18 changes: 18 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"metadata": {
"title": "Zenodo CI test",
"upload_type": "other",
"description": "",
"version": "0.1.0",
"access_right": "open",
"license": "Apache-2.0",
"keywords": ["zenodo", "github", "git"],
"publication_date":"",
"creators": [
{
"name": "Jhon, Doe",
"orcid": "0000-0003-2584-3576"
}
]
}
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=42.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
addopts = "--cov=zenodopy"
# addopts = "--cov=zenodopy"
testpaths = [
"tests",
]
Expand Down
3 changes: 2 additions & 1 deletion src/zenodopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
Set up module access for the base package
"""
from .zenodopy import Client
from .zenodopy import ZenodoMetadata

__all__ = ['Client']
__all__ = ['Client','ZenodoMetadata']
Loading
Loading