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

refactor: update pdm lock and fix installation errors. #22

Merged
merged 5 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release

on:
workflow_dispatch:
inputs:
prerelease:
type: choice
description: Pre-release type (optional)
options:
- ''
- alpha
- beta
- rc
default: ''
required: false
increment:
type: choice
description: Increment type (optional)
options:
- ''
- MAJOR
- MINOR
- PATCH
default: ''
required: false

jobs:
release:
name: Bump version and update the changelog
runs-on: ubuntu-latest

steps:
- name: Clone
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}

- name: Bump version
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.RELEASE_TOKEN }}
changelog_increment_filename: body.md
prerelease: ${{ github.event.inputs.prerelease }}
increment: ${{ github.event.inputs.increment }}

- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: "body.md"
tag_name: ${{ env.REVISION }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## 1.1.0 (2024-07-19)

### Feat

- add changelog to the main project.
- Support generating containers using devenv.
- add Commitzen together with SCM configuration.

### Fix

- Commitzen git repository discovery.

### Refactor

- update pdm lock and fix installation errors.

## v1.0.1 (2024-07-17)

### Fix

- **python**: uninitialized variable bug.

## v1.0.0 (2024-07-17)

### Feat

- *****: test development environment.
- **rust**: initialize the configuration.
- **editorconfig**: add configuration for Python and Node.js.
- **node.js**: initialize the JS template.
- **go**: initialize the template.
- *****: enable devcontainer for the main repository.
- **python**: intialize devenv configuration.
- *****: add copier to dependency lists of the project.
- *****: initialize the project.

### Fix

- **ci**: remove unnecessary Python dependencies.
- *****: missing .envrc.
- *****: missing devenv.yaml.
- *****: add missing readme files.
- **nix**: use RFC nix formatting.

### Refactor

- **python**: install dependencies inside the virtualenv.
- **python**: downgrading to Python 3.11
- *****: generate gitignore using templates.
- *****: validate project name.
- **nix**: ensure rendered devenv file is formatted properly.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ decision and help us to improve them.

### Detailed Features

| Feature | Python | Node.js | Go | Rust |
|-------------------------|--------|---------|----|------|
| dotenv | ✅ | ✅ | ✅ | ✅ |
| difftastic | ✅ | ✅ | ✅ | ✅ |
| devcontainer | ✅ | ✅ | ✅ | ✅ |
| Yaml Lint | ✅ | ✅ | ✅ | ✅ |
| Type Check | ✅ | ✅ | ✅ | ✅ |
| Pre Commit Hooks | ✅ | ✅ | ✅ | ✅ |
| Language Server | ✅ | ✅ | ✅ | ✅ |
| Editor Config | ✅ | ✅ | ✅ | ✅ |
| Documentation Generator | ⏳ | ⏳ | ⏳ | ⏳ |
| CI/CD | ⏳ | ⏳ | ⏳ | ⏳ |
| Feature | Python | Node.js | Go | Rust |
|-------------------------|--------|---------|-----|------|
| dotenv | ✅ | ✅ | ✅ | ✅ |
| difftastic | ✅ | ✅ | ✅ | ✅ |
| devcontainer | ✅ | ✅ | ✅ | ✅ |
| Yaml Lint | ✅ | ✅ | ✅ | ✅ |
| Type Check | ✅ | ✅ | N/A | N/A |
| Pre Commit Hooks | ✅ | ✅ | ✅ | ✅ |
| Language Server | ✅ | ✅ | ✅ | ✅ |
| Editor Config | ✅ | ✅ | ✅ | ✅ |
| Documentation Generator | ⏳ | ⏳ | ⏳ | ⏳ |
| CI/CD | ⏳ | ⏳ | ⏳ | ⏳ |
| Generate Containers | ✅ | ✅ | ✅ | ✅ |

## How to Use

Expand Down
71 changes: 71 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"treeHash": "bd263f021e345cb4a39d80c126ab650bebc3c10c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
Expand All @@ -54,6 +72,42 @@
"type": "github"
}
},
"mk-shell-bin": {
"locked": {
"lastModified": 1677004959,
"owner": "rrbutani",
"repo": "nix-mk-shell-bin",
"rev": "ff5d8bd4d68a347be5042e2f16caee391cd75887",
"treeHash": "496327dabdc787353a29987f492dd4939151baad",
"type": "github"
},
"original": {
"owner": "rrbutani",
"repo": "nix-mk-shell-bin",
"type": "github"
}
},
"nix2container": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1720642556,
"owner": "nlewo",
"repo": "nix2container",
"rev": "3853e5caf9ad24103b13aa6e0e8bcebb47649fe4",
"treeHash": "a9c2f1d3f52f288515ca0fb11f9aed970fd869b6",
"type": "github"
},
"original": {
"owner": "nlewo",
"repo": "nix2container",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716977621,
Expand Down Expand Up @@ -112,9 +166,26 @@
"root": {
"inputs": {
"devenv": "devenv",
"mk-shell-bin": "mk-shell-bin",
"nix2container": "nix2container",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
Expand Down
5 changes: 5 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
}:

{
name = "inception";

# https://devenv.sh/packages/
packages = with pkgs; [
# Required for packages with Rust dependencies (eg. pydantic-core)
cargo
rustc
# https://github.com/DataChefHQ/inception/issues/21
git
];

languages.python = {
Expand Down
19 changes: 7 additions & 12 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nix2container:
url: github:nlewo/nix2container
inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling

# If you're using non-OSS software, you can set allowUnfree to true.
# allowUnfree: true

# If you're willing to use a package that's vulnerable
# permittedInsecurePackages:
# - "openssl-1.1.1w"

# If you have more than one devenv you can merge them
#imports:
# - ./backend
1 change: 1 addition & 0 deletions includes/base.nix.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

{% block variables %}{% endblock %}
{
name = "{{ project_name | replace('_', '-')}}";
# https://devenv.sh/basics/
env = {
GREET = "🛠️ Let's hack ";
Expand Down
10 changes: 10 additions & 0 deletions includes/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
inputs:
nix2container:
url: github:nlewo/nix2container
inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
Loading
Loading