Skip to content

Commit

Permalink
Merge pull request #14 from alan-turing-institute/13-fix-docker-build
Browse files Browse the repository at this point in the history
Fix hatch builds
  • Loading branch information
jemrobinson authored Feb 21, 2024
2 parents dfaf036 + dbfbc3f commit a48e38a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python run.py --client-id "<your client ID>" --client-secret "<your client secre
Alternatively, you can run in Docker by editing `docker/docker-compose.yaml` and running:

```bash
docker-compose up
docker compose up
```

from the `docker` directory.
Expand Down Expand Up @@ -72,11 +72,11 @@ You will need to register an application to interact with `Microsoft Entra`.
Do this as follows:

- Create a new `App Registration` in your `Microsoft Entra`.
- Set the name to whatever you choose (in this example we will use `apricot`)
- Set the name to whatever you choose (e.g. `apricot`)
- Set access to `Accounts in this organizational directory only`.
- Set `Redirect URI` to `Public client/native (mobile & desktop)` with a value of `urn:ietf:wg:oauth:2.0:oob`
- Under `Certificates & secrets` add a `New client secret`
- Set the description to `Apricot Authentication Secret`
- Set the description to whatever you choose (e.g. `Apricot Authentication Secret`)
- Set the expiry time to whatever is relevant for your use-case
- You **must** record the value of this secret at **creation time**, as it will not be visible later.
- Under `API permissions`:
Expand Down
29 changes: 16 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ classifiers = [
]
dependencies = [
"ldaptor~=21.2.0",
"oauthlib~=3.2.2",
"requests-oauthlib~=1.3.1",
"Twisted~=23.8.0",
"zope.interface~=6.0",
"oauthlib~=3.2.0",
"requests-oauthlib~=1.3.0",
"Twisted~=23.10.0",
"zope.interface~=6.2",
]

[project.urls]
Expand All @@ -40,12 +40,15 @@ Source = "https://github.com/alan-turing-institute/apricot"
[tool.hatch.version]
path = "apricot/__about__.py"

[tool.hatch.build.targets.wheel]
packages = ["."]

[tool.hatch.envs.lint]
detached = true
dependencies = [
"black>=23.1.0",
"mypy>=1.0.0",
"ruff>=0.0.243",
"black>=24.2.0",
"mypy>=1.8.0",
"ruff>=0.2.0",
"types-oauthlib>=3.2.0",
]

Expand All @@ -69,7 +72,7 @@ all = [
[tool.black]
target-version = ["py310", "py311"]

[tool.ruff]
[tool.ruff.lint]
select = [
# See https://beta.ruff.rs/docs/rules/
"A", # flake8-builtins
Expand Down Expand Up @@ -109,16 +112,16 @@ ignore = [
"PLR0915", # ignore too-many-statements
]

[tool.ruff.isort]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"

[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["apricot"]

[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "parents"

[tool.mypy]
disallow_subclassing_any = false # allow subclassing of types from third-party libraries
files = "apricot" # run mypy over this directory
files = "apricot" # run mypy over this directory
strict = true # enable all optional error checking flags

[[tool.mypy.overrides]]
Expand Down

0 comments on commit a48e38a

Please sign in to comment.