Giter Site home page Giter Site logo

colintalbert / usgs_datatools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from usgs-sdm/usgs_datatools

0.0 1.0 0.0 494 KB

USGS Data Management Tools python package ✨☄️✨

License: MIT License

Makefile 1.06% Python 18.15% CSS 12.93% JavaScript 45.66% HTML 22.19%

usgs_datatools's Introduction

USGS Data Tools

A python package to assist with data management best practices.

USGS Digital Object Identifer Tool (internal tool)

This module supports a python wrapper ontop of the usgs doi tool.

✅ User sessions

✅ Creating digital object identifiers

✅ Update digital object identifiers

✅ Query the tool

Datacite

Convienience function to query a DOI that's in DataCite to return attributes.

✅ Query DOI

Metadata Parser

✅ Validate local files (XML)

Quick Start

from usgs_datatools import doi

doi_session = doi.DoiSession()
doi_session.doi_authenticate("[email protected]", "somepassword")

# Get DOI
my_doi = doi_session.get_doi("doi:10.5066/xxxx")

# Create DOI
doi_session.doi_create({'title': 'USGS Datatools Test Creation',
                        'datasource_id': '17501', 
            		   'status': 'reserved'})

Install

The preferred method for installation is using the latest version release here on github.

pip install -e git+https://github.com/bserna-usgs/usgs_datatools.git@latest

Local files

If you are working with a downloaded copy of this package here's some helpful steps

Install python requirements (using pipenv)

pipenv install

I will periodically update the requirements.txt file as well

pip install -r requirements.txt

Examples

Please see the examples/notebook directory for a sample of DOI Tool usage (querying, creating, modifying).

Datacite queries can be ran using the new doi.datacite_search(10.5066/xxxxx) method.

Contributions

All kinds of contibutions are greatly appreicated, please see the CONTRIBUTING.rst file for more information link

Testing

Testing is setup using pytest and can be started using the command below.

python -m pytest tests/

Development

Update versions

# preferred and w/o commit 
bumpversion minor

# old
bumpversion  --current-version 0.2.0 minor --allow-dirty

Documentation

Go into the docs folder and build

make html

Provisional Software Disclaimer Under USGS Software Release Policy, the software codes here are considered preliminary, not released officially, and posted to this repo for informal sharing among colleagues.

This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The software has not received final approval by the U.S. Geological Survey (USGS). No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software.

usgs_datatools's People

Contributors

brandonserna avatar colintalbert avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.