Skip to content

Project script fixes, Justfile #1273

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

benspaulding
Copy link
Contributor

As I was working on the bits in #1272 I found some issues with stub generation, permissions on scripts, and other project tooling that was a little cumbersome.

  • If you want a separate PR for each commit, please let me know!
  • If you want to cherry-pick all or some of these commits yourself, please do!

Most commits are quite small, but the one with the Justfile made working on the project much simpler as I did not have to remember various scripts for listing, testing, building, etc. I added the following to the README file:

You can now follow instructions in subsequent sections of this document to manually install dependencies, run tests, etc., or you can install just to run our Justfile. For example:

> just
Available recipes:
    ls              # list available recipes
    help            # print help info & list available recipes
    full            # refresh setup, run checks & builds
    clean           # remove development artifacts
    setup           # setup up project development environment
    draft-stubs     # generate new draft stub files
    lint            # run all linters & checkers
    test            # run all tests
    build           # build project packages
    release         # build & release project packages

> just --show full
# refresh setup, run checks & builds
full: clean setup lint test build

> just full
... # proceeds to create virtualenv, install dependencies, run tests, etc.

benspaulding and others added 6 commits November 25, 2022 23:55
The namespace tests were causing errors and are not needed for stub
generation anyway.

```
Critical error during semantic analysis: django-source/tests/apps/namespace_package_base/nsapp/apps.py: error: Duplicate module named "apps" (also at "tests/apps/__init__.py")
```
@sobolevn
Copy link
Member

Hi! Thanks for the suggestions. I have no idea what just is. But, I've being using Makefile for the last 15 years. Maybe we can stick to it?

@benspaulding
Copy link
Contributor Author

@sobolevn wrote:

Hi! Thanks for the suggestions. I have no idea what just is. But, I've being using Makefile for the last 15 years. Maybe we can stick to it?

Yeah, no worries! Make is powerful, but its quirks led me to adopting Just in recent times. Since I didn’t see a Makefile I thought I would share my Justfile.

Shall I revert commit 74573d5, or would you like to cherry-pick other commits you want?

Thanks for looking at the PR!

@intgr
Copy link
Collaborator

intgr commented Dec 2, 2022

Some personal bikeshedding, feel free to ignore. :)

I'm not familiar with Just either, but FWIW I think make is crap and should die. There are multiple slightly incompatible implementations of make; it doesn't work well on Windows; its syntax looks superficially similar to shell scripts, but there are significant behavior differences and I've lost data because of this (running rm commands).

Personally I would prefer something Python-based, e.g. using subprocess.run(). But pyinvoke is unmaintained. Using Python code in Justfile is an option, or using click to create a simple CLI with subcommands.

@intgr intgr added the discussion needed Issues or PRs that require further discussion or a decision to be made label Jun 14, 2023
@intgr intgr added the stale Pull requests that have been out of date or unmergeable for a long time. label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed Issues or PRs that require further discussion or a decision to be made stale Pull requests that have been out of date or unmergeable for a long time.
Development

Successfully merging this pull request may close these issues.

3 participants