Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect symbols with ctags #2

Merged
merged 7 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
15 changes: 0 additions & 15 deletions MANIFEST.in

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ dev:

isort:
@echo "-> Apply isort changes to ensure proper imports ordering"
${VENV}/bin/isort --sl -l 100 src tests setup.py
${VENV}/bin/isort --sl -l 100 src tests

black:
@echo "-> Apply black code formatter"
${VENV}/bin/black -l 100 src tests setup.py
${VENV}/bin/black -l 100 src tests

doc8:
@echo "-> Run doc8 validation"
Expand All @@ -35,9 +35,9 @@ check:
@echo "-> Run pycodestyle (PEP8) validation"
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
@echo "-> Run isort imports ordering validation"
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
@${ACTIVATE} isort --sl --check-only -l 100 src tests .
@echo "-> Run black validation"
@${ACTIVATE} black --check --check -l 100 src tests setup.py
@${ACTIVATE} black --check --check -l 100 src tests

clean:
@echo "-> Clean the Python env"
Expand Down
66 changes: 16 additions & 50 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,62 +1,28 @@
A Simple Python Project Skeleton
source-inspector
================================
This repo attempts to standardize the structure of the Python-based project's
repositories using modern Python packaging and configuration techniques.
Using this `blog post`_ as inspiration, this repository serves as the base for
all new Python projects and is mergeable in existing repositories as well.

.. _blog post: https://blog.jaraco.com/a-project-skeleton-for-python-projects/
source-inspector is a ScanCode toolkit plugin to collect symbols from source files using various
tools.

This is a work in progress.

Usage
=====
To get started:

A brand new project
-------------------
.. code-block:: bash
1. Clone this repo
2. Run::

git init my-new-repo
cd my-new-repo
git pull [email protected]:nexB/skeleton
./configure --dev
source venv/bin/activate

# Create the new repo on GitHub, then update your remote
git remote set-url origin [email protected]:nexB/your-new-repo.git
3. Run tests with::

From here, you can make the appropriate changes to the files for your specific project.
pytest -vvs

Update an existing project
---------------------------
.. code-block:: bash
4. Run a basic scan to collect symbols and display as YAML on screen::

cd my-existing-project
git remote add skeleton [email protected]:nexB/skeleton
git fetch skeleton
git merge skeleton/main --allow-unrelated-histories
scancode --yaml - --source-symbol tests/data/symbols_ctags/test3.cpp

This is also the workflow to use when updating the skeleton files in any given repository.
Homepage: https://github.com/nexB/source-inspector
License: Apache-2.0 AND GPL-2.0

More usage instructions can be found in ``docs/skeleton-usage.rst``.


Release Notes
=============

- 2023-07-18:
- Add macOS-13 job in azure-pipelines.yml

- 2022-03-04:
- Synchronize configure and configure.bat scripts for sanity
- Update CI operating system support with latest Azure OS images
- Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party dependencies
There are now fewer scripts. See etc/scripts/README.rst for details

- 2021-09-03:
- ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` and ``requirements-dev.txt``
- ``configure`` can now accept multiple options at once
- Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files
- Rename virtual environment directory from ``tmp`` to ``venv``
- Update README.rst with instructions for generating ``requirements.txt`` and ``requirements-dev.txt``,
as well as collecting dependencies as wheels and generating ABOUT files for them.

- 2021-05-11:
- Adopt new configure scripts from ScanCode TK that allows correct configuration of which Python version is used.
The GPL-2.0 applies only to the bundled Ctags binary.
207 changes: 0 additions & 207 deletions configure.bat

This file was deleted.

13 changes: 10 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[metadata]
name = skeleton
name = source-inspector
license = Apache-2.0

# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
description = skeleton
description = source-inspector
long_description = file:README.rst
long_description_content_type = text/x-rst
url = https://github.com/nexB/skeleton
pombredanne marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -41,12 +41,19 @@ setup_requires = setuptools_scm[toml] >= 4
python_requires = >=3.7

install_requires =

scancode-toolkit
plugincode
commoncode

[options.packages.find]
where = src


[options.entry_points]
scancode_scan =
source_symbol = source_inpector.symbols_ctags:CtagsSymbolScannerPlugin


[options.extras_require]
testing =
pytest >= 6, != 7.0.0
Expand Down
6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

2 changes: 0 additions & 2 deletions src/README.rst

This file was deleted.

Empty file added src/source_inpector/__init__.py
Empty file.
Loading
Loading