Skip to content

Commit

Permalink
Migration script fixes (#138)
Browse files Browse the repository at this point in the history
* Remove non-functional `pipx` example

* Fix .flake typo
  • Loading branch information
akx authored Jan 2, 2024
1 parent ffa5328 commit 1c1e205
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ To compare dist files with a reference checkout, run the following:
python -m hatch_jupyter_builder.compare_migration <source_dir> <target_dir> sdist
```

The migration scripts can also be used without installation, using `pipx`, e.g.:

```bash
pipx hatch_jupyter_builder migrate .
```

Use `wheel` to compare wheel file contents.

See the [documentation for more information on migration](https://hatch-jupyter-builder.readthedocs.io/en/latest/source/how_to_guides/index.html) for more details.
Expand Down
5 changes: 3 additions & 2 deletions hatch_jupyter_builder/migrate/_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
# Move flake8 config to separate file, preserving comments.
# Add .flake8 file to git.
setup_cfg = Path("setup.cfg")
flake8_path = Path(".flake8")
flake8 = ["[flake8]"]
if setup_cfg.exists():
lines = setup_cfg.read_text("utf-8").splitlines()
Expand All @@ -97,8 +98,8 @@
flake8.append(line)

if matches:
Path(".flake8").write_text("\n".join(flake8) + "\n", "utf-8")
subprocess.run(["git", "add", ".flake"], check=False)
flake8_path.write_text("\n".join(flake8) + "\n", "utf-8")
subprocess.run(["git", "add", str(flake8_path)], check=False)


# Migrate and remove unused config.
Expand Down

0 comments on commit 1c1e205

Please sign in to comment.