Metadata-Version: 2.5
Name: setup-spyder
Version: 0.1.0
Summary: Importable Spyder 5.x launcher (JetBrains Mono, wrap lines) for other repositories.
Project-URL: Homepage, https://github.com/bernardogoltz/setup-spyder
Project-URL: Repository, https://github.com/bernardogoltz/setup-spyder
Project-URL: Issues, https://github.com/bernardogoltz/setup-spyder/issues
Author: Bernardo Goltz
License-Expression: MIT
License-File: LICENSE
Keywords: data-analysis,eda,ide,launcher,spyder,uv
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: <3.13,>=3.11
Requires-Dist: pandas>=2.0
Requires-Dist: rich>=13.9
Requires-Dist: spyder<6,>=5.5
Description-Content-Type: text/markdown

# setup-spyder
Run [Spyder-IDE](https://www.spyder-ide.org/) @ version 5.6 (great tool for Exploratory Data Analysis) within a isolated Virtual-Environment using [uv](https://docs.astral.sh/uv/) package 
manager. 
## __quick launch__ `[tl;dr]`
### System requirements
#### Requires [uv](https://docs.astral.sh/uv/)
```shell
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### 2. add the package @ `pyproject.toml`
```shell
uv add setup-spyder
```

```shell
uv run setup-spyder
```
## __Actually readable section:__
## Why this repository exists?
- Spyder could be considered the best IDE/Tool for either doing EDA and teaching Python, Data Science, Analytics and more due to it's Variable Explorer, Interactive IPython Console and Graphics Engine for  Data Visualization. 
- Many frustrated tentatives of emulating the spyder experience in VSCode-ish IDE's where thought I could got a great Software Engineering Platform the understanding of data were prejudicated. 
- I really miss working with spyder...
### Isolated python interpreter. 
```shell
% which python3
> /usr/bin/python3
```
```shell
% source .venv/bin/activate
% which python
> setup-data-analytics/.venv/bin/python
```

## Use in another repository

Add it as a dependency (no need to clone this repo into the other project):

```shell
uv add setup-spyder
```

Or straight from git, to track `main` ahead of a release:

```shell
uv add git+https://github.com/bernardogoltz/setup-spyder
```

That installs Spyder 5.x into the other project's environment. Then open it from that repo:

```shell
uv run setup-spyder
```

Or import it:

```python
from setup_spyder import launch

if __name__ == "__main__":
    raise SystemExit(launch())
```

`launch()` starts Spyder with JetBrains Mono, wrap lines, and the current repository as the working directory.

Without adding it to the project:

```shell
uvx --from setup-spyder setup-spyder
```

## Integration routine

One command to answer one question: **does this package actually work when
someone installs it from GitHub?**

```shell
uv run setup-spyder-integration
```

That builds a throwaway project in `tests/fixture_integration/` and, inside it:

1. installs `setup-spyder` straight from GitHub (`uv add git+...`),
2. checks that `import setup_spyder` works,
3. runs `uv run setup-spyder`, opening Spyder on that project,
4. prints a summary of every step, then deletes the throwaway project.

Nothing there imports `src/` — it is a real outside consumer, same as any other
repository would be. The install lands in the fixture's own `.venv/`, which is
erased at the end, so your main environment is never touched.

### Flags

| Flag | What changes |
| --- | --- |
| `--no-launch` | Stops after the install and the import check; no Spyder window. |
| `--local` | Installs the local working tree instead of GitHub — use it to test changes you have not pushed yet. |
| `--ref develop` | Installs from another branch, tag or commit. |
| `--fresh` | Deletes the throwaway project first and rebuilds it from scratch. |
| `--keep` | Skips the cleanup, so you can inspect the fixture — handy after a failure. |

Anything after `--` goes to `setup-spyder`:

```shell
uv run setup-spyder-integration --fresh -- main.py
```

### Generated files

The routine writes the fixture's `pyproject.toml`, `uv.lock`, `main.py`,
`.venv/` and `.spyproject/`, and removes all five when it finishes — pass
`--keep` to hold on to them. They are gitignored either way; only the fixture's
`README.md` is versioned, so nothing you care about can be deleted.

## Tests

Unit tests run on every push/PR, and again before publishing to PyPI.

```shell
uv sync
uv run pytest -v
```

## Releasing to PyPI

Publishing runs on [trusted publishing](https://docs.pypi.org/trusted-publishers/)
— no API token lives in this repo. One-time setup, on both `pypi.org` and
`test.pypi.org` (Account → Publishing → add a pending publisher):

| Field | Value |
| --- | --- |
| PyPI project name | `setup-spyder` |
| Owner | `bernardogoltz` |
| Repository | `setup-spyder` |
| Workflow name | `publish.yml` |
| Environment | `pypi` (or `testpypi`) |

Then create the matching GitHub environments (Settings → Environments) with the
same names, so the OIDC claim is environment-scoped.

To cut a release:

1. Bump `__version__` in `src/setup_spyder/__init__.py` — it is the single
   source of truth; `pyproject.toml` reads it via `[tool.hatch.version]`.
2. Run the **Publish** workflow manually with `target: testpypi` and check the
   rendered page plus a clean install.
3. Tag and publish a GitHub release named `v<version>`. The workflow refuses to
   build if the tag and `__version__` disagree, then publishes to PyPI.
