-
Notifications
You must be signed in to change notification settings - Fork 38
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
Dev Knowledge Base Nektos-ACT Documentation fixes issue #723 #730
base: dev
Are you sure you want to change the base?
Conversation
The latest changes should fix #731 as well |
I tried following the instructions and created
Then ran I'm using zsh, so the first thing I encountered was:
I opened a bash shell and tried again and got:
I noticed the I thought this was to set up a development environment, so needing to specify a deploy location was confusing to me. I was able to get things working with the The way I've been working locally is to have an env file that I source before running any of the dioptra services. These are the main items I found I needed to configure and I found having everything in a single env file for editing to be more straightforward.
How should we guide developers between the existing DEVELOPER.md and these knowledge base docs and scripts? |
Yep – it won’t work in zsh ☹ I could add logic to work in ZSH if that’s required. But bash 5+ is the requirement, I thought.
DC
From: Keith Manville ***@***.***>
Date: Friday, February 14, 2025 at 10:35 AM
To: usnistgov/dioptra ***@***.***>
Cc: Cousin, Dmitry A. (Fed) ***@***.***>, Author ***@***.***>
Subject: Re: [usnistgov/dioptra] Dev Knowledge Base Nektos-ACT Documentation fixes issue #723 (PR #730)
I tried following the instructions and created my-env1.cfg with the following contents:
### Env Variable for GitHub Branch
DIOPTRA_BRANCH=dev
### Env Variable for Deployment Path
DIOPTRA_DEPLOY=~/dev/dioptra-deploy
### Env Variable for Source Path
DIOPTRA_CODE=~/dev/dioptra
Then ran source ./dev-env+.sh -e ./my-env1.cfg
I'm using zsh, so the first thing I encountered was:
❌❌❌ BASH is required to run this script ❌❌❌
I opened a bash shell and tried again and got:
Number of arguments: 2
Argument 0: bash
Argument 1: -e
-e - ./my-env1.cfgReading config file: ./my-env1.cfg
bash: ${key^^}: bad substitution
❌❌❌ !!!Failed to set up environment configuration!!! ❌❌❌
The following Parameters were expected:
DIOPTRA_BRANCH=
DIOPTRA_DEPLOY=
DIOPTRA_CODE=
DIOPTRA_ENV_FILE=./my-env1.cfg
You can use 'env | sort' or 'printenv' command to view the rest of the environment variables
I noticed the run-X.sh scripts use #!/opt/homebrew/bin/bash which is mac and configuration specific. Since I don't have this on my system running these scripts fails.
I thought this was to set up a development environment, so needing to specify a deploy location was confusing to me.
I was able to get things working with the dev-env.sh script after modifying the config variables. But now I need to edit a file tracked by git to get my dev setup going.
The way I've been working locally is to have an env file that I source before running any of the dioptra services. These are the main items I found I needed to configure and I found having everything in a single env file for editing to be more straightforward.
export DIOPTRA_RESTAPI_DEV_DATABASE_URI="sqlite:////Users/kmanville/dev/dioptra/dioptra-dev.db"
export DIOPTRA_RESTAPI_ENV=dev
export DIOPTRA_WORKER_USERNAME="dioptra-worker"
export DIOPTRA_WORKER_PASSWORD="password"
export DIOPTRA_API="http://localhost:5173"
export RQ_REDIS_URI="redis://localhost:6379/0"
export MLFLOW_S3_ENDPOINT_URL="http://localhost:35000"
export MLFLOW_TRACKING_URI="http://localhost:35000"
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
How should we guide developers between the existing DEVELOPER.md<https://github.com/usnistgov/dioptra/blob/main/DEVELOPER.md> and these knowledge base docs and scripts?
—
Reply to this email directly, view it on GitHub<#730 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACS6IVTRZ62IH3HL7OM7AHD2PYENJAVCNFSM6AAAAABWF45V46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJZGY2DMMBXGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
[keithmanville]keithmanville left a comment (usnistgov/dioptra#730)<#730 (comment)>
I tried following the instructions and created my-env1.cfg with the following contents:
### Env Variable for GitHub Branch
DIOPTRA_BRANCH=dev
### Env Variable for Deployment Path
DIOPTRA_DEPLOY=~/dev/dioptra-deploy
### Env Variable for Source Path
DIOPTRA_CODE=~/dev/dioptra
Then ran source ./dev-env+.sh -e ./my-env1.cfg
I'm using zsh, so the first thing I encountered was:
❌❌❌ BASH is required to run this script ❌❌❌
I opened a bash shell and tried again and got:
Number of arguments: 2
Argument 0: bash
Argument 1: -e
-e - ./my-env1.cfgReading config file: ./my-env1.cfg
bash: ${key^^}: bad substitution
❌❌❌ !!!Failed to set up environment configuration!!! ❌❌❌
The following Parameters were expected:
DIOPTRA_BRANCH=
DIOPTRA_DEPLOY=
DIOPTRA_CODE=
DIOPTRA_ENV_FILE=./my-env1.cfg
You can use 'env | sort' or 'printenv' command to view the rest of the environment variables
I noticed the run-X.sh scripts use #!/opt/homebrew/bin/bash which is mac and configuration specific. Since I don't have this on my system running these scripts fails.
I thought this was to set up a development environment, so needing to specify a deploy location was confusing to me.
I was able to get things working with the dev-env.sh script after modifying the config variables. But now I need to edit a file tracked by git to get my dev setup going.
The way I've been working locally is to have an env file that I source before running any of the dioptra services. These are the main items I found I needed to configure and I found having everything in a single env file for editing to be more straightforward.
export DIOPTRA_RESTAPI_DEV_DATABASE_URI="sqlite:////Users/kmanville/dev/dioptra/dioptra-dev.db"
export DIOPTRA_RESTAPI_ENV=dev
export DIOPTRA_WORKER_USERNAME="dioptra-worker"
export DIOPTRA_WORKER_PASSWORD="password"
export DIOPTRA_API="http://localhost:5173"
export RQ_REDIS_URI="redis://localhost:6379/0"
export MLFLOW_S3_ENDPOINT_URL="http://localhost:35000"
export MLFLOW_TRACKING_URI="http://localhost:35000"
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
How should we guide developers between the existing DEVELOPER.md<https://github.com/usnistgov/dioptra/blob/main/DEVELOPER.md> and these knowledge base docs and scripts?
—
Reply to this email directly, view it on GitHub<#730 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACS6IVTRZ62IH3HL7OM7AHD2PYENJAVCNFSM6AAAAABWF45V46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJZGY2DMMBXGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make changes as needed
@@ -0,0 +1,206 @@ | |||
#!/opt/homebrew/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't work on all systems does /bin/bash
work for macs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, /bin/bash
exists on mac and works for me. I think the more robust shebang is #!/usr/bin/env bash
which should find bash as long as it's in your path somewhere.
git_branch=dev | ||
dir_work=~/dio/dio2-wrk | ||
dir_source=~/dio/dio2-src | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have alternative names? I think having just one way of doing this will make it easier to support the scripts over time as well debug when problems arise.
|
||
3. #### In the shell environment sourced in the steps 1 and 2 or only 2, run the setup script: | ||
``` | ||
./stup.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setup.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems unnecessary given this example exists in the README.md. Would prefer to only have one place where this exists to avoid things getting out of synch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change should not be here. looks like you need pull/update PR
## <a id="act-verify"> To verify success of the ACT installation you can run any of the following commands</a>: | ||
- ### <a id="act-version">List current ACT version</a>: | ||
```sh | ||
act --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on linux it installs into
`pwd`/bin/act
so command to run would be something like ./bin/act --version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i suggest adding something to add act to path or create a soft ln to act from directory already in path (I did the latter)
@@ -0,0 +1,123 @@ | |||
# Nektos-ACT Use Guide | |||
### This guide describes necessary steps to use of Nektos-ACT for developing, debugging, and running github actions locally | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a note somewhere around here to remind that docker is necessary to be installed and the docker service running
export DOCKER_CERT_PATH=$(docker context inspect --format '{{.Storage.TLSPath}}')/docker | ||
``` | ||
|
||
<!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed? seems redundant to earlier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just in case certificates are desired or a dev machine has strong security access policy for container(s)
Fixes issue #723