Skip to content

Commit 401b6b1

Browse files
HugoOnghaimaterialsproject
andauthored
Release workflow (#29)
* Fixed .gitignore * Made new release-workflow branch off of master * First test of release workflow * added temporary placeholder for publish * Fixed branch in pull from main to current branch name * Adjusted github push action step * Added mkdocs! * Updated CHANGELOG.md * Added error error detection of nothing to commit, for development I guess * Trying to get mkdocs to build * Trying uvx to run mkdocs build, swapped order of syc and pip list * Switching to uvx mkdocs gh-deploy * Trying to resolve local branch being behind with a git pull first * Attempting to fetch gh-pages first to pull any changes first before deployment * Return to workflow branch before calling mkdocs gh-deploy * Added favicon and made about page, preparing for first release and changelog * Attempting first automated push to testpypi, bumped to mpcite 0.0.4 and replaced placeholder echo * Maybe uv publish was commented out accidentally * Forgot to supply testpypi api token * Added Brief readme.md * Fixed URL on Readme * Removing release on branch for now * Changed about.md * Added workflow dispatch to release workflow * debugging workflow_dispatch * testing workflow dispatch... * Ignore workflow requirement if event is not workflow_dispatch * Fixed typing twice * Republish to see if it fixes. * removing fetching of gh-pages * Trying original functionality again, and hoping workflow dispatch works * Removed README.md, will direct users to documentation instead * Fixing PR Comments * Cleaned up docs * moved mkdocs to a new dependency group: docs * Added error error detection of nothing to commit, for development I guess * Trying to get mkdocs to build * Trying uvx to run mkdocs build, swapped order of syc and pip list * Switching to uvx mkdocs gh-deploy * Attempting to fetch gh-pages first to pull any changes first before deployment * Added favicon and made about page, preparing for first release and changelog * Attempting first automated push to testpypi, bumped to mpcite 0.0.4 and replaced placeholder echo * Added Brief readme.md * Fixed URL on Readme * Changed about.md * Added workflow dispatch to release workflow * testing workflow dispatch... * Ignore workflow requirement if event is not workflow_dispatch * Removed README.md, will direct users to documentation instead * Fixing PR Comments * Cleaned up docs * update lock file --------- Co-authored-by: materialsproject <feedback@materialsproject.org>
1 parent 2896c50 commit 401b6b1

8 files changed

Lines changed: 253 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ jobs:
2020
uses: astral-sh/setup-uv@v6
2121
with:
2222
python-version: 3.12
23+
enable-cache: true
24+
cache-dependency-glob: "uv.lock"
2325

24-
- name: Build
25-
run: uv-build
26+
# should I uv version --bump patch here?
2627

27-
- name: Publish
28-
run: uv-publish --trusted-publishing always
28+
- name: Build the project
29+
run: uv build
30+
31+
- name: Publish to PyPI
32+
run: uv publish --trusted-publishing always
2933

3034
docs:
3135
runs-on: ubuntu-latest
@@ -54,12 +58,15 @@ jobs:
5458
git config --local user.email "feedback@materialsproject.org"
5559
git config --local user.name "materialsproject"
5660
git stash
57-
git pull origin main
61+
git pull origin master
5862
mv CHANGELOG.md docs/
5963
git add docs/CHANGELOG.md && git commit -m 'Updated CHANGELOG.md'
6064
6165
- name: Push changes
6266
uses: ad-m/github-push-action@master
6367
with:
6468
github_token: ${{ secrets.GITHUB_TOKEN }}
65-
# integrate mkdocs at some point
69+
branch: master
70+
71+
- name: Build and Deploy!
72+
run: uvx mkdocs gh-deploy

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,7 @@ __marimo__/
209209

210210
# Streamlit
211211
.streamlit/secrets.toml
212+
213+
json_pages/
214+
notebooks/
215+
test_json_pages/

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
4+
5+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

docs/img/favicon.ico

3.77 KB
Binary file not shown.

docs/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Home
2+
3+
For the source code visit the [GitHub Repository](https://github.com/materialsproject/MPCite).
4+
5+
For package instructions visit [PyPi](https://pypi.org/p/mp-cite).
6+
7+
# What is MPCite?
8+
9+
MPCite provides high-throughput, orchestrated functions for the Materials Project to interact programmatically with the DOE Office of Scientific and Technical Information (OSTI) via the E-Link API [[1]](https://github.com/doecode/elinkapi). It enables automated submission, validation, and management of metadata records and Digital Object Identifiers (DOIs) for materials data within the Materials Project ecosystem.
10+
11+
Designed as a backend utility, MPCite ensures robust, scalable DOI assignment workflows through modular and reusable interfaces that integrate directly with MP's data infrastructure.

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
site_name: MPCite
2+
nav:
3+
- Home: index.md
4+
- Changelog: CHANGELOG.md

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ lint = [
2828
"mypy>=1.17.1",
2929
"ruff>=0.12.7",
3030
]
31+
docs = [
32+
"mkdocs>=1.6.1",
33+
]
3134

3235
[build-system]
3336
requires = ["hatchling"]

uv.lock

Lines changed: 213 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)