Skip to content

Commit

Permalink
Merge pull request #37 from propeller-heads/dc/rename-to-tycho-simula…
Browse files Browse the repository at this point in the history
…tion

chore: Rename all instances of protosim to tycho-simulation
  • Loading branch information
dianacarvalho1 authored Nov 5, 2024
2 parents c81489d + a325ffe commit 4424285
Show file tree
Hide file tree
Showing 60 changed files with 464 additions and 416 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
runs_on: 'ubuntu-latest'
yum_packages: "pkgconfig openssl-devel"
package_root: "protosim_py"
package_root: "tycho_simulation_py"
use_maturin: true
build_python_wheel_macos:
uses: propeller-heads/ci-cd-templates/.github/workflows/release-python-package.yaml@main
Expand All @@ -49,5 +49,5 @@ jobs:
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
with:
runs_on: 'macos-latest'
package_root: "protosim_py"
package_root: "tycho_simulation_py"
use_maturin: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ flamegraph.svg
.DS_Store

# lib lockfiles (should not even be produced)
/protosim_py/Cargo.lock
/tycho_simulation_py/Cargo.lock

# data folder
.data/
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"rust-analyzer.linkedProjects": [
"./protosim_py/Cargo.toml"
"./tycho_simulation_py/Cargo.toml"
]
}
78 changes: 39 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "protosim"
name = "tycho-simulation"
version = "0.32.0"
edition = "2021"

[workspace]
members = ["protosim_py", "tutorial"]
members = ["tycho_simulation_py", "tutorial"]

[dependencies]
ethabi = "13.0"
Expand Down
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Protosim
# Tycho Simulation

**Disclaimer: This repository is currently in its alpha release stage and is intended for workshop use only.
It is not production-ready, and we will not ensure backward compatibility at this stage.
Expand Down Expand Up @@ -32,7 +32,7 @@ To add a new protocol, you will need to complete the following high-level steps:
1. Create a protocol state struct that implements the `ProtocolSim` struct.
2. _(legacy information)_ Add associated events and implement the transition method on the protocol state struct.

Each protocol should have its own module under `protosim/src/protocol`.
Each protocol should have its own module under `tycho-simulation/src/protocol`.

### 1\. Adding state & behaviour

Expand Down
15 changes: 0 additions & 15 deletions protosim_py/build_protosim_wheel.sh

This file was deleted.

158 changes: 79 additions & 79 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
const config = {
branches: [
"release/+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
name: "prerelease",
prerelease: "pre",
},
],
tagFormat: "${version}",
ci: true,
debug: true,
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
releaseRules: [
{ type: "breaking", release: "major" },
{ type: "feat", release: "minor" },
{ type: "fix", release: "patch" },
{ type: "refactor", release: "patch" },
{ type: "security", release: "patch" },
{ type: "style", release: "patch" },
{ type: "test", release: false },
{ type: "docs", release: false },
{ type: "ci", release: false },
{ type: "chore", release: false },
],
},
],
[
"@semantic-release/exec",
{
verifyReleaseCmd:
'echo "VERIFY_RELEASE_VERSION=${nextRelease.version}" >> $GITHUB_OUTPUT',
publishCmd:
'echo "NEXT_RELEASE_VERSION=${nextRelease.version}" >> $GITHUB_OUTPUT',
prepareCmd: [
"toml set --toml-path Cargo.toml package.version ${nextRelease.version}",
"toml set --toml-path protosim_py/Cargo.toml package.version ${nextRelease.version}",
"toml set --toml-path protosim_py/pyproject.toml project.version ${nextRelease.version}",
"cargo update -p protosim",
"cargo update -p _protosim_py",
].join(" && "),
},
branches: [
"release/+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
name: "prerelease",
prerelease: "pre",
},
],
[
"@semantic-release/release-notes-generator",
{
preset: "conventionalcommits",
},
],
[
"@semantic-release/github",
{
successComment:
"This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
labels: true,
releasedLabels: true,
},
tagFormat: "${version}",
ci: true,
debug: true,
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
releaseRules: [
{type: "breaking", release: "major"},
{type: "feat", release: "minor"},
{type: "fix", release: "patch"},
{type: "refactor", release: "patch"},
{type: "security", release: "patch"},
{type: "style", release: "patch"},
{type: "test", release: false},
{type: "docs", release: false},
{type: "ci", release: false},
{type: "chore", release: false},
],
},
],
[
"@semantic-release/exec",
{
verifyReleaseCmd:
'echo "VERIFY_RELEASE_VERSION=${nextRelease.version}" >> $GITHUB_OUTPUT',
publishCmd:
'echo "NEXT_RELEASE_VERSION=${nextRelease.version}" >> $GITHUB_OUTPUT',
prepareCmd: [
"toml set --toml-path Cargo.toml package.version ${nextRelease.version}",
"toml set --toml-path tycho_simulation_py/Cargo.toml package.version ${nextRelease.version}",
"toml set --toml-path tycho_simulation_py/pyproject.toml project.version ${nextRelease.version}",
"cargo update -p tycho_simulation",
"cargo update -p _tycho_simulation_py",
].join(" && "),
},
],
[
"@semantic-release/release-notes-generator",
{
preset: "conventionalcommits",
},
],
[
"@semantic-release/github",
{
successComment:
"This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
labels: true,
releasedLabels: true,
},
],
],
],
};

const ref = process.env.GITHUB_REF;
const branch = ref.split("/").pop();

if (
config.branches.some(
(it) => it === branch || (it.name === branch && !it.prerelease),
)
config.branches.some(
(it) => it === branch || (it.name === branch && !it.prerelease),
)
) {
config.plugins.push("@semantic-release/changelog", [
"@semantic-release/git",
{
assets: [
"CHANGELOG.md",
"Cargo.toml",
"Cargo.lock",
"protosim_py/Cargo.toml",
"protosim_py/pyproject.toml",
],
message:
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
},
]);
config.plugins.push("@semantic-release/changelog", [
"@semantic-release/git",
{
assets: [
"CHANGELOG.md",
"Cargo.toml",
"Cargo.lock",
"tycho_simulation_py/Cargo.toml",
"tycho_simulation_py/pyproject.toml",
],
message:
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
},
]);
}

module.exports = config;
Loading

0 comments on commit 4424285

Please sign in to comment.