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

Story/cico 13 #11

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions .github/workflows/github-actions-demo.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this action is doing anything? Just checking out and installing ruff?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the action should run the tests.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [ push, pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v1
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: check-ast
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
81 changes: 0 additions & 81 deletions CitesphereConnector.py

This file was deleted.

37 changes: 0 additions & 37 deletions CitesphereConnectorTest.py

This file was deleted.

29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## Citesphere Connector
# Citesphere Connector

Python library to connect to Citephere using its [API](https://documenter.getpostman.com/view/19365454/UVeMJiyx).
Python library to connect to Citephere using its [API](https://documenter.getpostman.com/view/19365454/UVeMJiyx).


## PyPi Package Installation

`pip install citesphere-connector`


## Developer Setup

Create a python virtual environment outside of this project's root directory `python3 -m venv env` and activate it `source env/bin/activate`

Navigate to the project root and download package dependencies `pip install -r requirements.txt`

For retrieivng the Bearer access token required for endpoint method calls, please see the following OAuth2 [documentation] (https://diging.atlassian.net/wiki/spaces/OAC/pages/3533078792/Getting+OAuth2+Access+Token+in+Postman) for Citesphere

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the pre-commit hooks need to be installed too, don't they?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was my understanding that as long as the pre-commit yaml file is present, you don't need to directly install anything


## User Guide

Retrieve Bearer access token required for endpoint method calls: [documentation] (https://diging.atlassian.net/wiki/spaces/OAC/pages/3533078792/Getting+OAuth2+Access+Token+in+Postman)

### Downloading Files
Use the 'Download' Jupyter notebook to download files from Citesphere to your local device.

### Uploading Files
Use the 'Upload' Jupyter notebook to upload files to Citesphere from your local device.
Empty file added __init__.py
Empty file.
7 changes: 0 additions & 7 deletions authentication.py

This file was deleted.

41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "citesphere-connector"
version = "1.0.0"
dependencies = [
"cfgv",
"distlib",
"filelock",
"identify",
"nodeenv",
"platformdirs",
"pre_commit",
"PyYAML",
"ruff",
"virtualenv",
]
requires-python = ">= 3.9"
authors = [
{name = "Digital Innovation Group", email = "[email protected]"},
{name = "Julia Damerow", email = "[email protected]"},
]
maintainers = [
{name = "Julia Damerow", email = "[email protected]"},
]
description = "Connect to Citesphere, an application that enables superior management of Zotero citations"
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["cite", "diging", "citesphere", "sphere", "zotero"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Research Software Engineers, Researchers, Data Scientists, Developers",
"Topic :: Reserach Software Engineering :: Citation Manager",
"Programming Language :: Python",
]

[project.urls]
"Citesphere API" = "https://documenter.getpostman.com/view/19365454/UVeMJiyx"
"Citesphere" = "https://diging-dev.asu.edu/citesphere-review/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take this out.

10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cfgv==3.4.0
distlib==0.3.9
filelock==3.16.1
identify==2.6.2
nodeenv==1.9.1
platformdirs==4.3.6
pre_commit==4.0.1
PyYAML==6.0.2
ruff==0.7.4
virtualenv==20.27.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be installed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And does it really need all these dependencies?

36 changes: 36 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""A setuptools based setup module.

See:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
https://github.com/pypa/sampleproject
"""

from setuptools import setup, find_packages
import pathlib

here = pathlib.Path(__file__).parent.resolve()

long_description = (here / "README.md").read_text(encoding="utf-8")

setup(
name="citesphere-connector",
version="1.0.0",
description="Connect to Citesphere, an application that enables superior management of Zotero citations",
url="https://github.com/diging/citesphere-connector",
author="Digital Innovation Group",
author_email="[email protected]",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Research Software Engineers, Researchers, Data Scientists, Developers",
"Topic :: Reserach Software Engineering :: Citation Manager",
"Programming Language :: Python",
],
keywords="cite, diging, citesphere, sphere, zotero",
package_dir={"": "src"},
packages=find_packages(where="src"),
python_requires=">=3.9",
project_urls={
"Citesphere API": "https://documenter.getpostman.com/view/19365454/UVeMJiyx",
"Citesphere": "https://diging-dev.asu.edu/citesphere-review/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

},
)
Loading
Loading