Skip to content

Commit

Permalink
Beautify Python and JSON files; Run isort on code; Auto-wrap with lin…
Browse files Browse the repository at this point in the history
…e-length 80 of Python files"
  • Loading branch information
skasberger committed Jul 1, 2020
1 parent 9db0f1d commit 7a14a93
Show file tree
Hide file tree
Showing 15 changed files with 446 additions and 351 deletions.
12 changes: 6 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: src/pyDataverse/docs/source/conf.py
configuration: src/pyDataverse/docs/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.6
version: 3.6
install:
- requirements: deps/docs-requirements.txt
- method: pip
path: .
- method: pip
path: .
system_packages: true
40 changes: 20 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
language: python
cache: pip
dist: xenial
language: python
cache: pip
dist: xenial

matrix:
include:
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.6
env: TOXENV=docs
- python: 3.6
env: TOXENV=coverage
- python: 3.6
env: TOXENV=coveralls
- python: 3.6
env: TOXENV=packaging
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.6
env: TOXENV=docs
- python: 3.6
env: TOXENV=coverage
- python: 3.6
env: TOXENV=coveralls
- python: 3.6
env: TOXENV=packaging

branches:
only:
Expand Down Expand Up @@ -48,4 +48,4 @@ notifications:
email:
recipients:
- stefan.kasberger@univie.ac.at
on_success: change
on_success: change
31 changes: 15 additions & 16 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down Expand Up @@ -68,10 +68,9 @@ members of the project's leadership.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

<https://www.contributor-covenant.org/faq>
9 changes: 3 additions & 6 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
.. :changelog:

0.2.0 - (2019-06-17) - Ida Pfeiffer
------------------------------------
## 0.2.0 - (2019-06-17) - Ida Pfeiffer

[Release](https://github.com/AUSSDA/pyDataverse/releases/tag/v0.2.0)

0.1.1 - (2019-05-28)
------------------------------------
## 0.1.1 - (2019-05-28)

[Release](https://github.com/AUSSDA/pyDataverse/releases/tag/v0.1.1)

0.1.0 - (2019-05-20) - Marietta Blau
------------------------------------
## 0.1.0 - (2019-05-20) - Marietta Blau

[Release](https://github.com/AUSSDA/pyDataverse/releases/tag/v0.1.0)
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@ and Datafiles.

**Features**

* Dataverse Api functionalities to create, get, publish and delete Dataverses, Datasets and Datafiles of your Dataverse instance via Api.
* Dataverse metadata model for easy manipulation and data conversion from and to other formats (e. g. Dataverse Api metadata JSON).
* Utils to support core functionalities.
* Custom exceptions
* Tests on [Travis CI](https://travis-ci.com/AUSSDA/pyDataverse) ([pytest](https://docs.pytest.org/en/latest/) + [tox](http://tox.readthedocs.io/)).
* [Documentation](https://pydataverse.readthedocs.io/en/latest/) (Sphinx, ReadTheDocs)
* Python 3
* Open Source ([MIT](https://opensource.org/licenses/MIT))
- Dataverse Api functionalities to create, get, publish and delete Dataverses, Datasets and Datafiles of your Dataverse instance via Api.
- Dataverse metadata model for easy manipulation and data conversion from and to other formats (e. g. Dataverse Api metadata JSON).
- Utils to support core functionalities.
- Custom exceptions
- Tests on [Travis CI](https://travis-ci.com/AUSSDA/pyDataverse) ([pytest](https://docs.pytest.org/en/latest/) + [tox](http://tox.readthedocs.io/)).
- [Documentation](https://pydataverse.readthedocs.io/en/latest/) (Sphinx, ReadTheDocs)
- Python 3
- Open Source ([MIT](https://opensource.org/licenses/MIT))

**pyDataverse pipeline**

![pyDataverse pipeline](assets/pipeline.png)

**Copyright**

* Sourcecode: [![GitHub](https://img.shields.io/github/license/aussda/pydataverse.svg)](https://opensource.org/licenses/MIT)
* Documentation: [![License: CC BY 4.0](https://licensebuttons.net/l/by/4.0/80x15.png)](https://creativecommons.org/licenses/by/4.0/)

- Sourcecode: [![GitHub](https://img.shields.io/github/license/aussda/pydataverse.svg)](https://opensource.org/licenses/MIT)
- Documentation: [![License: CC BY 4.0](https://licensebuttons.net/l/by/4.0/80x15.png)](https://creativecommons.org/licenses/by/4.0/)

## QUICKSTART

Expand Down
98 changes: 48 additions & 50 deletions schemas/json/datafile_upload_schema.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/AUSSDA/pyDataverse/schemas/json/datafile_upload_schema.json",
"type": "object",
"title": "Datafile JSON upload schema",
"description": "Describes the full Datafile metadata JSON file structure for a Dataverse API upload.",
"default": {},
"required": [
"pid",
"filename"
],
"additionalProperties": false,
"properties": {
"description": {
"$id": "#/properties/description",
"type": "string"
},
"categories": {
"$id": "#/properties/categories",
"type": "array",
"additionalItems": false,
"items": {
"anyOf": [
{
"$id": "#/properties/categories/items/anyOf/0",
"type": "string"
}
],
"$id": "#/properties/categories/items"
}
},
"restrict": {
"$id": "#/properties/restrict",
"type": "boolean"
},
"pid": {
"$id": "#/properties/pid",
"type": "string"
},
"filename": {
"$id": "#/properties/filename",
"type": "string"
},
"title": {
"$id": "#/properties/title",
"type": "string"
},
"directoryLabel": {
"$id": "#/properties/directoryLabel",
"type": "string"
}
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/AUSSDA/pyDataverse/schemas/json/datafile_upload_schema.json",
"type": "object",
"title": "Datafile JSON upload schema",
"description": "Describes the full Datafile metadata JSON file structure for a Dataverse API upload.",
"default": {},
"required": [
"pid",
"filename"
],
"additionalProperties": false,
"properties": {
"description": {
"$id": "#/properties/description",
"type": "string"
},
"categories": {
"$id": "#/properties/categories",
"type": "array",
"additionalItems": false,
"items": {
"anyOf": [{
"$id": "#/properties/categories/items/anyOf/0",
"type": "string"
}],
"$id": "#/properties/categories/items"
}
},
"restrict": {
"$id": "#/properties/restrict",
"type": "boolean"
},
"pid": {
"$id": "#/properties/pid",
"type": "string"
},
"filename": {
"$id": "#/properties/filename",
"type": "string"
},
"title": {
"$id": "#/properties/title",
"type": "string"
},
"directoryLabel": {
"$id": "#/properties/directoryLabel",
"type": "string"
}
}
}
108 changes: 53 additions & 55 deletions schemas/json/dataverse_upload_schema.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/AUSSDA/pyDataverse/schemas/json/dataverse_upload_schema.json",
"type": "object",
"title": "Dataverse JSON upload schema",
"description": "Describes the full Dataverse metadata JSON file structure for a Dataverse API upload.",
"required": [
"name",
"alias",
"dataverseContacts"
],
"additionalProperties": false,
"properties": {
"name": {
"$id": "#/properties/name",
"type": "string"
},
"alias": {
"$id": "#/properties/alias",
"type": "string"
},
"dataverseContacts": {
"$id": "#/properties/dataverseContacts",
"type": "array",
"additionalItems": false,
"items": {
"anyOf": [
{
"$id": "#/properties/dataverseContacts/items/anyOf/0",
"type": "object",
"required": [
"contactEmail"
],
"additionalProperties": false,
"properties": {
"contactEmail": {
"$id": "#/properties/dataverseContacts/items/anyOf/0/properties/contactEmail",
"type": "string"
}
}
}
],
"$id": "#/properties/dataverseContacts/items"
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/AUSSDA/pyDataverse/schemas/json/dataverse_upload_schema.json",
"type": "object",
"title": "Dataverse JSON upload schema",
"description": "Describes the full Dataverse metadata JSON file structure for a Dataverse API upload.",
"required": [
"name",
"alias",
"dataverseContacts"
],
"additionalProperties": false,
"properties": {
"name": {
"$id": "#/properties/name",
"type": "string"
},
"alias": {
"$id": "#/properties/alias",
"type": "string"
},
"dataverseContacts": {
"$id": "#/properties/dataverseContacts",
"type": "array",
"additionalItems": false,
"items": {
"anyOf": [{
"$id": "#/properties/dataverseContacts/items/anyOf/0",
"type": "object",
"required": [
"contactEmail"
],
"additionalProperties": false,
"properties": {
"contactEmail": {
"$id": "#/properties/dataverseContacts/items/anyOf/0/properties/contactEmail",
"type": "string"
}
},
"affiliation": {
"$id": "#/properties/affiliation",
"type": "string"
},
"description": {
"$id": "#/properties/description",
"type": "string"
},
"dataverseType": {
"$id": "#/properties/dataverseType",
"type": "string"
}
}
}],
"$id": "#/properties/dataverseContacts/items"
}
},
"affiliation": {
"$id": "#/properties/affiliation",
"type": "string"
},
"description": {
"$id": "#/properties/description",
"type": "string"
},
"dataverseType": {
"$id": "#/properties/dataverseType",
"type": "string"
}
}
}
Loading

0 comments on commit 7a14a93

Please sign in to comment.