Skip to content

Commit

Permalink
Running PythonProjectBootstrapper on itself
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrownell committed Jun 18, 2024
1 parent 539f544 commit 1d401ca
Show file tree
Hide file tree
Showing 26 changed files with 414 additions and 189 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve.
title: ''
labels: ''
assignees: ''

---

## Describe the bug
A clear and concise description of what the bug is.

## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior
A clear and concise description of what you expected to happen.

## Screenshots
If applicable, add screenshots to help explain your problem.

## Environment (please complete the following information):
- OS: [e.g. iOS]
- Python Version: [e.g. 3.12, 3.11, etc.]
- PythonProjectBootstrapper Version [e.g. 1.2.3]

## Additional context
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Custom issue template
about: Create an issue that isn't a bug or feature request.
title: ''
labels: ''
assignees: ''

---
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this PythonProjectBootstrapper.
title: ''
labels: ''
assignees: ''

---

## Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like
A clear and concise description of what you want to happen.

## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

## Additional context
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## :pencil: Description
Please include a summary of the change and the work item associated with it.

## :gear: Work Item
Please include link to the corresponding GitHub Issue or Project work item.

## :movie_camera: Demo
Please provide any images, GIFs, or videos that show the effect of your changes (if applicable). A picture is worth a thousand words.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
pull_request:
branches: [ "main" ]
schedule:
- cron: '32 17 * * 0'
- cron: '0 0 * * *'
workflow_dispatch:

permissions: {}
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/standard.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ----------------------------------------------------------------------
#
# Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
# Distributed under the MIT License.
#
# |
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
# | Distributed under the MIT License.
# |
# ----------------------------------------------------------------------
name: "Standard"

Expand Down Expand Up @@ -183,14 +183,17 @@ jobs:
with:
operating_system: ${{ matrix.os }}
python_version: ${{ matrix.python_version }}
validation_command: PythonProjectBootstrapper package this_value_is_ignored --version
validation_command: PythonProjectBootstrapper package --version



# ----------------------------------------------------------------------
publish:
needs:
- validate_package
- validate_binary


name: Publish

permissions:
Expand All @@ -201,3 +204,5 @@ jobs:
release_sources_configuration_filename: .github/release_sources.yaml
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

MINISIGN_PRIVATE_KEY: ${{ secrets.MINISIGN_PRIVATE_KEY }}
22 changes: 22 additions & 0 deletions .python_project_bootstrapper_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#############################################################################################################
# This file is used by PythonProjectBootstrapper (https://github.com/gt-sse-center/PythonProjectBootstrapper)
# to rerun generation on this python package. To use this file, run the following command from within this
# working directory:
#
# PythonProjectBootstrapper package . --configuration .python_project_bootstrapper_config.yml
#
#############################################################################################################
default_context:
name: Scientific Software Engineering Center at Georgia Tech
email: sse-center@gatech.edu
project_description: Tool that helps in the creation of python projects.
license: MIT
github_url: https://github.com
github_username: gt-sse-center
github_project_name: PythonProjectBootstrapper
pypi_project_name: PythonProjectBootstrapper
gist_id: 2f9d770d13e3a148424f374f74d41f4b
gist_username: davidbrownell
minisign_public_key: RWRkzrG0tznlEpemQ9U4aCQU/TO1TXipqycs7G9pRrm/9ab9HBcV/EIf
openssf_best_practices_badge_id: 9132
create_docker_image: False
38 changes: 38 additions & 0 deletions .python_project_bootstrapper_manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#############################################################################################################
# This file is used by PythonProjectBootstrapper (https://github.com/gt-sse-center/PythonProjectBootstrapper)
# to determine whether changes have been made to any files in the project. These values are saved in case the
# project is regenerated so we can avoid overwriting any user changes. Please do not change the contents :)
#############################################################################################################

.github/CODEOWNERS: 42bdd9797e12e16d0fe3e10f798da519189b41eeca25da34ce3bab44cb04aa68
.github/ISSUE_TEMPLATE/bug_report.md: 0d0cac487c4b348cf88f29e0a7e446aff6e3b1f3fd8c3fc791312069f0939c43
.github/ISSUE_TEMPLATE/config.yml: d6d81427cbfd6fb2c87462698c241fd6c31e47025c137498e50b8a01b228cb95
.github/ISSUE_TEMPLATE/custom.md: 14e93edcf3acd7351957a11551565a3d03317eb9246a46bbbd9e01b8f28cf843
.github/ISSUE_TEMPLATE/feature_request.md: 84fca7a1f0095afb8de52af8a03fc6f3f62b42b30365547992ad83a4b638cf41
.github/pull_request_template.md: 6a7736d2a3ed6154e3f84462b483d7640709abe7f42e7caff63354eec84788af
.github/release_sources.yaml: c2241d25423ec6e22afa41c6caed30162438af803e6de74ee466479ca6cd8246
.github/workflows/codeql.yml: 5e6e94a06f17ebbd8d3042467327837bb2076c29a1414b794800a3c1b09cca7d
.github/workflows/standard.yaml: 67d46981413db61fa435984c505db98513047848d71a268ca830ce5c368bf62b
.gitignore: 5898ee882c89a06ac046fb91b791950cb095157fccab17f31e9c5f6d0ed722da
.python_project_bootstrapper_config.yml: fdb86c64cb7cc5927ae227138440af9e54fda901026625d2370f33e87caf280f
ActivateEpilog.py: 102bb407fb3efcdbb697c4c5ea0d98236d43490ff9297bfa00b37ffaed66501d
Bootstrap.cmd: 48a673262f121c847d924d9b4b1db2a7ee01ef46d0aca8912d0c90f1f1d464c1
Bootstrap.sh: c68ba07e6ab2df55c54a0285becf8c510cba9d0738f7c1b59b24a6188bb486f8
BootstrapEpilog.py: bb93ebafd101e6434c3342bb9d9e337254b199e3cfff6035a3f33c16b4db7188
Build.py: 711c112b877fb5a3fd71a7942f2b572a0546ff62bd65acaa91b9da16de685717
CODE_OF_CONDUCT.md: 4b1e95a3ab0841adc68d4b43064c4021e423d2efe37e80ba2c74e18c0959d1cb
CONTRIBUTING.md: 8bdfa4f1c635965e1d8cc008e95b4562afa096a1d2d9b5f794955970c2cfc725
DEVELOPMENT.md: b053ad0fe1c507e4fb1ebe950f36796d5083f85adbb435f5fefb32f0c5220486
GOVERNANCE.md: 20e9812c403a41ba86aaf95e1efde35c94f195109f0da2632a7fde6c0562916b
LICENSE.txt: cdcedfdd3d9071859f7902f300b73f3cd1573de80a9086317c5bdf0863ad5458
MAINTAINERS.md: deeb3c59f9ea4638cde04690e0b4ceb68ada72ab2c5cf99fec8139b4ba262d9e
README.md: 93b3bc9474594c3be11cbcde28bc5d342c847d7aec5bc232bafb118721771cd6
SECURITY.md: baac87b1d8ca9981d01299679d039f06fed99f9fdc59c0f9ed723122aaaeabff
pyproject.toml: 5f07c159ea6a829ff62ae0273878fc25ad5c08bde1ff5ec47f654ab64539ac82
src/AutoGitSemVer.yaml: 8829c49a62fcfba1bb17b03ac0f8a9e38a3777e49f058b16a79e4f4c782ddd7b
src/BuildBinary.py: bf736a35211fd68b2d1d8f9323e59d42c778bb0173cf18baa55dc439c18dea9b
src/PythonProjectBootstrapper/EntryPoint.py: e384c323ce48c2b768a12274dc0d7fbd13b1a60fb5790d0b60602b571138f57f
src/PythonProjectBootstrapper/Math.py: c339e168155404407d1196fb822df748f638fc7be5544a0add5aa6814e27c177
src/PythonProjectBootstrapper/__init__.py: 455ff824b13e41ce2cfc5e9cccac234d1e8e1958e065e2af5ff8799c5c9cc73e
tests/EntryPoint_UnitTest.py: a32616e9bb6bbf10e9cb4b63e54c8013357a8988087c5f95f216e74d5b61ec15
tests/Math_UnitTest.py: c9901514bf4ca017fc3c62dc1854c77e52fe5ac61dd3d4358d70faeebdff8422
8 changes: 0 additions & 8 deletions ActivateEpilog.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# ----------------------------------------------------------------------
# |
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
# | Distributed under the MIT License.
# |
# ----------------------------------------------------------------------
# pylint: disable=missing-module-docstring

import json
import os
import sys
Expand Down
9 changes: 4 additions & 5 deletions BootstrapEpilog.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from pathlib import Path


# Parse the arguments
is_debug = False
is_force = False
Expand All @@ -21,9 +22,8 @@

display_flags: list[str] = []

for arg in sys.argv[
2:
]: # First arg is the script name, second arg is the name of the shell script to write to
# First arg is the script name, second arg is the name of the shell script to write to
for arg in sys.argv[2:]:
if arg == "--debug":
is_debug = True
elif arg == "--force":
Expand All @@ -36,7 +36,7 @@
elif arg == "--no-cache":
no_cache = True
else:
raise Exception("Unrecognized argument: {}".format(arg))
raise Exception("'{}' is not a recognized argument.".format(arg))

if is_debug:
is_verbose = True
Expand All @@ -50,7 +50,6 @@
shell=True,
)


with (
Path(__file__).parent / os.environ["PYTHON_BOOTSTRAPPER_GENERATED_DIR"] / "bootstrap_flags.json"
).open("w") as f:
Expand Down
12 changes: 7 additions & 5 deletions Build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# | Distributed under the MIT License.
# |
# ----------------------------------------------------------------------
"""Build tasks for this python module."""
"""Build tasks for this python project."""

import sys

Expand All @@ -13,9 +13,8 @@
import typer

from dbrownell_Common import PathEx
from typer.core import TyperGroup

from dbrownell_DevTools.RepoBuildTools import Python as RepoBuildTools
from typer.core import TyperGroup


# ----------------------------------------------------------------------
Expand Down Expand Up @@ -74,11 +73,14 @@ def list_commands(self, *args, **kwargs): # pylint: disable=unused-argument

BuildBinary = RepoBuildTools.BuildBinaryFuncFactory(
this_dir,
src_dir / "BuildBinary.py",
PathEx.EnsureFile(src_dir / "BuildBinary.py"),
app,
)

CreateDockerImage = RepoBuildTools.CreateDockerImageFuncFactory(this_dir, app)
CreateDockerImage = RepoBuildTools.CreateDockerImageFuncFactory(
this_dir,
app,
)


# ----------------------------------------------------------------------
Expand Down
25 changes: 25 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# PythonProjectBootstrapper Open Source Code of Conduct

## Principles
These principles guide our data, product, and process decisions, architecture, and approach.

- Open means transparent and participatory.
- We take a modular and modern approach to software development.
- We build open-source software and open-source process.
- We value ease of implementation.
- Fostering community includes building capacity and making our software and processes accessible to participants with diverse backgrounds and skillsets.
- Data (and data science) is as important as software and process. We build open data sets where possible.
- We strive for transparency for algorithms and places we might be introducing bias.

## Community Guidelines
Information on contributing to this repository is available in our [Contributing file](CONTRIBUTING.md).

When participating in PythonProjectBootstrapper open source community conversations and spaces, we ask individuals to follow the following guidelines:

- Embrace a culture of learning, and educate each other. We are all entering this conversation from different starting points and with different backgrounds. There are no dumb questions.
- Take space and give space. We strive to create an equitable environment in which all are welcome and able to participate. We hope individuals feel comfortable voicing their opinions and providing contributions and will do our best to recognize and make space for individuals who may be struggling to find space here. Likewise, we expect individuals to recognize when they are taking up significant space and take a step back to allow room for others.
- Be respectful.
- Default to positive. Assume others' contributions are legitimate and valuable and that they are made with good intention.

## Acknowledgements
This Community Guidelines was adapted from the [United States Digital Service](https://usds.gov) [Justice40](https://thejustice40.com) open source [repository](https://github.com/usds/justice40-tool).
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contribution Guidelines

## Contributor Code of Conduct
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity, expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

[Project maintainers](MAINTAINERS.md) have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the [project maintainers](MAINTAINERS.md).

## General information
For specific proposals, please provide them as [pull requests](https://github.com/coreinfrastructure/best-practices-badge/pulls) or [issues](https://github.com/coreinfrastructure/best-practices-badge/issues) via our [GitHub site](https://github.com/gt-sse-center/PythonProjectBootstrapper).

The [DEVELOPMENT.md](DEVELOPMENT.md) file explains how to install the program locally (highly recommended if you're going to make code changes). It also provides information useful for making changes and validating them locally before submitting a pull request.

### Pull requests and different branches recommended
Pull requests are preferred, since they are specific. For more about how to create a pull request, see https://help.github.com/articles/using-pull-requests/.

We recommend creating different branches for different (logical) changes, and creating a pull request into the `main` branch when you're done. See the GitHub documentation on [creating branches](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) and [using pull requests](https://help.github.com/articles/using-pull-requests/).

### How we handle proposals
We use GitHub to track proposed changes via its [issue tracker](https://github.com/coreinfrastructure/best-practices-badge/issues) and [pull requests](https://github.com/coreinfrastructure/best-practices-badge/pulls). Specific changes are proposed using those mechanisms. Issues are assigned to an individual, who works and then marks it complete. If there are questions or objections, the conversation of that issue or pull request is used to resolve it.

### We are proactive
In general we try to be proactive to detect and eliminate mistakes and vulnerabilities as soon as possible, and to reduce their impact when they do happen. We use a defensive design and coding style to reduce the likelihood of mistakes, a variety of tools that try to detect mistakes early, and an automatic test suite with significant coverage. We also release the software as open source software so others can review it.

Since early detection and impact reduction can never be perfect, we also try to detect and repair problems during deployment as quickly as possible. This is especially true for security issues; see our [security information](#vulnerability-reporting-security-issues) for more information.

## Vulnerability reporting (security issues)
Please privately report vulnerabilities you find so we can fix them!

See [SECURITY.md](SECURITY.md) for information on how to privately report vulnerabilities.

## Acknowledgements

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
Loading

0 comments on commit 1d401ca

Please sign in to comment.