Skip to content

Commit

Permalink
Initial package
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay committed Feb 6, 2023
1 parent 118d79f commit 7b09498
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 21 deletions.
14 changes: 5 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
template-package
================
colcon-top-level-workspace
==========================

An extension for `colcon-core <https://github.com/colcon/colcon-core>`_ to act as a template for new extensions.
An extension for `colcon-core <https://github.com/colcon/colcon-core>`_ to locate and use a top-level workspace when in subdirectories thereof.

When using this template, be sure to replace all instances of the word "template" in the repository::

$ find * -type f | xargs sed -i 's/template-package/colcon-package-name/g'
$ find * -type f | xargs sed -i 's/template_package/colcon_package_name/g'
$ mv template_package colcon_package_name
$ grep -iR template *
This package looks for marker files created by colcon which infer the root of a workspace.
Depending on the your workspace configuration, additional heuristics may be necessary to handle corner cases.
File renamed without changes.
18 changes: 9 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[metadata]
name = template-package
version = attr: template_package.__version__
name = colcon-top-level-workspace
version = attr: colcon_top_level_workspace.__version__
url = https://colcon.readthedocs.io
project_urls =
Changelog = https://github.com/colcon/template-package/milestones?direction=desc&sort=due_date&state=closed
GitHub = https://github.com/colcon/template-package/
author = Template Author
author_email = [email protected]
Changelog = https://github.com/colcon/colcon-top-level-workspace/milestones?direction=desc&sort=due_date&state=closed
GitHub = https://github.com/colcon/colcon-top-level-workspace/
author = Scott K Logan
author_email = [email protected]
classifiers =
Development Status :: 3 - Alpha
Environment :: Plugins
Expand All @@ -17,7 +17,7 @@ classifiers =
Programming Language :: Python
Topic :: Software Development :: Build Tools
license = Apache License, Version 2.0
description = Extension for colcon to serve as a template for new extensions.
description = Extension for colcon to locate and use a top-level workspace.
long_description = file: README.rst
keywords = colcon

Expand Down Expand Up @@ -46,12 +46,12 @@ test =
scspell3k>=2.2

[tool:pytest]
junit_suite_name = template-package
junit_suite_name = colcon-top-level-workspace

[options.entry_points]

[flake8]
import-order-style = google

[coverage:run]
source = template_package
source = colcon_top_level_workspace
2 changes: 1 addition & 1 deletion stdeb.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[template-package]
[colcon-top-level-workspace]
No-Python2:
Depends3: python3-colcon-core
Suite: bionic focal jammy stretch buster bullseye
Expand Down
1 change: 1 addition & 0 deletions test/spell_check.words
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apache
colcon
iterdir
pathlib
pytest
Expand Down
2 changes: 1 addition & 1 deletion test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_flake8():
sys.stdout = sys.stderr
# implicitly calls report_errors()
report = style_guide.check_files([
str(Path(__file__).parents[1] / 'template_package'),
str(Path(__file__).parents[1] / 'colcon_top_level_workspace'),
])
report_tests = style_guide_tests.check_files([
str(Path(__file__).parents[1] / 'test'),
Expand Down
2 changes: 1 addition & 1 deletion test/test_spell_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def known_words():
def test_spell_check(known_words):
source_filenames = [Path(__file__).parents[1] / 'setup.py'] + \
list(
(Path(__file__).parents[1] / 'template_package')
(Path(__file__).parents[1] / 'colcon_top_level_workspace')
.glob('**/*.py')) + \
list((Path(__file__).parents[1] / 'test').glob('**/*.py'))

Expand Down

0 comments on commit 7b09498

Please sign in to comment.