Skip to content
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

Document and cleanup scripts. #638

Open
tomchristie opened this issue Dec 7, 2022 · 0 comments
Open

Document and cleanup scripts. #638

tomchristie opened this issue Dec 7, 2022 · 0 comments
Labels
tooling Development tooling and workflow

Comments

@tomchristie
Copy link
Member

tomchristie commented Dec 7, 2022

Prompted by @agronholm on our chat channel.

We should add a README to our scripts directory, explaining that we're using the GitHub "scripts to pull them all" pattern, and show how that ties in with our test and publish workflows.

That'd also be a good opportunity for a bit of clean-up.

It might be neatest for our scripts directory to strictly have a 1:1 mapping with the steps we have in our workflows.

Here's how our two workflows currently look...

      - name: "Install dependencies"
        run: "scripts/install"
      - name: "Run linting checks"
        run: "scripts/check"
      - name: "Build package & docs"
        run: "scripts/build"
      - name: "Run tests"
        run: "scripts/test"
      - name: "Enforce coverage"
        run: "scripts/coverage"
      - name: "Install dependencies"
        run: "scripts/install"
      - name: "Build package & docs"
        run: "scripts/build"
      - name: "Publish to PyPI & deploy docs"
        run: "scripts/publish"

And our scripts...

$ ls -1 ./scripts/
build
check
clean  # This doesn't exist in a workflow.
coverage  # Called into by `test` when running locally.
install
lint  # This doesn't exist in a workflow.
publish
test
unasync  # Called into by `check` and `lint`

Perhaps a neater approach would be...

  • scripts/install - When running locally this should always start by removing any existing venv, coverage and build directories. We don't need scripts/clean then.
  • scripts/check and scripts/lint - I'd suggest we just have scripts/lint. Run scripts/lint --fix to update files in-place.
  • scripts/unasync - Should be a separate step in the workflow. Run scripts/unasync --fix to update files in-place.

So that each script is always a single workflow step.

@tomchristie tomchristie added the tooling Development tooling and workflow label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Development tooling and workflow
Projects
None yet
Development

No branches or pull requests

1 participant