Skip to content

Commit

Permalink
pw_ide: Scaffold new module
Browse files Browse the repository at this point in the history
Change-Id: I9581eab3b41606dbd5d08789ccd3727b1edf631b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/110251
Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
Commit-Queue: Chad Norvell <chadnorvell@google.com>
  • Loading branch information
chadnorvell authored and CQ Bot Account committed Sep 16, 2022
1 parent 830f088 commit c0ab2de
Show file tree
Hide file tree
Showing 15 changed files with 176 additions and 0 deletions.
1 change: 1 addition & 0 deletions PIGWEED_MODULES
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pw_hdlc
pw_hex_dump
pw_i2c
pw_i2c_mcuxpresso
pw_ide
pw_interrupt
pw_interrupt_cortex_m
pw_interrupt_zephyr
Expand Down
4 changes: 4 additions & 0 deletions pw_build/generated_pigweed_modules_lists.gni
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ declare_args() {
dir_pw_hex_dump = get_path_info("../pw_hex_dump", "abspath")
dir_pw_i2c = get_path_info("../pw_i2c", "abspath")
dir_pw_i2c_mcuxpresso = get_path_info("../pw_i2c_mcuxpresso", "abspath")
dir_pw_ide = get_path_info("../pw_ide", "abspath")
dir_pw_interrupt = get_path_info("../pw_interrupt", "abspath")
dir_pw_interrupt_cortex_m =
get_path_info("../pw_interrupt_cortex_m", "abspath")
Expand Down Expand Up @@ -213,6 +214,7 @@ declare_args() {
dir_pw_hex_dump,
dir_pw_i2c,
dir_pw_i2c_mcuxpresso,
dir_pw_ide,
dir_pw_interrupt,
dir_pw_interrupt_cortex_m,
dir_pw_interrupt_zephyr,
Expand Down Expand Up @@ -341,6 +343,7 @@ declare_args() {
"$dir_pw_hex_dump:tests",
"$dir_pw_i2c:tests",
"$dir_pw_i2c_mcuxpresso:tests",
"$dir_pw_ide:tests",
"$dir_pw_interrupt:tests",
"$dir_pw_interrupt_cortex_m:tests",
"$dir_pw_interrupt_zephyr:tests",
Expand Down Expand Up @@ -469,6 +472,7 @@ declare_args() {
"$dir_pw_hex_dump:docs",
"$dir_pw_i2c:docs",
"$dir_pw_i2c_mcuxpresso:docs",
"$dir_pw_ide:docs",
"$dir_pw_interrupt:docs",
"$dir_pw_interrupt_cortex_m:docs",
"$dir_pw_interrupt_zephyr:docs",
Expand Down
1 change: 1 addition & 0 deletions pw_cli/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ the Pigweed environment, these commands will be available for use.
doctor Check that the environment is set up correctly for Pigweed.
format Check and fix formatting for source files.
help Display detailed information about pw commands.
ide Configure editors and IDEs to work best with Pigweed.
logdemo Show how logs look at various levels.
module Utilities for managing modules.
test Run Pigweed unit tests built using GN.
Expand Down
1 change: 1 addition & 0 deletions pw_env_setup/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pw_python_group("core_pigweed_python_packages") {
"$dir_pw_doctor/py",
"$dir_pw_env_setup/py",
"$dir_pw_hdlc/py",
"$dir_pw_ide/py",
"$dir_pw_log:protos.python",
"$dir_pw_log_tokenized/py",
"$dir_pw_metric/py",
Expand Down
25 changes: 25 additions & 0 deletions pw_ide/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.

import("//build_overrides/pigweed.gni")

import("$dir_pw_docgen/docs.gni")
import("$dir_pw_unit_test/test.gni")

pw_doc_group("docs") {
sources = [ "docs.rst" ]
}

pw_test_group("tests") {
}
2 changes: 2 additions & 0 deletions pw_ide/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
chadnorvell@google.com
tonymd@google.com
2 changes: 2 additions & 0 deletions pw_ide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Tools for Pigweed editor and IDE support.
[Learn more here.](https://pigweed.dev/pw_ide)
7 changes: 7 additions & 0 deletions pw_ide/docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _module-pw_ide:

------
pw_ide
------
This module provides tools for supporting code editor and IDE features for
Pigweed projects.
32 changes: 32 additions & 0 deletions pw_ide/py/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.

import("//build_overrides/pigweed.gni")

import("$dir_pw_build/python.gni")

pw_python_package("py") {
setup = [
"pyproject.toml",
"setup.cfg",
"setup.py",
]
sources = [
"pw_ide/__init__.py",
"pw_ide/__main__.py",
]
tests = []
python_deps = [ "$dir_pw_console/py" ]
pylintrc = "$dir_pigweed/.pylintrc"
}
14 changes: 14 additions & 0 deletions pw_ide/py/pw_ide/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.
"""Configure IDE support for Pigweed projects."""
25 changes: 25 additions & 0 deletions pw_ide/py/pw_ide/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.
"""Configure IDE support for Pigweed projects."""

import sys
from typing import NoReturn


def main() -> NoReturn:
sys.exit(0)


if __name__ == '__main__':
main()
Empty file added pw_ide/py/pw_ide/py.typed
Empty file.
16 changes: 16 additions & 0 deletions pw_ide/py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.
[build-system]
requires = ['setuptools', 'wheel']
build-backend = 'setuptools.build_meta'
28 changes: 28 additions & 0 deletions pw_ide/py/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.
[metadata]
name = pw_ide
version = 0.0.1
author = Pigweed Authors
author_email = pigweed-developers@googlegroups.com
description = Tools for Pigweed editor and IDE support

[options]
packages = find:

[options.entry_points]
console_scripts = pw-ide = pw_ide.__main__:main

[options.package_data]
pw_ide = py.typed
18 changes: 18 additions & 0 deletions pw_ide/py/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.
"""pw_ide"""

import setuptools # type: ignore

setuptools.setup() # Package definition in setup.cfg

0 comments on commit c0ab2de

Please sign in to comment.