Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
810d064
Relax PyYaml version requirements #1
pombredanne Apr 1, 2019
baed6b4
Partially support PyYAML 5.x
pombredanne Apr 8, 2019
7045677
Bump version
pombredanne Apr 9, 2019
037fd62
Use dedicated null dumper #1
pombredanne Apr 9, 2019
1f0a4c6
Update CI configuration
pombredanne Apr 9, 2019
8878fce
Improve Ci settings
pombredanne Apr 10, 2019
400c738
Do not run Travis on Py3.7. Do not use bin prefix
pombredanne Apr 10, 2019
fd19438
Do not use bin prefix
pombredanne Apr 10, 2019
1562549
Initial commit
steven-esser Sep 22, 2020
85d1780
Add initial skeleton files
steven-esser Sep 22, 2020
aa71e06
Use pytest-xdist by default for threading support
steven-esser Sep 22, 2020
774dc7d
Add additional files
steven-esser Sep 23, 2020
9a56b88
Follow modern python packaging and conf practices
steven-esser Sep 25, 2020
565feee
Add some minimal documentation
steven-esser Sep 25, 2020
5febefb
Fix hanging tag chars in setup.cfg
steven-esser Sep 29, 2020
343ff29
Update README instructions with proper git merge conventions
steven-esser Sep 30, 2020
fa55f68
Add minimal .travis.yml CI config file
steven-esser Oct 16, 2020
3296b9f
Update setuptools_scm declaration
steven-esser Oct 22, 2020
ad02f4e
Merge pull request #1 from nexB/add-initial-skeleton-files
steven-esser Oct 22, 2020
083bd04
Add azure pipeline config files and templates
JonoYang Oct 26, 2020
847564e
Fix path to Scripts directory
JonoYang Oct 27, 2020
0f293cb
Install current project in configure.bat
JonoYang Oct 27, 2020
63f6946
Call pytest from proper location
JonoYang Oct 27, 2020
7fd2506
Use newer VM images on Azure
JonoYang Oct 27, 2020
bceb8f9
Add .gitattributes
JonoYang Oct 29, 2020
e772fe6
Clean template
JonoYang Nov 4, 2020
ae44984
Merge pull request #11 from nexB/add-ci-config
JonoYang Nov 4, 2020
5593c2f
Merge pull request #14 from nexB/develop
JonoYang Nov 5, 2020
629abed
Update .gitignore to ignore Jupyter temp files
AyanSinhaMahapatra Nov 5, 2020
6001c74
Merge pull request #15 from nexB/jupyter-patch
pombredanne Nov 5, 2020
ef210cd
Quick doc update
steven-esser Nov 16, 2020
0b6caf9
Add RTD docs configuration file
AyanSinhaMahapatra Dec 10, 2020
f2c1400
Add basic RTD documentaion #4
AyanSinhaMahapatra Dec 10, 2020
e7d1990
Add RTD requirements file and test scripts
AyanSinhaMahapatra Dec 10, 2020
7d37af0
Add `src` folder to pass CI tests and RTD builds
AyanSinhaMahapatra Dec 16, 2020
b6ef568
Merge pull request #16 from AyanSinhaMahapatra/add-basic-docs
steven-esser Dec 21, 2020
03ffc8a
Ensure we use official full text of Apache 2.0
pombredanne Jan 6, 2021
98d4d69
Merge pull request #18 from nexB/apache-license
steven-esser Jan 6, 2021
5e386d9
Never ever let Git convert line delimiters
pombredanne Jan 14, 2021
2e48dca
Run tests on more OSes and Python versions
pombredanne Jan 14, 2021
b959539
Do not make wheel universal
pombredanne Jan 14, 2021
98641a0
Format and add license
pombredanne Jan 14, 2021
9fa3f31
Format
pombredanne Jan 14, 2021
0b8cd65
Improve documentation
pombredanne Jan 14, 2021
3007691
Format for spaces
pombredanne Jan 14, 2021
b49895c
Add manifest for source distributions
pombredanne Jan 14, 2021
d3e2d28
Add Apache license NOTICE
pombredanne Jan 14, 2021
a2a1901
Merge pull request #19 from nexB/update-boilerplate
steven-esser Jan 19, 2021
f46bc48
Default to 64 bits windows on CI
pombredanne Jan 24, 2021
51510cb
Fix .gitattributes
steven-esser Feb 11, 2021
386bb90
Merge pull request #21 from nexB/fix-gitattributes
steven-esser Feb 12, 2021
c975d88
Drop support for Python 2
pombredanne Mar 30, 2021
008ae90
Merge and adopt skeleton
pombredanne Mar 31, 2021
347378f
Remove Python2 reference
pombredanne Mar 31, 2021
794f2d8
Fix skeleton merge snafu
pombredanne Mar 31, 2021
3a39409
Remoeving extra empty line
pombredanne Mar 31, 2021
07921ea
Create proper changelog
pombredanne Mar 31, 2021
db533e1
Drop remaning Python 2 idioms
pombredanne Mar 31, 2021
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore all Git auto CR/LF line endings conversions
* -text
17 changes: 14 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ScanCode special files
/SCANCODE_DEV_MODE

# Python compiled files
*.py[cod]

Expand Down Expand Up @@ -44,9 +41,16 @@ htmlcov
.idea
org.eclipse.core.resources.prefs
.vscode
.vs

# Sphinx
docs/_build
docs/bin
docs/build
docs/include
docs/Lib
doc/pyvenv.cfg
pyvenv.cfg

# Various junk and temp files
.DS_Store
Expand All @@ -59,3 +63,10 @@ docs/_build

# pyenv
/.python-version
/man/
/.pytest_cache/
lib64
tcl

# Ignore Jupyter Notebook related temp files
.ipynb_checkpoints/
18 changes: 18 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Where the Sphinx conf.py file is located
sphinx:
configuration: docs/source/conf.py

# Setting the python version and doc build requirements
python:
install:
- method: pip
path: .
extra_requirements:
- docs
33 changes: 16 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
language: python
# This is a skeleton Travis CI config file that provides a starting point for adding CI
# to a Python project. Since we primarily develop in python3, this skeleton config file
# will be specific to that language.
#
# See https://config.travis-ci.com/ for a full list of configuration options.

os: linux

dist: xenial

language: python
python:
- "2.7"
- "3.6"
- "3.7"
- "3.8"

install:
- pip install -r requirements_dev.txt

script:
- bin/py.test -vvs tests
# Scripts to run at install stage
install: ./configure

notifications:
irc:
channels:
- "chat.freenode.net#aboutcode"
on_success: change
on_failure: always
use_notice: true
skip_join: true
template:
- "%{repository_slug}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} : %{build_url}"
# Scripts to run at script stage
script: tmp/bin/pytest
3 changes: 3 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The following organizations or individuals have contributed to this repo:

-
29 changes: 26 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
Changelog
=========

0.1 (2018-11-17)
----------------
v0.5 (2021-03-31)
-----------------

Initial release.
- Adopt https://github.com/nexB/skeleton
- Support Python 3 only, drop Python 2 support
- Support both PyYAML 5.x only
- Drop travis for Azure pipelines


v0.4 (2019-04-10)
-----------------

- Dump nulls correctly
- Fix CI on Travis
- Attempt to support PyYAML 5.x partially


v0.3 (2019-04-07)
-----------------

- Use OrderedDict to keep ordering of mappings


v0.1 (2018-11-17)
-----------------

- Initial release based on code originally used in ScanCode toolkit.
24 changes: 10 additions & 14 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
graft src
graft tests

prune src/saneyaml.egg-info

include CHANGELOG.rst
include README.rst
include CONTRIBUTING.rst
include apache-2.0.LICENSE
include *.LICENSE
include NOTICE
include MANIFEST.in
include setup.py
include setup.cfg
include .gitignore
include .travis.yml
include appveyor.yml
include saneyaml.ABOUT
include *.ABOUT
include *.toml
include *.yml
include *.rst
include setup.*
include configure*
include requirements*
include .git*

global-exclude *.py[co] __pycache__ *.*~

31 changes: 19 additions & 12 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
Copyright (c) 2018 nexB Inc. and others. All rights reserved.
http://nexb.com and https://github.com/nexB/saneyaml/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#
# Copyright (c) nexB Inc. and others.
# SPDX-License-Identifier: Apache-2.0
#
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
# ScanCode is a trademark of nexB Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ preserving ordering and avoiding surprises of type conversions by loading
everything except booleans as strings.
Optionally you can check for duplicated map keys when loading YAML.

Works with Python 2 and 3. Requires PyYAML.
Works with Python 3. Requires PyYAML 5.x.

License: apache-2.0
Homepage_url: https://github.com/nexB/saneyaml
Expand Down Expand Up @@ -42,4 +42,3 @@ version: 3.0.0.dev6
description: |
AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
provides a way to document a software component.

25 changes: 25 additions & 0 deletions apache-2.0.LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,28 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
16 changes: 6 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
version: '{build}'

install:
- configure etc/conf/dev

build: off

test_script:
- set
- pip install pyyaml
- pip install -r requirements_dev.txt
# test also on latest version
- py.test -vvs tests
- pip uninstall -y pyyaml
- pip install pyyaml
- py.test -vvs tests

on_success:
- "python etc/scripts/irc-notify.py aboutcode [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_green}Succeeded,Details: {build_url},Commit: {commit_url}"

on_failure:
- "python etc/scripts/irc-notify.py aboutcode [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_red}Failed,Details: {build_url},Commit: {commit_url}"
64 changes: 64 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

################################################################################
# We use Azure to run the full tests suites on multiple Python 3.x
# on multiple Windows, macOS and Linux versions all on 64 bits
# These jobs are using VMs with Azure-provided Python builds
################################################################################

jobs:

- template: etc/ci/azure-linux.yml
parameters:
job_name: ubuntu16_cpython
image_name: ubuntu-16.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -vvs

- template: etc/ci/azure-linux.yml
parameters:
job_name: ubuntu18_cpython
image_name: ubuntu-18.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs

- template: etc/ci/azure-linux.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs

- template: etc/ci/azure-mac.yml
parameters:
job_name: macos1014_cpython
image_name: macos-10.14
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs

- template: etc/ci/azure-mac.yml
parameters:
job_name: macos1015_cpython
image_name: macos-10.15
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2016_cpython
image_name: vs2017-win2016
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp\Scripts\pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2019_cpython
image_name: windows-2019
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp\Scripts\pytest -n 2 -vvs
44 changes: 44 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# Copyright (c) nexB Inc. and others.
# SPDX-License-Identifier: Apache-2.0
#

set -e
#set -x

# source this script for a basic setup and configuration for local development

CONFIGURE_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"


if [[ "$1" == "--clean" ]]; then
rm -rf "$CONFIGURE_ROOT_DIR/tmp"
exit
fi


if [[ "$PYTHON_EXE" == "" ]]; then
PYTHON_EXE=python3
fi


function setup {
# create a virtualenv on Python
mkdir -p $CONFIGURE_ROOT_DIR/tmp
wget -O $CONFIGURE_ROOT_DIR/tmp/virtualenv.pyz https://bootstrap.pypa.io/virtualenv.pyz
$PYTHON_EXE $CONFIGURE_ROOT_DIR/tmp/virtualenv.pyz $CONFIGURE_ROOT_DIR/tmp
source $CONFIGURE_ROOT_DIR/tmp/bin/activate
$CONFIGURE_ROOT_DIR/tmp/bin/pip install --upgrade pip virtualenv setuptools wheel
}


setup

$CONFIGURE_ROOT_DIR/tmp/bin/pip install -e .[testing]

if [ -f "$CONFIGURE_ROOT_DIR/tmp/bin/activate" ]; then
source "$CONFIGURE_ROOT_DIR/tmp/bin/activate"
fi

set +e
Loading