Skip to content

Commit

Permalink
chore: find & replace packages_rs -> packages
Browse files Browse the repository at this point in the history
Preparation for mv packages_rs packages
  • Loading branch information
ivan-aksamentov committed Feb 8, 2024
1 parent 4f3ce2f commit f80d8e2
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/packages_rs/nextclade-web/"
directory: "/packages/nextclade-web/"
schedule:
interval: "daily"
allow:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
run: |
export PATH="${PATH}:${HOME}/bin"
version=$(dasel select -p toml -s ".package.version" -f "packages_rs/nextclade/Cargo.toml")
version=$(dasel select -p toml -s ".package.version" -f "packages/nextclade/Cargo.toml")
if [[ "$version" =~ (rc|beta|alpha) ]]; then
export DATA_FULL_DOMAIN="https://data.master.clades.nextstrain.org/v3"
fi
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
path: |
.build/
.cache/docker/.cargo
packages_rs/nextclade-web/.build/docker
packages/nextclade-web/.build/docker
key: cache-v1-cargo-${{ runner.os }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cache-v1-cargo-${{ runner.os }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.lock') }}
Expand All @@ -94,9 +94,9 @@ jobs:
uses: actions/cache@v4
with:
path: |
packages_rs/nextclade-web/.build/production/tmp/cache
packages_rs/nextclade-web/.cache
packages_rs/nextclade-web/node_modules
packages/nextclade-web/.build/production/tmp/cache
packages/nextclade-web/.cache
packages/nextclade-web/node_modules
key: cache-v1-web-${{ runner.os }}-wasm32-unknown-unknown-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
cache-v1-web-${{ runner.os }}-wasm32-unknown-unknown-${{ hashFiles('**/yarn.lock') }}
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: out
path: "packages_rs/nextclade-web/.build/production/web"
path: "packages/nextclade-web/.build/production/web"


deploy-web:
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: "out"
path: "packages_rs/nextclade-web/.build/production/web"
path: "packages/nextclade-web/.build/production/web"

- name: "Install deploy dependencies"
run: |
Expand All @@ -218,7 +218,7 @@ jobs:
git config user.email "${{ secrets.GIT_USER_EMAIL }}"
git config user.name "${{ secrets.GIT_USER_NAME }}"
pushd packages_rs/nextclade-web >/dev/null
pushd packages/nextclade-web >/dev/null
export version=$(node -e "\
const pkg = require('./package.json'); \
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
/e2e/cli/snapshots/
/e2e/cli/tmp/
/example-data/
/packages_rs/*/target/
/packages_rs/nextclade-web/src/gen
/packages/*/target/
/packages/nextclade-web/src/gen
/paper/paper.pdf
/paper/preprint.pdf
/paper/tex2pdf*
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[workspace]

members = [
"packages_rs/*",
"packages/*",
]

exclude = [
"packages_rs/3rdparty",
"packages_rs/tree-builder-prototype"
"packages/3rdparty",
]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ by Nextstrain team

<a href="packages/web/package.json">
<img
src="https://img.shields.io/github/package-json/v/nextstrain/nextclade/master/packages_rs/nextclade-web?label=web&logo=npm"
src="https://img.shields.io/github/package-json/v/nextstrain/nextclade/master/packages/nextclade-web?label=web&logo=npm"
alt="package.json version"
/>
</a>
Expand Down
14 changes: 7 additions & 7 deletions docker/dev
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ export FILES_TO_WATCH="\
-w 'Cargo.lock' \
-w 'Cargo.toml' \
-w 'clippy.toml' \
-w 'packages_rs/nextclade-web/src' \
-w 'packages_rs/nextclade-web/Cargo.toml' \
-w 'packages_rs/nextclade/src' \
-w 'packages_rs/nextclade/Cargo.toml' \
-w 'packages/nextclade-web/src' \
-w 'packages/nextclade-web/Cargo.toml' \
-w 'packages/nextclade/src' \
-w 'packages/nextclade/Cargo.toml' \
-w 'rust-toolchain.toml' \
-w 'rustfmt.toml' \
"
Expand All @@ -129,7 +129,7 @@ export FILES_TO_IGNORE="\
-i '.cache' \
-i '.vscode' \
-i 'target/' \
-i 'packages_rs/nextclade-web/src/gen/' \
-i 'packages/nextclade-web/src/gen/' \
"

export LINT_FIX="--fix --allow-staged"
Expand Down Expand Up @@ -471,11 +471,11 @@ elif [ "${BUILD}" == "1" ]; then
elif [ "${SMOKE_TEST}" == "1" ]; then
COMMAND="./tests/run-smoke-tests 'cargo run -q --target-dir='${BUILD_DIR_REL}' ${RUST_TARGET} ${RELEASE} --bin=nextclade'"
elif [ "${WASM}" == "1" ]; then
COMMAND="bash -c \"set -euo pipefail && cd packages_rs/nextclade-web && yarn install && yarn wasm-${RELEASE}\""
COMMAND="bash -c \"set -euo pipefail && cd packages/nextclade-web && yarn install && yarn wasm-${RELEASE}\""
elif [ "${WEB}" == "1" ]; then
PORTS="-p 3000:3000"
COMMAND=${COMMAND:=yarn install && yarn ${RELEASE}}
COMMAND="bash -c \"set -euo pipefail && cd packages_rs/nextclade-web && ${COMMAND}\""
COMMAND="bash -c \"set -euo pipefail && cd packages/nextclade-web && ${COMMAND}\""
elif [ "${TEST}" == "1" ]; then
PRETTY_TEST="( grep --color=always --line-buffered -vP \"running.*tests|\x1b\[32m.\x1b\(B\x1b\[m|^$|test result|TEST START\" || true )"
COMMAND="cargo test --color=always -q --target-dir='${BUILD_DIR_REL}' ${RUST_TARGET} ${TEST_FLAGS} ${*:-} -- --nocapture --color=always | ${PRETTY_TEST} ${SUCCESS_OR_FAILURE}"
Expand Down
14 changes: 7 additions & 7 deletions docs/dev/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Install Node.js version 14+ (latest LTS release is recommended), by either downl
5. Install NPM dependencies (once)
```bash
cd packages_rs/nextclade-web
cd packages/nextclade-web
yarn install
```
Expand All @@ -220,11 +220,11 @@ Install Node.js version 14+ (latest LTS release is recommended), by either downl
6. Build the WebAssembly module

```bash
cd packages_rs/nextclade-web
cd packages/nextclade-web
yarn wasm-prod
```

This step might take a lot of time. The WebAssembly module and accompanying Typescript code should be been generated into `packages_rs/nextclade-web/src/gen/`. The web application should be able to find it there.
This step might take a lot of time. The WebAssembly module and accompanying Typescript code should be been generated into `packages/nextclade-web/src/gen/`. The web application should be able to find it there.

Repeat this step every time you are touching Rust code.

Expand All @@ -235,7 +235,7 @@ Install Node.js version 14+ (latest LTS release is recommended), by either downl
The development version can be built using:
```bash
cd packages_rs/nextclade-web
cd packages/nextclade-web
yarn dev
```
Expand All @@ -250,7 +250,7 @@ Install Node.js version 14+ (latest LTS release is recommended), by either downl
Open `http://localhost:8080/` in the browser.
The resulting HTML, CSS and JS files should be available under `packages_rs/nextclade-web/.build/production/web`.
The resulting HTML, CSS and JS files should be available under `packages/nextclade-web/.build/production/web`.
Production build does not have automatic rebuild and reload. You need to do full rebuild on every code change.
Expand Down Expand Up @@ -321,7 +321,7 @@ For routine development, it is recommended to configure your text editor to see
The web app is linted using [eslint](https://github.com/eslint/eslint) and [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) as a part of development command, but the same lints also be run separately:
```bash
cd packages_rs/nextclade-web
cd packages/nextclade-web
yarn lint
```
Expand All @@ -340,7 +340,7 @@ cargo fmt --all
Typescript:
```bash
cd packages_rs/nextclade-web
cd packages/nextclade-web
yarn format:fix
```
Expand Down
8 changes: 4 additions & 4 deletions scripts/build_on_vercel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export PATH=/usr/lib/llvm-13/bin:${HOME}/.local/bin:${CARGO_HOME}/bin:${CARGO_HO

symlink_to_cache ".build"
symlink_to_cache ".cache"
symlink_to_cache "packages_rs/nextclade-web/.build/production/tmp"
symlink_to_cache "packages_rs/nextclade-web/.cache"
symlink_to_cache "packages_rs/nextclade-web/node_modules"
symlink_to_cache "packages/nextclade-web/.build/production/tmp"
symlink_to_cache "packages/nextclade-web/.cache"
symlink_to_cache "packages/nextclade-web/node_modules"

# Install rustup and toolchain from rust-toolchain.toml, if not already in the cache
if ! command cargo &>/dev/null; then
Expand Down Expand Up @@ -117,7 +117,7 @@ sed -i'' "s|PROD_ENABLE_STYLELINT=1|PROD_ENABLE_STYLELINT=0|g" .env
sed -i'' "s|DATA_TRY_GITHUB_BRANCH=0|DATA_TRY_GITHUB_BRANCH=1|g" .env
cd packages_rs/nextclade-web
cd packages/nextclade-web
yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion scripts/cli_get_data_full_domain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ THIS_DIR="$(

: "${1:?Branch name is required as the first argument.}"

version=$(dasel select -p toml -s ".package.version" -f "packages_rs/nextclade-cli/Cargo.toml")
version=$(dasel select -p toml -s ".package.version" -f "packages/nextclade-cli/Cargo.toml")
prerel=$("${THIS_DIR}/semver" get prerel "${version}" | cut -d '.' -f 1)
branch="${1}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trap "exit" INT

export AWS_MAX_ATTEMPTS=10

pushd "packages_rs/nextclade-web/.build/production/web" >/dev/null
pushd "packages/nextclade-web/.build/production/web" >/dev/null

# Precompress files
pigz -kfrq .
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_docker
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare -a BASE_IMAGES=(
"debian"
)

version=$(dasel select -p toml -s ".package.version" -f "packages_rs/nextclade-cli/Cargo.toml")
version=$(dasel select -p toml -s ".package.version" -f "packages/nextclade-cli/Cargo.toml")
version_major=$("${THIS_DIR}/semver" get major "${version}")
release_type=$("${THIS_DIR}/semver" get prerel "${version}" | cut -d '.' -f 1)
release_type=${release_type:=latest}
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_github
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ done
[ -z "$repo" ] && echo "--repo is required" >/dev/stderr && exit 1
[ -z "$git_sha" ] && echo "--git_sha is required" >/dev/stderr && exit 1

version=$(dasel select -p toml -s ".package.version" -f "packages_rs/nextclade-cli/Cargo.toml")
version=$(dasel select -p toml -s ".package.version" -f "packages/nextclade-cli/Cargo.toml")
release_type=$("${THIS_DIR}/semver" get prerel "${version}" | cut -d '.' -f 1)
prerelease_flag=${release_type:+--prerelease}
Expand Down
4 changes: 2 additions & 2 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if [ "$1" == "cli" ]; then

echo "Bumping package versions in 'Cargo.toml' files"
cargo set-version --workspace --bump="${2:-}" >/dev/null
version=$(dasel select -r toml -s ".package.version" -f "packages_rs/nextclade/Cargo.toml")
version=$(dasel select -r toml -s ".package.version" -f "packages/nextclade/Cargo.toml")
echo "Running \`cargo build\` to update 'Cargo.lock' file"
cargo build --quiet >/dev/null
Expand Down Expand Up @@ -113,7 +113,7 @@ elif [ "$1" == "web" ]; then
exit 1
fi
pushd "packages_rs/nextclade-web" >/dev/null
pushd "packages/nextclade-web" >/dev/null
if [[ "$2" =~ ^(major|minor|patch)$ ]]; then
version=$(npm version "$2")
Expand Down
34 changes: 17 additions & 17 deletions tests/functional/nextclade_run_args.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Nextclade run: no output args

$ ${NEXTCLADE} run \
> --input-dataset='does not matter'
Error:
Error:
0: \x1b[91mWhen deducing output filenames\x1b[0m (esc)
1: \x1b[91mNo output flags provided. (esc)

At least one of the following flags is required:
--output-all
--output-fasta
Expand All @@ -22,16 +22,16 @@ Nextclade run: no output args
--output-translations
--output-insertions
--output-errors\x1b[0m (esc)

Location:
\x1b[35mpackages_rs/nextclade-cli/src/cli/nextclade_cli.rs\x1b[0m:\x1b[35m710\x1b[0m (esc)
\x1b[35mpackages/nextclade-cli/src/cli/nextclade_cli.rs\x1b[0m:\x1b[35m710\x1b[0m (esc)

\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 BACKTRACE \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 (esc)
1: \x1b[32mmain\x1b[0m\x1b[90m<unknown>\x1b[0m (esc)
at \x1b[35m<unknown source file>\x1b[0m:\x1b[35m<unknown line>\x1b[0m (esc)
2: \x1b[32m__libc_start_main\x1b[0m\x1b[90m<unknown>\x1b[0m (esc)
at \x1b[35m<unknown source file>\x1b[0m:\x1b[35m<unknown line>\x1b[0m (esc)

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
[1]

Expand All @@ -45,24 +45,24 @@ Nextclade run: no input dataset and no individual input flags
$ ${NEXTCLADE} run \
> --output-all='does not matter' \
> 'does not matter'
Error:
Error:
0: \x1b[91mWhen `--input-dataset` is not specified, the following arguments are required: (esc)
--input-ref
--input-tree
--input-gene-map
--input-qc-config
--input-pcr-primers
--input-ref
--input-tree
--input-gene-map
--input-qc-config
--input-pcr-primers
--input-virus-properties\x1b[0m (esc)

Location:
\x1b[35mpackages_rs/nextclade-cli/src/dataset/dataset_download.rs\x1b[0m:\x1b[35m182\x1b[0m (esc)
\x1b[35mpackages/nextclade-cli/src/dataset/dataset_download.rs\x1b[0m:\x1b[35m182\x1b[0m (esc)

\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 BACKTRACE \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 (esc)
1: \x1b[32mmain\x1b[0m\x1b[90m<unknown>\x1b[0m (esc)
at \x1b[35m<unknown source file>\x1b[0m:\x1b[35m<unknown line>\x1b[0m (esc)
2: \x1b[32m__libc_start_main\x1b[0m\x1b[90m<unknown>\x1b[0m (esc)
at \x1b[35m<unknown source file>\x1b[0m:\x1b[35m<unknown line>\x1b[0m (esc)

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
[1]

Expand All @@ -78,7 +78,7 @@ Nextclade run: invalid value for --jobs
> --input-dataset='does not matter' \
> 'does not matter'
error: Invalid value "Not an integer" for '--jobs <JOBS>': invalid digit found in string

For more information try --help
[2]

0 comments on commit f80d8e2

Please sign in to comment.