Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Packages = Google, write-good, MDX
Vocab = atopile

# Completely ignore generated API reference docs
IgnoredPaths = atopile/api-reference/**
IgnoredPaths = atopile-*/api-reference/**

[*.{md,mdx}]
BasedOnStyles = Vale, Google, write-good
Google.Exclamation = NO
Google.Quotes = NO

[atopile/api-reference/**]
[atopile-*/api-reference/**]
BasedOnStyles =
Vale.Spelling = NO
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ Convenience properties for accessing resistor terminals:

The Resistor component automatically includes these traits:

### [pickable](/atopile/api-reference/traits/pickable)
### pickable
Enables automatic part selection from the component database based on resistance, power, and voltage requirements.

### [can_bridge](/atopile/api-reference/traits/can-bridge)
### can_bridge
Allows the resistor to be used in bridging connections with the `~>` operator for series connections.

### [simple_value_representation](/atopile/api-reference/traits/simple-value-representation)
### simple_value_representation
Provides a simplified string representation showing key parameters for debugging and documentation.

## Package Selection
Expand Down
20 changes: 13 additions & 7 deletions atopile/changelog.mdx → atopile-0.12.x/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ icon: 'rectangle-history'

{/* https://www.mintlify.com/docs/content/components/update */}

<Update label="v0.12 (Draft)" description="🚧 In Development">
<Update label="v0.12" description="✨ LSP Autocomplete, Go to Definition & Build DAG">

This version is currently under development. Stay tuned for updates!
LSP autocomplete is here! The language server now provides dot auto-complete suggestions, import suggestions, and "go to definition" navigation, making the editor experience significantly more productive. The VSCode extension is also less noisy with annoying popups removed.

For up-to-date minor changes check out the [GitHub Releases](https://github.com/atopile/atopile/releases).
The build system has been rearchitected to model builds as a DAG of individual steps, improving reliability and fixing issues with extra build directories being generated for dependencies.

A new `ato package verify` command helps validate packages before publishing. Package management is more robust with version fallback support, system cert store usage, and fixed authentication headers.

Library improvements include support for parallel pull resistors in `requires_pulls` checks and hidden value text on the fab layer for cleaner board outputs.

**Full Changelog**: https://github.com/atopile/atopile/releases/tag/v0.12.0

</Update>

Expand Down Expand Up @@ -81,9 +87,9 @@ Added I2C Addressing & Bus viewer

Build artifacts are now included when publishing. This means that when you go to https://packages.atopile.io/, you'll see the build artifacts ready to order or explore.

Added `hide_designators` [config option](/atopile/reference/config#builds-hide-designators).
Added `hide_designators` [config option](./reference/config#builds-hide-designators).

Improved checks system with [new exclude capability](/atopile/reference/config#builds-exclude-checks)
Improved checks system with [new exclude capability](./reference/config#builds-exclude-checks)

Disabled required check for top level modules

Expand Down Expand Up @@ -118,9 +124,9 @@ atopile's package management system has had a huge upgrade!

To find packages, check out the entirely overhauled [package index](https://packages.atopile.io).

The new commands to packages are clearer and help keep the packages all in sync. See the updated [package guide](/atopile/essentials/4-packages).
The new commands to packages are clearer and help keep the packages all in sync. See the updated [package guide](./essentials/4-packages).

If you're looking to publish your own packages, [check out the guide](/atopile/guides/publish).
If you're looking to publish your own packages, [check out the guide](./guides/publish).

## Upgrading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icon: 'plus'
## 1) Auto pick passive components

The simplest way to add components is to let atopile pick them for you. This works for passive components such as
[resistors](/atopile/api-reference/components/resistor), [capacitors](/atopile/api-reference/components/capacitor), and [inductors](/atopile/api-reference/components/inductor).
[resistors](../api-reference/components/resistor), [capacitors](../api-reference/components/capacitor), and [inductors](../api-reference/components/inductor).

For example, let's say you need a 10kΩ resistor with 1% tolerance in an 0402 package:
```ato
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently the following traits are supported:

## can_bridge_by_name

This trait enables using the [sperm operator `~>`](/atopile/essentials/1-the-ato-language) to make a "bridging" connection over a module.
This trait enables using the [sperm operator `~>`](./1-the-ato-language) to make a "bridging" connection over a module.

For example:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 47 additions & 2 deletions atopile/guides/install.mdx → atopile-0.12.x/guides/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,54 @@ description: 'How to install atopile'
icon: 'terminal'
---

import QuickstartInstall from '/snippets/atopile/guides/quick-install.mdx';
## Install via VSCode/Cursor (Recommended)

<QuickstartInstall />
atopile officially supports VSCode and Cursor.

We recommend using Cursor. AI is already getting very good at writing `ato` code.

Download it here: https://www.cursor.com/

Once you have VSCode/Cursor just install the [atopile VSCode/Cursor extension](https://marketplace.visualstudio.com/items?itemName=atopile.atopile).

![atopile extension](/atopile-0.12.x/images/vscode-plugin.png)

After installation it will prompt you to install the `ato` CLI. Click the `Install Automatically` button.

![atopile extension install](/atopile-0.12.x/images/vscode-plugin-install-popup.png)

<Accordion title="(Experimental) MCP server">
Set up an MCP server for this documentation with

``` sh
npx mint-mcp add atopile
```

</Accordion>

## Installing KiCAD

If you want to layout or route PCBs you will need to install [KiCAD](https://www.kicad.org/download/).

<CodeGroup>
```sh macOS (brew)
brew install kicad
```

```sh Arch Linux
sudo pacman -S kicad
```

```sh Ubuntu
sudo apt install kicad
```

```sh other
https://www.kicad.org/download/
# or click the KiCAD link above
```

</CodeGroup>


Ultimately, `atopile` is a Python package, so you can install it wherever and however you want—but some Python package managers are better than others. Here's the recommended method to install atopile.
Expand Down
File renamed without changes.
File renamed without changes.
55 changes: 50 additions & 5 deletions atopile/quickstart.mdx → atopile-0.12.x/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,54 @@ icon: "rocket"
See the [installation guide](./guides/install) for advanced setups.
For the simple way to get started, read on.

import QuickstartInstall from "/snippets/atopile/guides/quick-install.mdx";
## Install via VSCode/Cursor (Recommended)

<QuickstartInstall />
atopile officially supports VSCode and Cursor.

We recommend using Cursor. AI is already getting very good at writing `ato` code.

Download it here: https://www.cursor.com/

Once you have VSCode/Cursor just install the [atopile VSCode/Cursor extension](https://marketplace.visualstudio.com/items?itemName=atopile.atopile).

![atopile extension](/atopile-0.12.x/images/vscode-plugin.png)

After installation it will prompt you to install the `ato` CLI. Click the `Install Automatically` button.

![atopile extension install](/atopile-0.12.x/images/vscode-plugin-install-popup.png)

<Accordion title="(Experimental) MCP server">
Set up an MCP server for this documentation with

``` sh
npx mint-mcp add atopile
```

</Accordion>

## Installing KiCAD

If you want to layout or route PCBs you will need to install [KiCAD](https://www.kicad.org/download/).

<CodeGroup>
```sh macOS (brew)
brew install kicad
```

```sh Arch Linux
sudo pacman -S kicad
```

```sh Ubuntu
sudo apt install kicad
```

```sh other
https://www.kicad.org/download/
# or click the KiCAD link above
```

</CodeGroup>

## Trying out an example

Expand All @@ -20,12 +65,12 @@ Press `Ctrl+Shift+P` and search for `atopile: Open Example`.
Choose any example you like from the selection.
After confirming wait for the `ato menu bar` to appear:

![ato menu bar](/atopile/images/ato-menu-bar.png)
![ato menu bar](/atopile-0.12.x/images/ato-menu-bar.png)

Press on the play button to compile the example.
You will be greeted by the logs in the terminal:

![compile example](/atopile/images/ato-example-build.png)
![compile example](/atopile-0.12.x/images/ato-example-build.png)

If you have KiCAD installed, you can now press on the PCB icon in the ato menu bar to open the layout file.

Expand Down Expand Up @@ -113,7 +158,7 @@ INFO Build successful! 🚀
Then KiCAD will open up (that's what the `--open` flag does).
Your shiny ✨ new component should be waiting for you in the top left corner (possibly off the current screen).

![layout](/atopile/images/quickstart-layout.png)
![layout](/atopile-0.12.x/images/quickstart-layout.png)

Oh yeah! We're in business. 😎

Expand Down
File renamed without changes.
File renamed without changes.
98 changes: 98 additions & 0 deletions atopile-0.14.x/api-reference/components/battery.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---

title: "Battery"
icon: microchip
description: ""
---


## Parameters

<ParamField path='capacity' type='ampere_hour'>
</ParamField>

<ParamField path='voltage' type='volt'>
</ParamField>


## Interfaces

<ParamField path='power' type='ElectricPower'>
</ParamField>


## Global Attributes


These attributes are available to all modules and interfaces in a design.
<ParamField path='lcsc_id' type='str'>

Assign the LCSC ID of the module.

If set, this will tell the picker to select that part from LCSC for this block.
</ParamField>

<ParamField path='manufacturer' type='str'>

This module's manufacturer name, as a string.

Only exact matches on the manufacturer's name will be found by the picker.
It's recommended to fill this information based on what `ato create component`
provides.
</ParamField>

<ParamField path='mpn' type='str'>

This module's manufacturer part number, as a string.

For the picker to select the correct part from the manufacturer,
this must be set.
</ParamField>

<ParamField path='package' type='str'>

The package of the module.

This drives which components can be selected, and what footprint is used.

Must exactly match a known package name.
</ParamField>

<ParamField path='exclude_from_bom' type='bool'>
</ParamField>

<ParamField path='override_net_name' type='str'>

When set on an interface, this will override the net name of the interface.

This is useful for renaming nets which are automatically generated.
</ParamField>

<ParamField path='required' type='bool'>

Only for ModuleInterfaces.
If set to `True`, require that interface is connected to something outside
of the module it's defined in.
</ParamField>

<RequestExample>
```ato Basic Usage
import Battery, ElectricPower

battery = new Battery
battery.voltage = 3.7V +/- 10% # Li-ion cell
battery.capacity = 2000mAh +/- 5%

# Connect to system power
system_power = new ElectricPower
battery.power ~ system_power

# Battery specifications will constrain system voltage
assert system_power.voltage within battery.voltage

# For multiple cells in series
battery_pack = new Battery
battery_pack.voltage = 11.1V +/- 10% # 3S Li-ion pack
battery_pack.capacity = 2000mAh +/- 5%
```
</RequestExample>
Loading
Loading