GithubHelp home page GithubHelp logo

imajin14 / quantifying Goto Github PK

View Code? Open in Web Editor NEW

This project forked from creativecommons/quantifying

0.0 0.0 0.0 58.02 MB

Quantifying the Commons

License: MIT License

Shell 0.01% Python 0.92% HTML 37.11% Jupyter Notebook 61.97%

quantifying's Introduction

quantifying

Quantifying the Commons

Overview

This project seeks to quantify the size and diversity of the commons--the collection of works that are openly licensed or in the public domain.

Code of conduct

CODE_OF_CONDUCT.md:

The Creative Commons team is committed to fostering a welcoming community. This project and all other Creative Commons open source projects are governed by our Code of Conduct. Please report unacceptable behavior to [email protected] per our reporting guidelines.

Contributing

See CONTRIBUTING.md.

Development

Prerequisites

This repository uses pipenv to manage the required Python modules:

  1. Install pipenv:
  2. Create the Python virtual environment and install prerequisites using pipenv:
    pipenv sync --dev

Running scripts that require client credentials

To successfully run scripts that require client credentials, you will need to follow these steps:

  1. Copy the contents of the env.example file in the script's directory to .env:
    cp env.example .env
  2. Uncomment the variables in the .env file and assign values as needed. See sources.md on how to get credentials:
    GOOGLE_API_KEYS=your_api_key
    PSE_KEY=your_pse_key
    
  3. Save the changes to the .env file.
  4. You should now be able to run scripts that require client credentials without any issues.

Static analysis

Static analysis tools ensure the codebase adheres to consistent formatting and style guidelines, enhancing readability and maintainability. Also see GitHub Actions, below.

Pre-commit allows for static analysis tools (black, flake8, isort, etc.) to be run manually or with every commit:

  1. (Pre-commit is installed by completing Create the Python virtual environment and install prerequisites, above)
  2. Install or run manually
    • Install the git hook scripts to enable automatic execution on every commit
      pipenv run pre-commit install
    • Run manually before commit:
      pipenv run pre-commit run -a
  3. (Optional) review the configuration file: .pre-commit-config.yaml

Using dev/tools.sh helper script

The dev/tools.sh helper script runs the static analysis tools (black, flake8, and isort):

./dev/tools.sh

It can also accept command-line arguments to specify specific files or directories to check:

./dev/tools.sh PATH/TO/MY/FILE.PY

Resources

  • Python Guidelines โ€” Creative Commons Open Source
  • Black: the uncompromising Python code formatter
  • flake8: a python tool that glues together pep8, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.
  • isort: A Python utility / library to sort imports
    • (It doesn't import any libraries, it only sorts and formats them.)
  • ppypa/pipenv: Python Development Workflow for Humans.
  • pre-commit: A framework for managing and maintaining multi-language pre-commit hooks.
  • Logging: Utilize the built-in Python logging module to implement a flexible logging system from a shared module.

GitHub Actions

The .github/workflows/python_static_analysis.yml GitHub Actions workflow performs static analysis (black, flake8, and isort) on committed changes. The workflow is triggered automatically when you push changes to the main branch or open a pull request.

Data sources

Kindly visit the sources.md file for it.

History

For information on past efforts, see history.md.

Copying & license

Code

LICENSE: the code within this repository is licensed under the Expat/MIT license.

Data

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication button

The data within this repository is dedicated to the public domain under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.

Documentation

CC BY 4.0 license button

The documentation within the project is licensed under a Creative Commons Attribution 4.0 International License.

quantifying's People

Contributors

timidrobot avatar bransthre avatar susannyy avatar iammqaisar avatar naishasinha avatar nox1134 avatar siddheshhr avatar samadpls avatar paulooh007 avatar darylgolden avatar meghananalla avatar chetan0402 avatar joinasadullah 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.