Skip to content

Commit 9e6bc56

Browse files
committed
Include pyjobshop as local dependency
1 parent be2b552 commit 9e6bc56

90 files changed

Lines changed: 10245 additions & 236 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report highlighting an issue.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
#### Describe the bug
10+
11+
[ A clear and concise description of what the bug is.
12+
This should explain **why** the current behavior is a problem and why the expected output is a better solution. ]
13+
14+
#### Code sample
15+
16+
```python
17+
# Your code here that produces the bug
18+
# This example should be self-contained, and so not rely on external data.
19+
# It should run in a fresh Python session, and so include all relevant imports.
20+
```
21+
22+
<details>
23+
24+
**Note**: Please be sure you are using the latest released version of `pyjobshop`, or a recent build of `main`.
25+
If your problem has been fixed in an unreleased version, you might be able to use `main` until a new release occurs.
26+
27+
**Note**: If you are using a released version, have you verified that the bug exists in the master branch of this repository?
28+
29+
</details>
30+
31+
If the issue has not been resolved, please file it in the issue tracker.
32+
Make sure to include the version of Python you are using, and the version of `pyjobshop` you run.
33+
You can copy-paste the output of `import pyjobshop; pyjobshop.show_versions()` to achieve this.
34+
35+
#### Expected Output
36+
37+
A clear and concise description of what you expected to happen.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
#### Is your feature request related to a problem? Please describe
10+
A clear and concise description of what the problem is.
11+
For example, start with "I'm always frustrated when [...]", and go from there.
12+
13+
#### Describe the solution you'd like
14+
A clear and concise description of what you want to happen.
15+
16+
#### Describe alternatives you have considered
17+
A clear and concise description of any alternative solutions or features you have considered.
18+
19+
#### Additional context
20+
Add any other context about the feature request here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This PR:
2+
3+
- [ ] Closes #xxxx.
4+
- [ ] Adds and passes relevant tests.
5+
- [ ] Has well-formatted code and documentation.
6+
7+
<details>
8+
9+
**Notes**:
10+
11+
Please read our [contributing guidelines](https://pyjobshop.org/latest/dev/contributing.html) first.
12+
In particular:
13+
14+
- You must add tests when making code changes. This keeps the code coverage level up, and helps ensure the changes work as intended.
15+
- When fixing a bug, you must add a test that would produce the bug in the master branch, and then show that it is fixed with the new code.
16+
- New code additions must be well formatted. Changes should pass the pre-commit workflow, which you can set up locally using [pre-commit](https://pre-commit.com/#intro).
17+
- Docstring additions must render correctly, including escapes and LaTeX.
18+
- Finally, it is essential that all contributions in this PR are license-compatible with PyJobShop's MIT license. Please check that this PR can be included into PyJobShop under the MIT license.
19+
20+
</details>

pyjobshop/.github/workflows/CI.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
name: Test pyjobshop using Python ${{ matrix.python-version }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
python-version: ['3.9', '3.10', '3.11', '3.12']
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install the latest version of uv
21+
uses: astral-sh/setup-uv@v3
22+
with:
23+
version: "0.5.4"
24+
25+
- name: Install Python version
26+
run: uv python install ${{ matrix.python-version }}
27+
28+
- name: Install the project
29+
run: uv sync --all-extras
30+
31+
- name: Cache pre-commit
32+
uses: actions/cache@v3
33+
id: cache-pre-commit
34+
with:
35+
path: ~/.cache/pre-commit/
36+
key: pre-commit-${{ matrix.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
37+
38+
- name: Install pre-commit
39+
if: steps.cache-pre-commit.outputs.cache-hit != 'true'
40+
run: uv run pre-commit install --install-hooks
41+
42+
- name: Run pre-commit
43+
run: uv run pre-commit run --all-files
44+
45+
- name: Run tests
46+
run: uv run pytest --solvers ortools cpoptimizer
47+
48+
- name: Upload coverage reports to Codecov
49+
uses: codecov/codecov-action@v3
50+
env:
51+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [ created ]
6+
7+
jobs:
8+
run:
9+
name: "Build and publish release"
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v3
16+
with:
17+
version: "0.4.27"
18+
19+
- run: uv python install 3.11
20+
- run: uv build
21+
- run: uv publish
22+
env:
23+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)