Skip to content

Commit

Permalink
Add thx scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Lefkowitz committed Apr 14, 2024
1 parent 4fac58e commit 5503864
Show file tree
Hide file tree
Showing 18 changed files with 1,802 additions and 22 deletions.
26 changes: 26 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"language": "en",
"ignorePaths": [
".git",
".gitignore",
".husky",
"coverage.*",
".coverage",
".mypy_cache",
"__pycache__",
"dist",
"docs/*.css",
"venv",
"yarn-error.log"
],
"dictionaries": ["bash", "en-gb", "misc", "node", "softwareTerms", "python"],
"words": [
"autoflake",
"bumpversion",
"codacy",
"lefkowitz",
"miniscons",
"scons",
"trufflehog"
]
}
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "Bug Report"
about: Report a bug
---

# Bug Report

## Description

...

## Minimal Reproduction

...

## Stack trace

```code
...
```

## Environment

```code
...
```
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "Feature Request"
about: Suggest a feature
---

# Feature Request

## Description

...

## Alternatives

...
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "Pull Request"
about: Open a pull request
---

# Pull Request

## Description

...

## Current Behavior

```code
...
```

## New Behavior

```code
...
```
Empty file.
36 changes: 36 additions & 0 deletions .github/actions/install/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Install
description: Install dependencies

inputs:
node-version:
description: Node version
default: "18"

runs:
using: composite
steps:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Fetch yarn's cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV

- name: Set up yarn package caching
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ env.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set the node version
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

- name: Install node dependencies
shell: bash
run: yarn install --frozen-lockfile
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs

on:
push:
tags:
- "*.*.*"

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install

- name: Setup GitHub Pages
uses: actions/configure-pages@v4

- name: Build the docs
run: thx docs

- name: Upload the artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "docs/dist"

deploy:
runs-on: ubuntu-latest
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish

on:
push:
tags:
- "*.*.*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install
25 changes: 25 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Review

on: [push, pull_request]

jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install

- name: Run linters
run: thx lint

- name: Run tests
run: thx test

- name: Publish test coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.lcov
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
node_modules/
venv/

__pycache__
.mypy_cache

build/
dist/

coverage.*
.coverage

*.egg-info/
*.o
*.pyc
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.mypy_cache
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team. All complaints will be reviewed and
investigated and will result in a response that is deemed necessary and
appropriate to the circumstances.

The project team is obligated to maintain confidentiality with regard to the
reporter of an incident. Further details of specific enforcement policies may be
posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[http://contributor-covenant.org/version/1/4][version].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Miniscons

SCons builders.
SCons builders.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
"languages": [
"Python"
],
"frameworks": [],
"paradigms": [],
"frameworks": [
"SCons"
],
"paradigms": [
"Object oriented"
],
"lifecycle": "Alpha"
},
"scripts": {
Expand Down
Loading

0 comments on commit 5503864

Please sign in to comment.