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

CI: Package bids-examples and bids-error-examples into Python distributions on schema-* tags #1252

Merged
merged 81 commits into from
Aug 25, 2022

Conversation

TheChymera
Copy link
Collaborator

@bendhouseart something went wrong with the other branch and actions fail to start up https://github.com/orgs/community/discussions/26746

exploring whether the “make a new branch” fix works

@TheChymera
Copy link
Collaborator Author

@bendhouseart ok, solved that issue

@TheChymera TheChymera mentioned this pull request Aug 24, 2022
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #1252 (c763bb0) into master (db4b0f5) will increase coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1252      +/-   ##
==========================================
+ Coverage   88.23%   88.33%   +0.09%     
==========================================
  Files           6        6              
  Lines        1020     1020              
==========================================
+ Hits          900      901       +1     
+ Misses        120      119       -1     
Impacted Files Coverage Δ
tools/schemacode/bidsschematools/schema.py 81.37% <0.00%> (+0.68%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@TheChymera
Copy link
Collaborator Author

TheChymera commented Aug 24, 2022

@effigies @bendhouseart

ok, so at long last this is done. To recap:

  • Depending on the BIDSSCHEMATOOLS_RELEASE envvar being set, one of our tests will create a testdata copy directory which is not torn down (this was already in).
  • Now, however, the directory for this archive is bidsschematools/tests/data/bundled.
  • We set this variable depending on whether or not the first seven characters of the tag are schema-
  • If the variable is set we build the package — including testdata, which is less than 1MB compressed and 2.7 MB uncompressed.
  • If the variable is set we test the upload to test.pypi
  • If the variable is set and the test upload succeeded we upload to pypi
  • we now have a script which should make testing for and development of tag-based hooks easier inside (scripts/test_tag)

For this PR to actually do anything at all, an additional 2 commits will be required after merge by someone who knows what our secrets are called:

  1. set tokens:
  • replaces secrets.BIDS_TOKEN_TEST in the “Real Upload” section to whatever the BIDS pypi token is called.
  • replaces secrets.BIDS_TOKEN_TEST in the “Test Upload” section to whatever the BIDS test.pypi token is called.
  • alternatively you can give me permissions to upload dedicated tokens for the both
  • optionally we can remove the autodata2 branch entry from the head of .github/workflows/schemacode_ci.yml
  1. trigger release:
  • remove -dev from src/schema/SCHEMA_VERSION
  • add a tag called schema-0.4.0

@TheChymera TheChymera marked this pull request as ready for review August 24, 2022 19:11
effigies and others added 6 commits August 25, 2022 08:52
TEST: Delay imports to avoid full installation
Run from anywhere, use meaningful commit/tag messages, do not push
automatically
CI/TEST: Separate build, test and publish stages
@TheChymera
Copy link
Collaborator Author

@effigies should be good to go. Thanks for your help. If you squash you can also add @bendhouseart as co-author since he helped as well.

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

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

LGTM. Just need to drop the extra branch before merging.

.github/workflows/schemacode_ci.yml Outdated Show resolved Hide resolved
@effigies effigies changed the title Autodata2 CI: Package bids-examples and bids-error-examples into Python distributions on schema-* tags Aug 25, 2022
@effigies effigies added exclude-from-changelog This item will not feature in the automatically generated changelog schema-code Updates or changes to the code used to parse, filter, and render the schema. labels Aug 25, 2022
@effigies effigies merged commit e610cbf into bids-standard:master Aug 25, 2022
@TheChymera TheChymera deleted the autodata2 branch August 25, 2022 18:39
@effigies
Copy link
Collaborator

0.4.0 is up on PyPI.

@TheChymera
Copy link
Collaborator Author

Amazing, just tested it, works system-wide via Gentoo and passes all tests :3

https://ppb.chymera.eu/5a3281

@bendhouseart
Copy link
Collaborator

@bendhouseart ok, solved that issue

That looked nasty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-from-changelog This item will not feature in the automatically generated changelog schema-code Updates or changes to the code used to parse, filter, and render the schema.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants