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

changes to add new version to exisitng deposition #4

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 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.

16 changes: 10 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,25 @@ 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 }}
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