Name | terra_ui_components JSON |
Version |
0.0.15
JSON |
| download |
home_page | None |
Summary | NASA Terra UI Components Library |
upload_time | 2025-02-17 20:51:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Terra UI Components
Intro
### Forking the Repo
Start by [forking the repo](https://github.com/gesdisc/components/fork) on GitHub, then clone it locally and install dependencies.
```bash
git clone https://github.com/YOUR_GITHUB_USERNAME/components terra-ui-components
cd terra-ui-components
npm install
```
### Developing
Once you've cloned the repo, run the following command.
```bash
npm start
```
This will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically.
### Building
To generate a production build, run the following commands.
```bash
npm run build # to build the Lit components
```
### Creating New Components
To scaffold a new component, run the following command, replacing `terra-tag-name` with the desired tag name.
```bash
npm run create terra-tag-name
```
This will generate source files, a stylesheet, a Jupyter widget, and a docs page for you. When you start the dev server, you'll find the new component in the "Components" section of the sidebar. Do a `git status` to see all the changes this command made.
### Testing Components in Jupyter Lab
Install the `uv` package manager (https://github.com/astral-sh/uv), it's a lightweight tool that makes working with virtual environments and packages much easier.
Then run the following:
- `uv venv` - create a virtual environment (only have to do this the first time)
- `source .venv/bin/activate` - activate it
- `uv pip install -e ".[dev]"` - install dependencies (see pyproject.toml)
- `./.venv/bin/jupyter lab` - spins up Jupyter lab and should open the browser for you
### Publishing to NPM and PyPI
The Lit components are available on NPM at: https://www.npmjs.com/package/@nasa-terra/components
The Python widgets are available on PyPI:
To build a new version and publish it, you can use NPM commands. The Python equivalents will be run automatically for you (see the "scripts" in package.json for details). You will need access to both repositories in order to publish.
```bash
# commit all your changes first
npm version patch # bump the version, you can use "major", "minor", "patch", etc.
npm publish --scope=public
```
## License
Terra UI Components were created by the NASA GES DISC team, on top of the amazing library Shoelace.
Shoelace was created by [Cory LaViska](https://twitter.com/claviska) and is available under the terms of the MIT license.
Raw data
{
"_id": null,
"home_page": null,
"name": "terra_ui_components",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/43/5c/df6425687605715399550e7006d83c3d653adf4eede56e65b9debc34ed76/terra_ui_components-0.0.15.tar.gz",
"platform": null,
"description": "# Terra UI Components\n\nIntro\n\n### Forking the Repo\n\nStart by [forking the repo](https://github.com/gesdisc/components/fork) on GitHub, then clone it locally and install dependencies.\n\n```bash\ngit clone https://github.com/YOUR_GITHUB_USERNAME/components terra-ui-components\ncd terra-ui-components\nnpm install\n```\n\n### Developing\n\nOnce you've cloned the repo, run the following command.\n\n```bash\nnpm start\n```\n\nThis will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically.\n\n### Building\n\nTo generate a production build, run the following commands.\n\n```bash\nnpm run build # to build the Lit components\n```\n\n### Creating New Components\n\nTo scaffold a new component, run the following command, replacing `terra-tag-name` with the desired tag name.\n\n```bash\nnpm run create terra-tag-name\n```\n\nThis will generate source files, a stylesheet, a Jupyter widget, and a docs page for you. When you start the dev server, you'll find the new component in the \"Components\" section of the sidebar. Do a `git status` to see all the changes this command made.\n\n### Testing Components in Jupyter Lab\n\nInstall the `uv` package manager (https://github.com/astral-sh/uv), it's a lightweight tool that makes working with virtual environments and packages much easier.\n\nThen run the following:\n\n- `uv venv` - create a virtual environment (only have to do this the first time)\n- `source .venv/bin/activate` - activate it\n- `uv pip install -e \".[dev]\"` - install dependencies (see pyproject.toml)\n- `./.venv/bin/jupyter lab` - spins up Jupyter lab and should open the browser for you\n\n### Publishing to NPM and PyPI\n\nThe Lit components are available on NPM at: https://www.npmjs.com/package/@nasa-terra/components\nThe Python widgets are available on PyPI:\n\nTo build a new version and publish it, you can use NPM commands. The Python equivalents will be run automatically for you (see the \"scripts\" in package.json for details). You will need access to both repositories in order to publish.\n\n```bash\n# commit all your changes first\nnpm version patch # bump the version, you can use \"major\", \"minor\", \"patch\", etc.\nnpm publish --scope=public\n```\n\n## License\n\nTerra UI Components were created by the NASA GES DISC team, on top of the amazing library Shoelace.\n\nShoelace was created by [Cory LaViska](https://twitter.com/claviska) and is available under the terms of the MIT license.\n",
"bugtrack_url": null,
"license": null,
"summary": "NASA Terra UI Components Library",
"version": "0.0.15",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "71d8ee0473a7580bfc3fd77d260ad0f6f3a7616cc6bb8c6057cb737a493d61da",
"md5": "d57981f6d8624855ed2df24af7115780",
"sha256": "603f2adafb8f8f192c930fb6272113f121256dd7be626157e786a5cd13b5284e"
},
"downloads": -1,
"filename": "terra_ui_components-0.0.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d57981f6d8624855ed2df24af7115780",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9019,
"upload_time": "2025-02-17T20:51:49",
"upload_time_iso_8601": "2025-02-17T20:51:49.347799Z",
"url": "https://files.pythonhosted.org/packages/71/d8/ee0473a7580bfc3fd77d260ad0f6f3a7616cc6bb8c6057cb737a493d61da/terra_ui_components-0.0.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "435cdf6425687605715399550e7006d83c3d653adf4eede56e65b9debc34ed76",
"md5": "bf9469310df8388301fd22e2a4db52fe",
"sha256": "6c62002cd93925e08056371d029549a625400ef09aeb09780fc7dc62494b9fdb"
},
"downloads": -1,
"filename": "terra_ui_components-0.0.15.tar.gz",
"has_sig": false,
"md5_digest": "bf9469310df8388301fd22e2a4db52fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3983392,
"upload_time": "2025-02-17T20:51:50",
"upload_time_iso_8601": "2025-02-17T20:51:50.551117Z",
"url": "https://files.pythonhosted.org/packages/43/5c/df6425687605715399550e7006d83c3d653adf4eede56e65b9debc34ed76/terra_ui_components-0.0.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-17 20:51:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "terra_ui_components"
}