Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
00f4fe7
Remove variable from string in fetch_thirdparty.py
JonoYang Apr 29, 2022
5d48c1c
Improve thirdparty scripts
pombredanne May 2, 2022
2cb86ab
Bump requirements
pombredanne May 7, 2022
c6476e7
Remove unused directory
pombredanne May 7, 2022
6a3c5b0
Update thirdparty fetching utilities
pombredanne May 7, 2022
ff348f5
Format code with black
pombredanne May 9, 2022
d35d4fe
Only use PyPI for downloads
pombredanne May 10, 2022
888bee3
Merge remote-tracking branch 'skeleton/main' into main
pombredanne May 12, 2022
154144b
Enable automatic release on tag
pombredanne May 12, 2022
e89e8d7
Merge remote-tracking branch 'skeleton/main' into latest-skeleton
pombredanne May 12, 2022
605d698
Use paths in Codebase
pombredanne May 13, 2022
1b668c1
Remove travis
pombredanne May 13, 2022
591dd14
Fix safe_path test
pombredanne May 13, 2022
1a72445
Re-enable tests that were disabled
pombredanne May 13, 2022
06b8911
Test combining scans with shared directories
JonoYang May 14, 2022
70341d3
Improve how we collect Resource.children
pombredanne May 14, 2022
e32fa2e
Revert changes on combining scan data
pombredanne May 14, 2022
d29afe6
Add new virtualcocdebase test
pombredanne May 14, 2022
edc5d81
Remove "u" unicode string prefixes.
pombredanne May 15, 2022
017b4e5
Format code
pombredanne May 15, 2022
f3cc7cb
Update resource and codebase processing
pombredanne May 16, 2022
bc46ef3
Sync config with ScanCode
pombredanne May 16, 2022
aba9f95
Enable a paths argument in Codebase/VirtualCodebase
pombredanne May 16, 2022
6ad70df
Remove debug trace output
pombredanne May 16, 2022
c8df4e3
Add a new Resource.parent_path() function
pombredanne May 16, 2022
ed0d463
Format JSON
pombredanne May 17, 2022
4aab7ae
Drop strip_root/full_root codebase attributes
pombredanne May 17, 2022
b704fa8
Make Resource.build_path work on Windows
pombredanne May 17, 2022
7c2d362
Update docstrings
JonoYang Jul 29, 2022
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
96 changes: 76 additions & 20 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,83 @@
name: Release library as a PyPI wheel and sdist on GH release creation
name: Create library release archives, create a GH release and publish PyPI wheel and sdist on tag in main branch


# This is executed automatically on a tag in the main branch

# Summary of the steps:
# - build wheels and sdist
# - upload wheels and sdist to PyPI
# - create gh-release and upload wheels and dists there
# TODO: smoke test wheels and sdist
# TODO: add changelog to release text body

# WARNING: this is designed only for packages building as pure Python wheels

on:
release:
types: [created]
workflow_dispatch:
push:
tags:
- "v*.*.*"

jobs:
build-and-publish-to-pypi:
build-pypi-distribs:
name: Build and publish library to PyPI
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/

- name: Upload built archives
uses: actions/upload-artifact@v3
with:
name: pypi_archives
path: dist/*


create-gh-release:
name: Create GH release
needs:
- build-pypi-distribs
runs-on: ubuntu-20.04

steps:
- name: Download built archives
uses: actions/download-artifact@v3
with:
name: pypi_archives
path: dist

- name: Create GH release
uses: softprops/action-gh-release@v1
with:
draft: true
files: dist/*


create-pypi-release:
name: Create PyPI release
needs:
- create-gh-release
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/
.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Download built archives
uses: actions/download-artifact@v3
with:
name: pypi_archives
path: dist

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin

################################
# Thirdparty package locations and index handling
# Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
# Find packages from the local thirdparty directory
if [ -d "$CFG_ROOT_DIR/thirdparty" ]; then
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty"
fi
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS --find-links https://thirdparty.aboutcode.org/pypi/simple/links.html"


################################
Expand Down
4 changes: 1 addition & 3 deletions configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"

@rem ################################
@rem # Thirdparty package locations and index handling
@rem # Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
@rem # Find packages from the local thirdparty directory
if exist "%CFG_ROOT_DIR%\thirdparty" (
set PIP_EXTRA_ARGS=--find-links "%CFG_ROOT_DIR%\thirdparty"
)
set "PIP_EXTRA_ARGS=%PIP_EXTRA_ARGS% --find-links https://thirdparty.aboutcode.org/pypi/simple/links.html"


@rem ################################
Expand All @@ -69,7 +68,6 @@ if not defined CFG_QUIET (
@rem ################################
@rem # Main command line entry point
set "CFG_REQUIREMENTS=%REQUIREMENTS%"
set "NO_INDEX=--no-index"

:again
if not "%1" == "" (
Expand Down
12 changes: 5 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.intersphinx',
"sphinx.ext.intersphinx",
]

# This points to aboutcode.readthedocs.io
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83

intersphinx_mapping = {
'aboutcode': ('https://aboutcode.readthedocs.io/en/latest/', None),
'scancode-workbench': ('https://scancode-workbench.readthedocs.io/en/develop/', None),
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
"scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None),
}


Expand All @@ -62,7 +62,7 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

master_doc = 'index'
master_doc = "index"

html_context = {
"display_github": True,
Expand All @@ -72,9 +72,7 @@
"conf_py_path": "/docs/source/", # path in the checkout to the docs root
}

html_css_files = [
'_static/theme_overrides.css'
]
html_css_files = ["_static/theme_overrides.css"]


# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
Expand Down
6 changes: 3 additions & 3 deletions etc/scripts/check_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@click.command()
@click.option(
"-d",
"--dest_dir",
"--dest",
type=click.Path(exists=True, readable=True, path_type=str, file_okay=False),
required=True,
help="Path to the thirdparty directory to check.",
Expand All @@ -35,7 +35,7 @@
)
@click.help_option("-h", "--help")
def check_thirdparty_dir(
dest_dir,
dest,
wheels,
sdists,
):
Expand All @@ -45,7 +45,7 @@ def check_thirdparty_dir(
# check for problems
print(f"==> CHECK FOR PROBLEMS")
utils_thirdparty.find_problems(
dest_dir=dest_dir,
dest_dir=dest,
report_missing_sources=sdists,
report_missing_wheels=wheels,
)
Expand Down
Loading