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

Subdirect #15

Merged
merged 23 commits into from
Nov 8, 2024
Merged

Subdirect #15

merged 23 commits into from
Nov 8, 2024

Conversation

covracer
Copy link
Collaborator

@covracer covracer commented Nov 7, 2024

Background and Links

  • Django imports at the top level, like allowedflare.LoginView, are problematic because they depend on Django setup

Changes and Testing

  • Rename allowedflare.allowedflare to allowedflare.core for brevity
  • Drop Django-specific imports from the top level. This is a breaking change. All users will need to update their imports as demonstrated in demodj/settings.py
  • Fix warning for backslash dot in plain string '\.'
  • Improve the example JupyterHub configuration
  • Upgrade dependencies and move from requirements.in to pyproject.toml because of issues with the djangorestframework-stubs[compatible-mypy] extra seemingly forcing the oldest version to be chosen; the UV docs say "Note extras are not supported with the requirements.in format."
  • Use uv in the container

@covracer covracer force-pushed the subdirect branch 4 times, most recently from 97ccbc6 to 1bb9759 Compare November 7, 2024 14:43
Dockerfile Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@covracer covracer force-pushed the subdirect branch 4 times, most recently from c0ed434 to baba85b Compare November 7, 2024 15:18
- run: pip install --upgrade pip uv
env:
PIP_PROGRESS_BAR: 'off'
- run: |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved to setup-uv, if you are curious

      - uses: astral-sh/setup-uv@v3
        with:
          enable-cache: true
      - run: uv python pin ${{ matrix.python-version }}
      - run: uv sync --python-preference=only-managed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been seeing uv sync and uv.lock in the docs. I'll have to try them out.

@@ -15,8 +15,33 @@ dynamic = ['version']
name = 'allowedflare'
readme = 'README.md'

[project.optional-dependencies]
precommit = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't pre-commit handle its deps itself? Or is this to enable local usage of all pre-commit tools

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for system/local installation of tools like codespell which pre-commit will use.

@covracer covracer requested a review from darpham November 8, 2024 00:15
@covracer covracer merged commit 314e6d6 into main Nov 8, 2024
3 checks passed
@covracer covracer deleted the subdirect branch November 8, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants