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

merge from develop #26

Merged
merged 142 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 138 commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
0ca722e
🐛 fix(artifacts.py): remove unused import and unused code related to …
altaf-ali Jul 4, 2023
423ee7b
skeleton code for environment mutations
SamO135 May 31, 2023
410c203
send build request to softpack-builder
SamO135 Jun 5, 2023
04b559d
added mutation to upload a file
SamO135 Jun 8, 2023
a62ba54
created environment input class for mutations
SamO135 Jun 12, 2023
e0d7515
modified 'create' and 'update' query parameters
SamO135 Jul 4, 2023
fbc786c
allow port 5173 for the client
SamO135 Jul 10, 2023
931acde
automatically push to the artifacts repo when creating a new environment
SamO135 Jul 13, 2023
4b68f5b
fix environments query not working
SamO135 Jul 13, 2023
3eb01d8
update existing environment
SamO135 Jul 31, 2023
eadf62c
optional package ids
SamO135 Aug 1, 2023
ad5a4b4
update error handling and responses given by graphql
SamO135 Aug 1, 2023
331d147
check all fields are provided and the path is valid
SamO135 Aug 2, 2023
15a2e67
delete environment mutation
SamO135 Aug 2, 2023
a6c40a3
prevent replacing environments when changing locations
SamO135 Aug 3, 2023
58a474b
add file upload mutation for softpack-builder
SamO135 Aug 7, 2023
b682c9e
format code with tox
SamO135 Aug 8, 2023
634e051
rework update method using create_artifacts
SamO135 Aug 11, 2023
6bfc9d9
rename file upload method
SamO135 Aug 11, 2023
26224f2
remove unused method
SamO135 Aug 11, 2023
15fc9a3
mock testing
SamO135 Aug 14, 2023
5aa0131
pytest for committing to repo
SamO135 Aug 14, 2023
2e7fd0e
clean up temp directory in commit test
SamO135 Aug 14, 2023
c268d53
pytest for pushing to repo
SamO135 Aug 14, 2023
caa43d8
add create file test
SamO135 Aug 14, 2023
12297b0
add delete environment test
SamO135 Aug 14, 2023
d043767
removed code duplication in tests
SamO135 Aug 15, 2023
d37febe
reformatted with tox
SamO135 Aug 15, 2023
52567c3
format and improve code coverage
SamO135 Aug 15, 2023
2f83f3d
add create environment test
SamO135 Aug 15, 2023
d822835
finish create environment test
SamO135 Aug 16, 2023
2e1b01e
📝 docs(CODEOWNERS): add CODEOWNERS file to specify code owners for th…
altaf-ali Aug 16, 2023
2663bc7
add tests for update
SamO135 Aug 16, 2023
9adca64
add classmethod decorators back
SamO135 Aug 17, 2023
d436d6a
split create and update tests by adding a fixture
SamO135 Aug 17, 2023
2e1b956
add tests for delete
SamO135 Aug 18, 2023
52595d7
add test for write_artifact
SamO135 Aug 18, 2023
af7b497
add new fixture to help with tests
SamO135 Aug 18, 2023
38ffac5
Start to refactor integration tests to subdir.
sb10 Aug 22, 2023
1ae5740
Refactor some replicated code and allow branch changing and checkout …
sb10 Aug 23, 2023
54aa3cd
Broken attempt at removing existing envs folder.
sb10 Aug 23, 2023
666631c
Working testable_artifacts test fixture.
sb10 Aug 23, 2023
a9a8e5e
temp (?) hack disable ldap to avoid no-config warnings.
sb10 Aug 23, 2023
c8068d0
Refactor fixture to only change settings, to allow for independent te…
sb10 Aug 23, 2023
84fe41e
Test commit and real push; change signatures to not take repo.
sb10 Aug 23, 2023
ccd0a50
Test commit and real push; change signatures to not take repo.
sb10 Aug 23, 2023
4dda585
Test create_file.
sb10 Aug 23, 2023
56bd743
Test delete_environment.
sb10 Aug 23, 2023
884a217
Refactor iter stuff to not be user-specific; test new iter.
sb10 Aug 23, 2023
82022fe
Move unit tests to subfolder.
sb10 Aug 23, 2023
2d3da1f
Add init py.
sb10 Aug 23, 2023
71bbdb4
Rename test_pygit to test_artifacts, and comment out all tests for no…
sb10 Aug 23, 2023
51e9ce6
Delint.
sb10 Aug 24, 2023
9dc1816
Test environment.create().
sb10 Aug 24, 2023
de1e243
Test the push worked during create.
sb10 Aug 24, 2023
0a502e4
Test create.update().
sb10 Aug 24, 2023
31d0ed5
Test environment.delete().
sb10 Aug 24, 2023
f681109
Test write_artifact.
sb10 Aug 24, 2023
c999436
Comment out tests for now until replaced with fully mocked unit tests.
sb10 Aug 24, 2023
fcbc2c2
Update with additional testing notes.
sb10 Aug 24, 2023
562dd24
Test environment.iter().
sb10 Aug 24, 2023
865e590
Remove commented-out test files for now, since they had too-long lines.
sb10 Aug 24, 2023
9e7a96a
Reformat.
sb10 Aug 24, 2023
21cc7a6
Move functions from conftest.py to utils.py.
sb10 Aug 29, 2023
8a419f7
Move functions from conftest.py to utils.py.
sb10 Aug 29, 2023
6393e17
Use fixtures for the repeated mocks.
sb10 Aug 29, 2023
c5e516a
Switch from env vars to markers to skip integration tests.
sb10 Aug 30, 2023
5edfa94
Broken attempt at switching to bare repo: push not working.
sb10 Aug 31, 2023
89323d6
Fixed push to branch of bare repo; but delete deleting everything.
sb10 Aug 31, 2023
df4cacc
Fix delete_environments_folder
sb10 Aug 31, 2023
570eb2b
Refactor tests to work with bare repo.
sb10 Aug 31, 2023
8f94945
Require successful push for attempted changes to be visible.
sb10 Aug 31, 2023
ea18ddb
Document that this does not work on empty repo.
sb10 Aug 31, 2023
469078d
Fix test_commit_and_push() to only affect environments folder.
sb10 Aug 31, 2023
cbe4f7c
Get latest repo during startup.
sb10 Sep 1, 2023
3997c3c
Reformat.
sb10 Sep 1, 2023
258dfb8
Make --repo flag work for all tests.
sb10 Sep 1, 2023
5b76224
Disable (unused) ldap init if no ldap config.
sb10 Sep 1, 2023
94e08fb
Add new module file parser.
sb10 Sep 1, 2023
9cd290e
Remove unused test files.
sb10 Sep 1, 2023
eb82448
wip for create_from_module.
sb10 Sep 1, 2023
f00b97b
Add new module file parser.
sb10 Sep 4, 2023
a9b755d
Move marker definition to ini.
mjkw31 Sep 4, 2023
f6d8ec4
Make compatible with python 3.9.
mjkw31 Sep 4, 2023
f369897
Make compatible with python 3.9, reformat and fix tests.
mjkw31 Sep 4, 2023
45ede5a
Add docstrings and reformat.
mjkw31 Sep 4, 2023
26fed98
Remove redundant id field from Package.
mjkw31 Sep 4, 2023
7734694
Remove module feature for now; fix some type linting issues.
mjkw31 Sep 4, 2023
9c0cd2c
Delint type issue.
mjkw31 Sep 4, 2023
a61e282
Note TODO that we should not hardcode URL.
mjkw31 Sep 4, 2023
3bc78fc
Provide default user for git repo config and rename post fixture to h…
mjkw31 Sep 4, 2023
68b942a
Change testable_environment to return a single value.
mjkw31 Sep 4, 2023
e2bfe67
Reformat.
mjkw31 Sep 5, 2023
70950f1
Remove redundant 'message' fields.
mjkw31 Sep 5, 2023
1888722
Remove test data for removed test.
mjkw31 Sep 5, 2023
04afd84
Rename file_was_pushed to better reflect intent.
mjkw31 Sep 5, 2023
5ad16b9
Correct softpack.yaml format.
mjkw31 Sep 5, 2023
7f8f717
Reformat.
mjkw31 Sep 5, 2023
5e84cfe
Merge pull request #9 from wtsi-hgi/feature/mutations
sb10 Sep 5, 2023
27b418e
Fix creating new envs.
mjkw31 Sep 5, 2023
acda088
Merge pull request #16 from wtsi-hgi/create_fix
sb10 Sep 5, 2023
4ddb78f
Add GraphQL endpoint to recieve module file to be parsed into pseudo-…
mjkw31 Sep 5, 2023
baaec71
Allow tests to be run with additional flags (such as --repo).
mjkw31 Sep 5, 2023
0f9f7ae
De-linted.
mjkw31 Sep 5, 2023
8319237
WIP: Add parameterised tests for ToSoftPack.
mjkw31 Sep 5, 2023
cad405e
Test edge cases for module parser.
mjkw31 Sep 6, 2023
ddcaa6d
Fix location of test data.
mjkw31 Sep 6, 2023
e63bfed
Reformat.
mjkw31 Sep 6, 2023
6e1a9c7
Generate README.md file from module path.
mjkw31 Sep 6, 2023
a524f4d
Remove extra whitespace after backticks.
mjkw31 Sep 6, 2023
8dcb342
Add docstring.
mjkw31 Sep 6, 2023
e043039
Reformat.
mjkw31 Sep 6, 2023
ab51f66
Correct typo.
mjkw31 Sep 6, 2023
deda76e
Use template to generate README.md file.
mjkw31 Sep 6, 2023
f6f9a53
Add README string to environments endpoint.
mjkw31 Sep 6, 2023
7108d26
Merge pull request #17 from wtsi-hgi/feature/env-from-module
sb10 Sep 6, 2023
c942b88
Add Environment type (softpack or module).
mjkw31 Sep 7, 2023
77b5d6b
Merge pull request #18 from wtsi-hgi/feature/env-type
sb10 Sep 7, 2023
7b82d85
Fix bootstrapping problem requiring at least one environment in both …
mjkw31 Sep 7, 2023
5310c5b
Merge pull request #19 from wtsi-hgi/feature/bootstrap-fix
sb10 Sep 7, 2023
91acc3c
Add missing dependency to poetry lock file.
mjkw31 Sep 7, 2023
a110326
Merge pull request #20 from wtsi-hgi/feature/fix-missing-dep
sb10 Sep 7, 2023
68e377d
Split version strings from name.
mjkw31 Sep 8, 2023
904d2da
Merge pull request #21 from wtsi-hgi/feature/split-version
sb10 Sep 8, 2023
5c01150
Allow multiple spaces after module-whatis and puts stderr statements.
mjkw31 Sep 8, 2023
7b32182
Merge pull request #22 from wtsi-hgi/feature/fix-module-parse
sb10 Sep 8, 2023
c3aa147
Determine environment state from artifacts.
mjkw31 Sep 11, 2023
5b1e55a
Merge pull request #23 from wtsi-hgi/feature/state
sb10 Sep 11, 2023
c9ca423
New updateFromModule endpoint.
mjkw31 Sep 12, 2023
9b85e01
Write multiple artifacts in a single commit.
mjkw31 Sep 12, 2023
0f55d2c
Add endpoint to create multiple artifacts in a single commit.
mjkw31 Sep 12, 2023
e5cb642
Remove unused Path call.
mjkw31 Sep 12, 2023
d1a0939
Merge pull request #24 from wtsi-hgi/feature/modify-module
sb10 Sep 12, 2023
c1fd7e6
Add upload endpoint for builder to pass artifacts to be uploaded to r…
mjkw31 Sep 25, 2023
d649b6b
Use correct placeholder filename.
mjkw31 Sep 25, 2023
5d289de
Support large file uploads.
mjkw31 Sep 26, 2023
246f096
Add python version requirement.
mjkw31 Sep 26, 2023
6321d7d
Merge pull request #25 from wtsi-hgi/feature/upload-endpoint
sb10 Sep 26, 2023
679a05d
Merge branch 'main' of github.com:wtsi-hgi/softpack-core into develop
mjkw31 Sep 26, 2023
a429fa4
Update spack version used in CI tests.
mjkw31 Sep 26, 2023
efd268e
Run CI tests on develop branch.
mjkw31 Sep 26, 2023
2ec5bf1
Merge pull request #28 from wtsi-hgi/main-merge
sb10 Sep 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @altaf-ali
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ SoftPack Core - GraphQL backend service

## Installation

### External dependencies

SoftPack Core requires Python version 3.11 or greater.

This project also relies on Spack. Install that first:

``` console
$ git clone -c feature.manyFiles=true --depth 1 https://github.com/spack/spack.git
$ source spack/share/spack/setup-env.sh
```

To start the service, you will also need to configure a git repository to store
artifacts.

### Stable release

To install SoftPack Core, run this command in your
Expand Down Expand Up @@ -90,6 +104,48 @@ Run tests with [Tox][]
poetry run tox
```

To run integration tests, you need a git repository set up with token access and
a branch named after your git repo username (stripped of any @domain if your
username is an email address).

Make sure the artifacts/repo section of ~/.softpack/core/config.yml is
configured correctly:

```
artifacts:
repo:
url: https://github.com/[your-org]/development-softpack-artifacts.git
username: [your-username]
author: [your-name]
email: [your-email]
writer: [your-token]
```

Then enable the integration tests by suppling --repo to `poetry run pytest`, or
to tox like this:

```
poetry run tox -- -- --repo
```

To discover all tests and run them (skipping integration tests with no --repo):

``` console
poetry run pytest tests -sv
```

To run just the integration tests:

``` console
poetry run pytest tests/integration -sv --repo
```

To run an individual test:

``` console
poetry run pytest tests/integration/test_artifacts.py::test_clone -sv --repo
```

Run [MkDocs] server to view documentation:

``` console
Expand Down
50 changes: 43 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ classifiers=[
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
]
packages = [
Expand Down Expand Up @@ -48,6 +46,9 @@ singleton-decorator = "^1.0.0"
sqlalchemy = "1.4.45"
strawberry-graphql = "^0.177.1"
typer = "^0.9.0"
pytest-mock = "^3.11.1"
pytest-asyncio = "^0.21.1"
python-multipart = "^0.0.6"

[tool.poetry.group.dev]
optional = true
Expand Down Expand Up @@ -132,11 +133,13 @@ skip_gitignore = true
disallow_untyped_calls = true
disallow_untyped_defs = true
ignore_missing_imports = true
plugins = "strawberry.ext.mypy_plugin"

[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning:starlette"
]
markers = "repo: mark test as altering a real git repo"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Loading
Loading