-
Notifications
You must be signed in to change notification settings - Fork 5
docs: document how to install the alpha packages #90
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
base: main
Are you sure you want to change the base?
Conversation
|
||
4. Remove `@algorandfoundation:registry=https://npm.pkg.github.com` from `~/.npmrc`, so NPM hosted `@algorandfoundation` packages can be resolved. | ||
|
||
Note: You will need to perform steps 2-4 each time your either install a package for the first time or update a GitHub package hosted dependency. Installing from the lock file only requires the token. |
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'm wondering if we can reduce the manual steps by:
- instead of using the global
.npmrc
, we can create a file within the repo, maybe call it.github-npm-rc
(I can't think of a better name). - The content of the file is
@algorandfoundation:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken={TOKEN}
- Of course, we should add this file to git ignore.
- Update the install script to
$env:NPM_CONFIG_USERCONFIG=".algokit-core-alpharc"
npm install --save @algorandfoundation/algokit-transact@1.0.0-alpha.4
Remove-Item Env:NPM_CONFIG_USERCONFIG
Note: The above script only works for PowerShell. It set the environment variable NPM_CONFIG_USERCONFIG so that npm install can pick up the right file, then it unsets the env var.
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.
Yeah we could do something like that. Worth noting that this applies when installing the package in some other repo like utils-ts
, so it may be better placed in that repo.
Another option that may work (would need to test) is to drop an .npmrc in the target repo (e.g. utils-ts) with a commented out #@algorandfoundation:registry=https://npm.pkg.github.com
line. You can then conditionally uncomment, which saves touching the user .npmrc.
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.
Another option that may work (would need to test) is to drop an .npmrc in the target repo (e.g. utils-ts) with a commented out #@algorandfoundation:registry=https://npm.pkg.github.com line. You can then conditionally uncomment, which saves touching the user .npmrc.
I tested this option, it works. I think this is nice:
- We can store the token at the global level
//npm.pkg.github.com/:_authToken={TOKEN}
- In the target project, we create
.npmrc
file which has
@algorandfoundation:registry=https://npm.pkg.github.com
Then we can comment it out if we don't need it.
|
||
```toml | ||
[tool.poetry.dependencies] | ||
algokit_algod_api = { url = "https://github.com/algorandfoundation/algokit-core/releases/download/python%2Falgod_api%401.0.0-alpha.2/algokit_algod_api-1.0.0a2-py3-none-any.whl" } |
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.
Installing like this works fine but, for some reason I don't yet understand, the wheel doesn't bring a list of dependencies with it yet.
I installed this and it didn't ask the package manager to install pydantic, for example
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.
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.
Which means that the generated algod client should import algokit transact from a non-local source CC: @aorumbayev
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 wonder if it's this space here https://github.com/algorandfoundation/algokit-core/blob/main/packages/python/algod_api/pyproject.toml#L16
No description provided.