Quantifying the Commons
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.
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 conduct@creativecommons.org per our reporting guidelines.
See CONTRIBUTING.md
.
Please note that in the directory tree below, all instances of fetch
,
process
, and report
are referring to the three phases of data gathering,
processing, and report generation.
Quantifying/
├── .github/
│ ├── workflows/
│ │ ├── fetch.yml
│ │ ├── process.yml
│ │ ├── report.yml
│ │ └── static_analysis.yml
├── data/ # Data generated by script runs
│ ├── 20XXQX/
│ │ ├── 1-fetch/
│ │ ├── 2-process/
│ │ ├── 3-report/
│ │ │ └── README.md # All generated reports are displayed in the README
│ └── ...
├── dev/
├── pre-automation/ # All Quantifying work prior to adding automation system
├── scripts/ # Run scripts for all phases
│ ├── 1-fetch/
│ ├── 2-process/
│ ├── 3-report/
│ └── shared.py
├── .cc-metadata.yml
├── .flake8 # Python tool configuration
├── .gitignore
├── .pre-commit-config.yaml # Static analysis configuration
├── LICENSE
├── Pipfile # Specifies the project's dependencies and Python version
├── Pipfile.lock
├── README.md
├── env.example
├── history.md
├── pyproject.toml # Python tools configuration
└── sources.md
For information on learning and installing the prerequisite technologies for this project, please see Foundational technologies — Creative Commons Open Source.
This repository uses pipenv to manage the required Python modules:
pipenv
:
brew install pipenv
pipenv
:
pipenv sync --dev
To successfully run scripts that require client credentials, you will need to follow these steps:
env.example
file in the script's directory to
.env
:
cp env.example .env
.env
file and assign values as needed. See
sources.md
on how to get credentials:
GCS_DEVELOPER_KEY = your_api_key
GCS_CX = your_pse_id
.env
file.Static analysis tools ensure the codebase adheres to consistent formatting and style guidelines, enhancing readability and maintainability. Also see GitHub Actions, below.
pre-commit
Pre-commit allows for static analysis tools (black
, flake8
, isort
, etc.)
to be run manually or with every commit:
pipenv run pre-commit install
./dev/check.sh [FILE]
If no file(s) are specified, then it runs against all files:
./dev/check.sh
.pre-commit-config.yaml
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.
Kindly visit the sources.md
file for it.
For information on past efforts, see history.md
.
LICENSE
: the code within this repository is licensed under the
Expat/MIT license.
The data within this repository is dedicated to the public domain under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
The documentation within the project is licensed under a Creative Commons Attribution 4.0 International License.